Skip to content

Commit

Permalink
Added about option
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBananaPants committed Jul 13, 2022
1 parent d91fc0d commit b5b6ed4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CamAlert.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ def check_updates():
rumps.alert(title="CamAlert", message="You already have the newest version installed.", ok=None, cancel=None)


def about():
rumps.alert(title="CamAlert", message=f"Developed by Joran Vancoillie\nversion: {version}", ok=None, cancel=None)


# Run update function every 60 seconds
def every(delay):
next_time = time.time() + delay
Expand All @@ -257,7 +261,7 @@ def every(delay):
class StatusBar(rumps.App):
def __init__(self):
super(StatusBar, self).__init__("CamAlert")
self.menu = ["Open new listings", "Clear new listings", None, "Manual update", None, ["Settings", ["Blocklist", "Reset", "Check for updates"]]]
self.menu = ["Open new listings", "Clear new listings", None, "Manual update", None, ["Settings", ["Blocklist", "Reset", "Check for updates", "About"]]]

@rumps.clicked("Open new listings")
def browser(self, _):
Expand Down Expand Up @@ -286,6 +290,10 @@ def reset(self, _):
def reset(self, _):
check_updates()

@rumps.clicked("Settings", "About")
def reset(self, _):
about()

@rumps.notifications
def notifications(self, _): # function that reacts to incoming notification dicts
open_listings()
Expand Down

0 comments on commit b5b6ed4

Please sign in to comment.