Skip to content

Commit

Permalink
PR4: Add helpmenu option (#1628)
Browse files Browse the repository at this point in the history
*Add helpmenu option
  • Loading branch information
shrivaths16 authored Jan 19, 2024
1 parent b5d5139 commit 150453d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sleap/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,9 @@ def new_instance_menu_action():
helpMenu.addSeparator()
helpMenu.addAction("Keyboard Shortcuts", self._show_keyboard_shortcuts_window)

helpMenu.addSeparator()
helpMenu.addAction("What's New?", self.commands.showBulletin)

def process_events_then(self, action: Callable):
"""Decorates a function with a call to first process events."""

Expand Down
10 changes: 10 additions & 0 deletions sleap/gui/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,10 @@ def openPrereleaseVersion(self):
"""Open the current prerelease version."""
self.execute(OpenPrereleaseVersion)

def showBulletin(self):
"""Opens the latest bulletin"""
self.execute(ShowBulletin)


# File Commands

Expand Down Expand Up @@ -3398,6 +3402,12 @@ def do_action(context: CommandContext, params: dict):
context.openWebsite(rls.url)


class ShowBulletin(AppCommand):
@staticmethod
def do_action(context: CommandContext, params: dict):
context.app.bulletin_dialog()


def copy_to_clipboard(text: str):
"""Copy a string to the system clipboard.
Expand Down

0 comments on commit 150453d

Please sign in to comment.