Skip to content

Commit

Permalink
Merge branch 'main' into number_updates_tray
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiz96 authored Oct 1, 2024
2 parents 05a2c86 + 0f89ad2 commit 3abdbc1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
8 changes: 6 additions & 2 deletions po/arch-update.pot
Original file line number Diff line number Diff line change
Expand Up @@ -588,11 +588,15 @@ msgstr ""
msgid "No service requiring a post upgrade restart found\\n"
msgstr ""

#: src/lib/tray.py:123
#: src/lib/tray.py:127
msgid "Run Arch-Update"
msgstr ""

#: src/lib/tray.py:124
#: src/lib/tray.py:128
msgid "Check for updates"
msgstr ""

#: src/lib/tray.py:129
msgid "Exit"
msgstr ""

Expand Down
8 changes: 6 additions & 2 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,15 @@ msgstr ""
msgid "No service requiring a post upgrade restart found\\n"
msgstr "Aucun service nécessitant un redémarrage suite à la mise à jour n'a été trouvé\\n"

#: src/lib/tray.py:123
#: src/lib/tray.py:127
msgid "Run Arch-Update"
msgstr "Lancer Arch-Update"

#: src/lib/tray.py:124
#: src/lib/tray.py:128
msgid "Check for updates"
msgstr "Vérifier les mises à jour"

#: src/lib/tray.py:129
msgid "Exit"
msgstr "Quitter"

Expand Down
7 changes: 7 additions & 0 deletions src/lib/tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ def run(self):
""" Start arch-update """
arch_update()

def check(self):
""" Check for updates """
subprocess.run(["arch-update", "--check"], check=False)

def exit(self):
""" Close systray process """
sys.exit(0)
Expand All @@ -180,11 +184,14 @@ def __init__(self, iconfile):
# Menu
menu = QMenu()
menu_launch = QAction(_("Run Arch-Update"))
menu_check = QAction(_("Check for updates"))
menu_exit = QAction(_("Exit"))
menu.addAction(menu_launch)
menu.addAction(menu_check)
menu.addAction(menu_exit)

menu_launch.triggered.connect(self.run)
menu_check.triggered.connect(self.check)
menu_exit.triggered.connect(self.exit)

self.tray.setContextMenu(menu)
Expand Down

0 comments on commit 3abdbc1

Please sign in to comment.