Skip to content

Commit

Permalink
Merge pull request #22699 from ccordoba12/add-help-entry
Browse files Browse the repository at this point in the history
PR: Add `Help Spyder` entry to the Help menu (Application)
  • Loading branch information
ccordoba12 authored Oct 21, 2024
2 parents 9865971 + 581ce15 commit f4ca94a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
13 changes: 8 additions & 5 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,14 @@
REPOS[DEVPATH.name]["editable"] = False

for name in REPOS.keys():
if not REPOS[name]['editable']:
install_repo(name)
installed_dev_repo = True
else:
logger.info("%s installed in editable mode", name)
# Don't install the spyder-remote-services subrepo because it's not
# necessary on the Spyder side.
if name != "spyder-remote-services":
if not REPOS[name]['editable']:
install_repo(name)
installed_dev_repo = True
else:
logger.info("%s installed in editable mode", name)

if installed_dev_repo:
logger.info("Restarting bootstrap to pick up installed subrepos")
Expand Down
8 changes: 8 additions & 0 deletions spyder/plugins/application/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class ApplicationActions:
SpyderTroubleshootingAction = "spyder_troubleshooting_action"
SpyderDependenciesAction = "spyder_dependencies_action"
SpyderSupportAction = "spyder_support_action"
HelpSpyderAction = "help_spyder_action"
SpyderAbout = "spyder_about_action"

# Tools
Expand Down Expand Up @@ -137,6 +138,13 @@ def setup(self):
_("Spyder support..."),
triggered=lambda: start_file(__forum_url__))

self.create_action(
ApplicationActions.HelpSpyderAction,
_("Help Spyder..."),
icon=self.create_icon("inapp_appeal"),
triggered=self.inapp_appeal_status.show_appeal
)

# About action
self.about_action = self.create_action(
ApplicationActions.SpyderAbout,
Expand Down
11 changes: 8 additions & 3 deletions spyder/plugins/application/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,18 @@ def _populate_help_menu_support_section(self):
"""Add Spyder base support actions to the Help main menu."""
mainmenu = self.get_plugin(Plugins.MainMenu)
for support_action in [
self.trouble_action, self.report_action,
self.dependencies_action, self.support_group_action]:
self.trouble_action,
self.report_action,
self.dependencies_action,
self.support_group_action,
self.get_action(ApplicationActions.HelpSpyderAction),
]:
mainmenu.add_item_to_application_menu(
support_action,
menu_id=ApplicationMenus.Help,
section=HelpMenuSections.Support,
before_section=HelpMenuSections.ExternalDocumentation)
before_section=HelpMenuSections.ExternalDocumentation
)

def _populate_help_menu_about_section(self):
"""Create Spyder base about actions."""
Expand Down
2 changes: 2 additions & 0 deletions spyder/plugins/application/widgets/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def _on_click(self):
def show_appeal(self):
if self._appeal_dialog is None:
self._appeal_dialog = InAppAppealDialog(self)

if not self._appeal_dialog.isVisible():
self._appeal_dialog.show()

# ---- StatusBarWidget API
Expand Down

0 comments on commit f4ca94a

Please sign in to comment.