diff options
author | Michele Calgaro <[email protected]> | 2023-01-03 15:29:41 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-01-07 22:14:56 +0900 |
commit | 4ce11cc30df1805459a615960fdec204a975548a (patch) | |
tree | 084f1e1fa404bdf0d082b1a58acf392b5d177326 /templates/basic/systray.py | |
parent | 065f41b4908b11278d4334e8c85150ec0fd4a9f6 (diff) | |
download | pytde-4ce11cc30df1805459a615960fdec204a975548a.tar.gz pytde-4ce11cc30df1805459a615960fdec204a975548a.zip |
Drop python2 support.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'templates/basic/systray.py')
-rw-r--r-- | templates/basic/systray.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/templates/basic/systray.py b/templates/basic/systray.py index b4908b6..0e305b8 100644 --- a/templates/basic/systray.py +++ b/templates/basic/systray.py @@ -30,21 +30,32 @@ copyright holder. import sys from PyTQt.qt import TQWidget, SIGNAL -from tdecore import TDEApplication, TDEIcon, TDEIconLoader +from tdecore import TDEApplication, TDEIcon, TDEIconLoader, TDEAboutData, TDECmdLineArgs from tdeui import KSystemTray class MainWin (TQWidget): def __init__ (self, *args): - apply (TQWidget.__init__, (self,) + args) + TQWidget.__init__(self, *args) #-------------------- main ------------------------------------------------ def slotQuitSelected (): - TDEApplication.kApplication ().quit () + TDEApplication.kApplication().quit() -appName = "template" -app = TDEApplication (sys.argv, appName) +version = "1.0" +description = "A basic application template" +ad = TDEAboutData ("template", "Template App",\ + version, description, TDEAboutData.License_GPL_V2,\ + "(C) 2003 whoever the author is") + +ad.addAuthor ("author1", "whatever they did", "email@somedomain") +ad.addAuthor ("author2", "they did something else", "[email protected]") + +TDECmdLineArgs.init(["SysTrayApp"], ad) +TDECmdLineArgs.addCmdLineOptions ([("+files", "File to open", "")]) + +app = TDEApplication() mainWindow = MainWin (None, "main window") icons = TDEIconLoader () |