-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: Added management for toolbars in new Editor windows instances. #3806
Conversation
Nice, I like it a lot! Please merge with 3.x to fix the tests in CircleCI. This is a new service we integrated with the repo to run our tests faster and check for code style. |
@dalthviz, there are code style failures reported by Please take a look at https://circleci.com/gh/spyder-ide/spyder/20 to fix them :-) |
toolbars_names = CONF.get('main', 'last_visible_toolbars', default=[]) | ||
print(toolbars_names) | ||
if toolbars_names: | ||
|
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.
Remove this blank line
dic[toolbar.objectName()] = toolbar | ||
toolbar.toggleViewAction().setChecked(False) | ||
toolbar.setVisible(False) | ||
print(dic) |
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.
Remove this print
"""Loads the last visible toolbars from the .ini file.""" | ||
|
||
toolbars_names = CONF.get('main', 'last_visible_toolbars', default=[]) | ||
print(toolbars_names) |
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.
Remove this print
|
||
def load_toolbars(self): | ||
"""Loads the last visible toolbars from the .ini file.""" | ||
|
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.
Remove this blank
"""Get the toolbars.""" | ||
return self.toolbars | ||
|
||
def add_actions_to_menu(self, menu_title, actions): |
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 method should be called add_toolbars_to_menu
menus.append(menu) | ||
self.menus.append(menu) | ||
|
||
def get_menu(self, menu_title): |
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 change the definition of this method to to get_toolbar(self, toolbar_name)
Thanks @dalthviz, this looks good now :-) |
Fixes first point of #3790