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

PR4: Add helpmenu option #1628

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
fb0f44e
Add helpmenu option
shrivaths16 Dec 7, 2023
fd81643
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Dec 14, 2023
b5980fe
macos pyside2 >=5.12,<=5.15.6
shrivaths16 Dec 18, 2023
f8f5fa7
pyside6 >=6 macos
shrivaths16 Dec 18, 2023
027c4d6
pyside == 6.2.2.1
shrivaths16 Dec 19, 2023
78c30ff
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Dec 21, 2023
0dcd27a
Edit the dhelp menu option
shrivaths16 Dec 21, 2023
184e7b8
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Dec 21, 2023
835d3cf
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Jan 2, 2024
59db054
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Jan 3, 2024
e800037
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Jan 11, 2024
48bf57e
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Jan 11, 2024
52d137d
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Jan 11, 2024
ddd74cc
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Jan 11, 2024
ac4fced
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Jan 12, 2024
8d96262
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Jan 17, 2024
4b51812
Merge branch 'shrivaths/changelog-announcement-3' into shrivaths/chan…
shrivaths16 Jan 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)

Comment on lines +1040 to +1042
Copy link

Choose a reason for hiding this comment

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

It's good to see the addition of a "What's New?" action to the help menu. To ensure robustness, consider verifying that self.commands.showBulletin is callable before adding it to the action. This can prevent potential runtime errors if the method is not defined or incorrectly implemented.

if callable(getattr(self.commands, 'showBulletin', None)):
    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
Loading