Skip to content

Commit

Permalink
GUI: Add window icon.
Browse files Browse the repository at this point in the history
Signed-off-by: Slendi <[email protected]>
  • Loading branch information
xslendix committed Oct 12, 2023
1 parent 447720a commit b1a33fc
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 29 deletions.
7 changes: 5 additions & 2 deletions src/nexus/GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ def __init__(self, args: argparse.Namespace):
self.tr = self.translator.translate

# System tray
self.tray_icon = QIcon(os.path.join(script_parent_path, 'assets', 'images', 'icon.ico'))
self.nexus_icon = QIcon(os.path.join(script_parent_path, 'assets', 'images', 'icon.ico'))
self.tray = QSystemTrayIcon()
self.tray.activated.connect(self.show_hide)
self.tray.setIcon(self.tray_icon)
self.tray.setIcon(self.nexus_icon)
self.tray.setVisible(True)

# System tray menu
Expand All @@ -101,6 +101,9 @@ def __init__(self, args: argparse.Namespace):
self.tray_menu.addAction(self.quit_tray_menu_action)
self.tray.setContextMenu(self.tray_menu)

# Set window icon
self.window.setWindowIcon(self.nexus_icon)

# Components
self.start_stop_button: QPushButton = self.window.startStopButton
self.chentry_table: QTableWidget = self.window.chentryTable
Expand Down
54 changes: 27 additions & 27 deletions translations/i18n_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,152 +70,152 @@
<context>
<name>GUI</name>
<message>
<location filename="../src/nexus/GUI.py" line="253"/>
<location filename="../src/nexus/GUI.py" line="255"/>
<source>GUI</source>
<comment>Start logging</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="222"/>
<location filename="../src/nexus/GUI.py" line="224"/>
<source>GUI</source>
<comment>Starting...</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="96"/>
<location filename="../src/nexus/GUI.py" line="98"/>
<source>GUI</source>
<comment>Start/stop logging</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="97"/>
<location filename="../src/nexus/GUI.py" line="99"/>
<source>GUI</source>
<comment>Quit</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="130"/>
<location filename="../src/nexus/GUI.py" line="132"/>
<source>GUI</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="138"/>
<location filename="../src/nexus/GUI.py" line="140"/>
<source>GUI</source>
<comment>Ban and delete</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="233"/>
<location filename="../src/nexus/GUI.py" line="235"/>
<source>GUI</source>
<comment>Stop logging</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="238"/>
<location filename="../src/nexus/GUI.py" line="240"/>
<source>GUI</source>
<comment>Logging started</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="258"/>
<location filename="../src/nexus/GUI.py" line="260"/>
<source>GUI</source>
<comment>Logging stopped</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="305"/>
<location filename="../src/nexus/GUI.py" line="307"/>
<source>GUI</source>
<comment>Loaded {}/{} freqlogged words</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="344"/>
<location filename="../src/nexus/GUI.py" line="420"/>
<location filename="../src/nexus/GUI.py" line="346"/>
<location filename="../src/nexus/GUI.py" line="422"/>
<source>GUI</source>
<comment>Banned &apos;{}&apos;</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="345"/>
<location filename="../src/nexus/GUI.py" line="421"/>
<location filename="../src/nexus/GUI.py" line="347"/>
<location filename="../src/nexus/GUI.py" line="423"/>
<source>GUI</source>
<comment>&apos;{}&apos; already banned</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="367"/>
<location filename="../src/nexus/GUI.py" line="369"/>
<source>GUI</source>
<comment>Unban {} words?</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="369"/>
<location filename="../src/nexus/GUI.py" line="371"/>
<source>GUI</source>
<comment>Unban &apos;{}&apos;?</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="376"/>
<location filename="../src/nexus/GUI.py" line="378"/>
<source>GUI</source>
<comment>Unbanned &apos;{}&apos;</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="377"/>
<location filename="../src/nexus/GUI.py" line="379"/>
<source>GUI</source>
<comment>&apos;{}&apos; not banned</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="379"/>
<location filename="../src/nexus/GUI.py" line="381"/>
<source>GUI</source>
<comment>None of the selected words were banned</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="382"/>
<location filename="../src/nexus/GUI.py" line="384"/>
<source>GUI</source>
<comment>Unbanned {}/{} selected words</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="401"/>
<location filename="../src/nexus/GUI.py" line="403"/>
<source>GUI</source>
<comment>Exported {} entries to {}</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="410"/>
<location filename="../src/nexus/GUI.py" line="412"/>
<source>GUI</source>
<comment>Ban and delete {} words?</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="412"/>
<location filename="../src/nexus/GUI.py" line="414"/>
<source>GUI</source>
<comment>Ban and delete &apos;{}&apos;?</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="423"/>
<location filename="../src/nexus/GUI.py" line="425"/>
<source>GUI</source>
<comment>All of the selected words were already banned</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="426"/>
<location filename="../src/nexus/GUI.py" line="428"/>
<source>GUI</source>
<comment>Banned and deleted {}/{} selected words</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="428"/>
<location filename="../src/nexus/GUI.py" line="430"/>
<source>GUI</source>
<comment>Confirm ban</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/nexus/GUI.py" line="384"/>
<location filename="../src/nexus/GUI.py" line="386"/>
<source>GUI</source>
<comment>Confirm unban</comment>
<translation type="unfinished"></translation>
Expand Down

0 comments on commit b1a33fc

Please sign in to comment.