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

style: fix typos in systray python script #323

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions src/lib/tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ def arch_update():
class ArchUpdateQt6:
"""System Tray using QT6 library"""

# Definition of functions to update the icon and the dropdown menu when their respective state files change
# Definition of functions to update the icon and the dropdown menu when their respective state files content change
def file_changed(self):
"""Update icon and dropdown menu"""
self.update_icon()
self.update_dropdown_menu()

# Update the icon based on the 'try_icon' statefile content
# Update the icon based on the 'tray_icon' statefile content
def update_icon(self):
"""Update icon"""
if self.watcher and not self.iconfile in self.watcher.files():
Expand Down Expand Up @@ -142,9 +142,10 @@ def update_dropdown_menu(self):
# Remove empty lines
updates_list = [update.strip() for update in updates_list if update.strip()]

# Count the number of pending updates (according to the number of lines of the 'last_updates_check' statefile
# Count the number of pending updates (according to the number of lines of the 'last_updates_check' statefile)
updates_count = len(updates_list)

# Update the dropdown menu title accordingly
if updates_count == 0:
self.dropdown_menu.setTitle(_("System is up to date"))
self.dropdown_menu.setEnabled(False)
Expand All @@ -171,7 +172,7 @@ def check(self):
"""Run check for updates"""
subprocess.run(["arch-update", "--check"], check=False)

# Action to xxit the systray
# Action to exit the systray
def exit(self):
"""Exit systray"""
sys.exit(0)
Expand Down