Browse Source

Better tray menu and add client (prompt) there as well

master
Nils 3 years ago
parent
commit
c787888901
  1. 1702
      qtgui/resources.py
  2. BIN
      qtgui/resources/translations/de.qm
  3. 54
      qtgui/resources/translations/de.ts
  4. 12
      qtgui/systemtray.py

1702
qtgui/resources.py

File diff suppressed because it is too large

BIN
qtgui/resources/translations/de.qm

Binary file not shown.

54
qtgui/resources/translations/de.ts

@ -4,32 +4,32 @@
<context>
<name>AskBeforeQuit</name>
<message>
<location filename="../../mainwindow.py" line="290"/>
<location filename="../../mainwindow.py" line="300"/>
<source>About to quit but session {} still open</source>
<translation>Programm soll beendet werden, aber Session {} ist noch offen</translation>
</message>
<message>
<location filename="../../mainwindow.py" line="291"/>
<location filename="../../mainwindow.py" line="301"/>
<source>Do you want to save?</source>
<translation>Möchten Sie speichern?</translation>
</message>
<message>
<location filename="../../mainwindow.py" line="292"/>
<location filename="../../mainwindow.py" line="302"/>
<source>About to quit</source>
<translation>Programm soll beendet werden</translation>
</message>
<message>
<location filename="../../mainwindow.py" line="301"/>
<location filename="../../mainwindow.py" line="311"/>
<source>Don&apos;t Quit</source>
<translation>Nicht Beenden</translation>
</message>
<message>
<location filename="../../mainwindow.py" line="302"/>
<location filename="../../mainwindow.py" line="312"/>
<source>Save</source>
<translation>Speichern</translation>
</message>
<message>
<location filename="../../mainwindow.py" line="303"/>
<location filename="../../mainwindow.py" line="313"/>
<source>Discard Changes</source>
<translation>Änderungen Verwerfen</translation>
</message>
@ -75,17 +75,17 @@
<context>
<name>Launcher</name>
<message>
<location filename="../../opensessioncontroller.py" line="416"/>
<location filename="../../opensessioncontroller.py" line="421"/>
<source>Name</source>
<translation>Name</translation>
</message>
<message>
<location filename="../../opensessioncontroller.py" line="417"/>
<location filename="../../opensessioncontroller.py" line="422"/>
<source>Description</source>
<translation>Beschreibung</translation>
</message>
<message>
<location filename="../../opensessioncontroller.py" line="418"/>
<location filename="../../opensessioncontroller.py" line="423"/>
<source>Path</source>
<translation>Pfad</translation>
</message>
@ -446,32 +446,32 @@ Für Notizen, TODO, Referenzen, Quellen etc…</translation>
<translation>(Befehl nicht gefunden)</translation>
</message>
<message>
<location filename="../../opensessioncontroller.py" line="138"/>
<location filename="../../opensessioncontroller.py" line="140"/>
<source>Name</source>
<translation>Name</translation>
</message>
<message>
<location filename="../../opensessioncontroller.py" line="139"/>
<location filename="../../opensessioncontroller.py" line="141"/>
<source>Label</source>
<translation>Label</translation>
</message>
<message>
<location filename="../../opensessioncontroller.py" line="140"/>
<location filename="../../opensessioncontroller.py" line="142"/>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<location filename="../../opensessioncontroller.py" line="141"/>
<location filename="../../opensessioncontroller.py" line="143"/>
<source>Visible</source>
<translation>Sichtbarkeit</translation>
</message>
<message>
<location filename="../../opensessioncontroller.py" line="142"/>
<location filename="../../opensessioncontroller.py" line="144"/>
<source>Changes</source>
<translation>Änderungen</translation>
</message>
<message>
<location filename="../../opensessioncontroller.py" line="143"/>
<location filename="../../opensessioncontroller.py" line="145"/>
<source>ID</source>
<translation>ID</translation>
</message>
@ -631,40 +631,50 @@ Für Notizen, TODO, Referenzen, Quellen etc…</translation>
<context>
<name>TrayIcon</name>
<message>
<location filename="../../systemtray.py" line="64"/>
<location filename="../../systemtray.py" line="65"/>
<source>Hide/Show Argodejo</source>
<translation>Verstecke/Zeige Argodejo</translation>
</message>
<message>
<location filename="../../systemtray.py" line="77"/>
<location filename="../../systemtray.py" line="79"/>
<source>Save &amp;&amp; Quit Argodejo</source>
<translation>Speichern und Argodejo Beenden</translation>
</message>
<message>
<location filename="../../systemtray.py" line="78"/>
<source>Abort &amp;&amp; Quit Argodejo</source>
<translation>Abbrechen und Argodejo Beenden</translation>
<translation type="obsolete">Abbrechen und Argodejo Beenden</translation>
</message>
<message>
<location filename="../../systemtray.py" line="84"/>
<location filename="../../systemtray.py" line="86"/>
<source>Quit </source>
<translation>Beenden </translation>
</message>
<message>
<location filename="../../systemtray.py" line="71"/>
<source>Add Client (Prompt)</source>
<translation>Programm hinzufügen (Prompt)</translation>
</message>
<message>
<location filename="../../systemtray.py" line="80"/>
<source>Close without Saving &amp;&amp; Quit Argodejo</source>
<translation>Schließen ohne zu Speichern &amp;&amp; Argodejo beenden</translation>
</message>
</context>
<context>
<name>mainWindow</name>
<message>
<location filename="../../mainwindow.py" line="188"/>
<location filename="../../mainwindow.py" line="198"/>
<source>Argodejo ready</source>
<translation>Argodejo ist bereit</translation>
</message>
<message>
<location filename="../../mainwindow.py" line="223"/>
<location filename="../../mainwindow.py" line="233"/>
<source>Another GUI tried to launch.</source>
<translation>Es wurde versucht eine weitere GUI zu starten.</translation>
</message>
<message>
<location filename="../../mainwindow.py" line="251"/>
<location filename="../../mainwindow.py" line="261"/>
<source>Updating Program Database.
Thank you for your patience.</source>
<translation>Programmdatenbank wird aktualisiert.

