diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/basic/basicapp.py | 2 | ||||
-rw-r--r-- | templates/basic/menuapp1.py | 6 | ||||
-rw-r--r-- | templates/basic/menuapp2.py | 6 | ||||
-rw-r--r-- | templates/basic/panelapplet.py | 1 | ||||
-rw-r--r-- | templates/basic/systray.py | 21 |
5 files changed, 20 insertions, 16 deletions
diff --git a/templates/basic/basicapp.py b/templates/basic/basicapp.py index 44858c9..4a897cc 100644 --- a/templates/basic/basicapp.py +++ b/templates/basic/basicapp.py @@ -54,5 +54,5 @@ TDECmdLineArgs.init (sys.argv, aboutData) app = TDEApplication () mainWindow = MainWin (None, "main window") mainWindow.show() -app.connect (app, SIGNAL ("lastWindowClosed ()"), app.quit) +app.connect (app, SIGNAL ("lastWindowClosed()"), app.quit) app.exec_loop() diff --git a/templates/basic/menuapp1.py b/templates/basic/menuapp1.py index 8f2d764..777ec91 100644 --- a/templates/basic/menuapp1.py +++ b/templates/basic/menuapp1.py @@ -36,10 +36,6 @@ copyright holder. """ -False = 0 -True = not False - - import sys from PyTQt.qt import TQPopupMenu, SIGNAL @@ -60,7 +56,7 @@ STATUSBAR_RIGHT = 3 class MainWin (TDEMainWindow): def __init__ (self, *args): - apply (TDEMainWindow.__init__, (self,) + args) + TDEMainWindow.__init__(self, *args) self.initMenus () self.initToolBar () diff --git a/templates/basic/menuapp2.py b/templates/basic/menuapp2.py index 6a3112d..beaa562 100644 --- a/templates/basic/menuapp2.py +++ b/templates/basic/menuapp2.py @@ -35,10 +35,6 @@ copyright holder. """ -False = 0 -True = not False - - import sys from PyTQt.qt import TQPopupMenu, SIGNAL @@ -52,7 +48,7 @@ STATUSBAR_RIGHT = 3 class MainWin (TDEMainWindow): def __init__ (self, *args): - apply (TDEMainWindow.__init__, (self,) + args) + TDEMainWindow.__init__(self, *args) self.initActions () self.initMenus () diff --git a/templates/basic/panelapplet.py b/templates/basic/panelapplet.py index 5c1ee15..caf5b75 100644 --- a/templates/basic/panelapplet.py +++ b/templates/basic/panelapplet.py @@ -31,6 +31,7 @@ dealings in this Software without prior written authorization from the copyright holder. """ +import PyTQt from tdeui import PyKPanelApplet, KPanelApplet 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", "another@email.address") + +TDECmdLineArgs.init(["SysTrayApp"], ad) +TDECmdLineArgs.addCmdLineOptions ([("+files", "File to open", "")]) + +app = TDEApplication() mainWindow = MainWin (None, "main window") icons = TDEIconLoader () |