-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Conversation
@dalthviz, please make the corresponding changes in the Spyder repo against the |
Very good job, by the way! |
great job :-p, this was accomplished in fewer lines than I expected :-) |
Don't forget to change |
spyder_notebook/notebookplugin.py
Outdated
@@ -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) |
There was a problem hiding this comment.
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
spyder_notebook/widgets/client.py
Outdated
self.name = name | ||
if os.name == 'nt': | ||
name = name.replace('/','\\') | ||
self.filename = name |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 :-)
There was a problem hiding this comment.
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
This still needs a test before we merge it :-) |
@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 |
@dalthviz, please merge with master to fix the errors in Circle. |
There was a problem hiding this 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 :-)
Fixes #45
Preview:
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 theget_current_editor
)save_initial_state
(let the current widget not havetextCursor
)Also this works for now by adding a button to open the fileswitcher.