summaryrefslogtreecommitdiffstats
path: root/examples/xmlmenudemo.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/xmlmenudemo.py')
-rw-r--r--examples/xmlmenudemo.py31
1 files changed, 13 insertions, 18 deletions
diff --git a/examples/xmlmenudemo.py b/examples/xmlmenudemo.py
index 9eacb37..ce92bd3 100644
--- a/examples/xmlmenudemo.py
+++ b/examples/xmlmenudemo.py
@@ -1,6 +1,6 @@
"""
This template constructs an application with menus, toolbar and statusbar.
-It uses KDE classes and methods that simplify the task of building and
+It uses TDE classes and methods that simplify the task of building and
operating a GUI. It is recommended that this approach be used, rather
than the primitive approach in menuapp1.py
"""
@@ -35,10 +35,6 @@ copyright holder.
"""
-False = 0
-True = not False
-
-
import sys, os
from PyTQt.qt import TQPopupMenu, SIGNAL, TQLabel, TQIconSet
@@ -53,7 +49,7 @@ STATUSBAR_RIGHT = 3
class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (TDEMainWindow.__init__, (self,) + args)
+ TDEMainWindow.__init__(self, *args)
self.initActions ()
self.setGeometry (0, 0, 350, 200)
@@ -143,8 +139,8 @@ class MainWin (TDEMainWindow):
# By using KStdAction here, the XMLGUI mechanism will automatically
# create a 'View' menu and insert "Zoom In" and "Zoom Out" objects
# in it. This happens because before parsing our *ui.rc file,
- # the standard KDE file config/ui/ui_standards.rc is parsed, and
- # then our *ui.rc file is merged with the result - this gives KDE
+ # the standard TDE file config/ui/ui_standards.rc is parsed, and
+ # then our *ui.rc file is merged with the result - this gives TDE
# menus and toolBars a standard "look" and item placement (including
# separators). Creating the KStdActions alone is sufficient - you
# could delete their references from the *ui.rc file and the menu
@@ -268,24 +264,23 @@ class MainWin (TDEMainWindow):
#-------------------- main ------------------------------------------------
-description = "A basic application template"
-version = "1.0"
-
+description = b"A basic application template"
+version = b"1.0"
# The appName (xmlmenudemo - first argument) is required
# if the program is to automatically locate it *ui.rc file
-aboutData = TDEAboutData ("xmlmenudemo", "xmlmenudemo",\
+aboutData = TDEAboutData (b"xmlmenudemo", b"xmlmenudemo",\
version, description, TDEAboutData.License_GPL,\
- "(C) 2003 whoever the author is")
+ b"(C) 2003 whoever the author is")
-aboutData.addAuthor ("author1", "whatever they did", "email@somedomain")
-aboutData.addAuthor ("author2", "they did something else", "[email protected]")
+aboutData.addAuthor (b"author1", b"whatever they did", b"email@somedomain")
+aboutData.addAuthor (b"author2", b"they did something else", b"[email protected]")
mainpath = os.path.dirname (os.path.abspath (sys.argv[0]))
-TDECmdLineArgs.init (sys.argv, aboutData)
-TDECmdLineArgs.addCmdLineOptions ([("+files", "File to open")])
+TDECmdLineArgs.init (sys.argv, aboutData)
+TDECmdLineArgs.addCmdLineOptions ([(b"+files", b"File to open")])
app = TDEApplication ()
-mainWindow = MainWin (None, "main window")
+mainWindow = MainWin (None, b"main window")
mainWindow.show()
app.exec_loop()