12
qtgui/systemtray.py

@ -28,6 +28,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
import engine.api as api #This loads the engine and starts a session.
#QtGui
from .addclientprompt import askForExecutable
from .resources import *
class SystemTray(QtWidgets.QSystemTrayIcon):
@ -65,17 +66,18 @@ class SystemTray(QtWidgets.QSystemTrayIcon):
menu.addSeparator()
#Add other pre-defined actions
if nsmSessionName:
if nsmSessionName: #We are in a loaded session
menu.addAction(self.mainWindow.ui.actionShow_All_Clients)
_add(QtCore.QCoreApplication.translate("TrayIcon", "Add Client (Prompt)"), lambda: askForExecutable(self.mainWindow.qtApp.desktop()))
menu.addSeparator()
menu.addAction(self.mainWindow.ui.actionShow_All_Clients)
menu.addAction(self.mainWindow.ui.actionHide_All_Clients)
menu.addSeparator()
if nsmSessionName: #We are in a loaded session
_add(QtCore.QCoreApplication.translate("TrayIcon", "Save && Close {}".format(nsmSessionName)), api.sessionClose)
_add(QtCore.QCoreApplication.translate("TrayIcon", "Abort {}".format(nsmSessionName)), api.sessionAbort)
_add(QtCore.QCoreApplication.translate("TrayIcon", "Close without Saving {}".format(nsmSessionName)), api.sessionAbort)
menu.addSeparator()
_add(QtCore.QCoreApplication.translate("TrayIcon", "Save && Quit Argodejo"), self.mainWindow.closeAndQuit)
_add(QtCore.QCoreApplication.translate("TrayIcon", "Abort && Quit Argodejo"), self.mainWindow.abortAndQuit)
_add(QtCore.QCoreApplication.translate("TrayIcon", "Close without Saving && Quit Argodejo"), self.mainWindow.abortAndQuit)
menu.addSeparator()
else:
for recentName in self.mainWindow.recentlyOpenedSessions.get():

Loading…
Cancel
Save