Commits

Anonymous committed 718e7f1

Some refacotring in the battle for execution speed.

  • Participants
  • Parent commits 23bc696

Comments (0)

Files changed (2)

 # First the GUI class and the Data about the program
 from rad import Rad
 from rad import aboutData
-from rad import version as __version__
+from rad import __version__
 
 # Then commandline arguments and handling
 from sys import argv
-
 from PyKDE4.kdecore import KCmdLineArgs
 
 # KApplication for basics
 
 # This also allows our users to use DrKonqui for crash recovery.
 
-appName     = "pyRad"
-catalog     = ""
-programName = ki18n ("Rad")
-version     = "0.2.0"
-description = ki18n ("A simple radial command menu - best called with a gesture")
-license     = KAboutData.License_GPL
-copyright   = ki18n ("(c) 2009 Arne Babenhauserheide")
-text        = ki18n ("pyRad is heavily inspired by Kommando, which sadly didn't make it into KDE4. Kommando in turn was inspired by the Neverwinternights menu.")
-homePage    = "draketo.de"
-bugEmail    = "arne_bab@web.de"
+#: The PyRad version identifier
+__version__ = "0.2.0"
+#: The name of the program - used in the window name
+__appname__ = "pyRad"
 
-aboutData   = KAboutData (appName, catalog, programName, version, description,
+def createAboutData():
+    """Create the aboutData for PyRad."""
+    appName     = __appname__
+    catalog     = ""
+    programName = ki18n ("Rad")
+    version     = __version__
+    description = ki18n ("A simple radial command menu - best called with a gesture")
+    license     = KAboutData.License_GPL
+    copyright   = ki18n ("(c) 2009 Arne Babenhauserheide")
+    text        = ki18n ("pyRad is heavily inspired by Kommando, which sadly didn't make it into KDE4. Kommando in turn was inspired by the Neverwinternights menu.")
+    homePage    = "draketo.de"
+    bugEmail    = "arne_bab@web.de"
+
+    aboutData   = KAboutData (appName, catalog, programName, version, description,
                         license, copyright, text, homePage, bugEmail)
+    return aboutData
+
+# create the aboutData object
+#aboutData = createAboutData()
 
 ### Window ###
 
 
         # Move below the cursor
         self.move_to_cursor()
-        self.setWindowTitle(appName)
+        self.setWindowTitle(__appname__)
 
         # Make sure we get focus events
         self.setFocusPolicy(Qt.StrongFocus)