Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Add a file switcher instance #46

Merged
merged 9 commits into from
May 5, 2017

Conversation

dalthviz
Copy link
Member

Fixes #45

Preview:

fs


In order for this to work there is a need to modify the FileSwitcher class in spyder to map the correct methods to get the current widget (client).

The methods to change will be:

  • get_editor (change the call for the get_current_editor)
  • save_initial_state (let the current widget not have textCursor)

Also this works for now by adding a button to open the fileswitcher.

@dalthviz dalthviz added this to the v0.1 milestone Mar 21, 2017
@dalthviz dalthviz self-assigned this Mar 21, 2017
@dalthviz dalthviz requested review from ccordoba12 and goanpeca March 21, 2017 04:45
@dalthviz dalthviz changed the title [WIP] Adds a file switche instance [WIP] Adds a file switcher instance Mar 21, 2017
@ccordoba12
Copy link
Member

@dalthviz, please make the corresponding changes in the Spyder repo against the 3.1.x branch.

@ccordoba12
Copy link
Member

Very good job, by the way!

@goanpeca
Copy link
Member

great job :-p, this was accomplished in fewer lines than I expected :-)

@ccordoba12 ccordoba12 changed the title [WIP] Adds a file switcher instance PR: [WIP] Add a file switcher instance Mar 22, 2017
@ccordoba12
Copy link
Member

Don't forget to change / to \ before displaying filenames on Windows.

@dalthviz dalthviz changed the title PR: [WIP] Add a file switcher instance PR: Add a file switcher instance Mar 24, 2017
@@ -61,6 +63,10 @@ def __init__(self, parent):

layout = QVBoxLayout()

filelist_btn = create_toolbutton(self, icon=ima.icon('filelist'),
tip=_("File list management"),
triggered=self.open_fileswitcher_dlg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please align the last two lines here to ( in the first line

self.name = name
if os.name == 'nt':
name = name.replace('/','\\')
self.filename = name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please leave this as it was, i.e. self.name = name

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it's fine as you wrote it :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But to be consistent, you should change name to filename in create_new_client

@ccordoba12
Copy link
Member

This still needs a test before we merge it :-)

@ccordoba12
Copy link
Member

@dalthviz, we need to release Spyder 3.1.4 for your test to work. I'll try to do that tomorrow :-)

Besides, you need to change setup.py to demand spyder>=3.1.4 so that this plugin has the right dependency.

@ccordoba12
Copy link
Member

@dalthviz, please merge with master to fix the errors in Circle.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really cool!! Thanks @dalthviz for working on it :-)

@ccordoba12 ccordoba12 merged commit 1658181 into spyder-ide:master May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants