Commits

Anonymous committed 04f318e

Moved the definition of the items into the constants.

That way they can be saved and loaded more easily later on.

  • Participants
  • Parent commits 7af2f58

Comments (0)

Files changed (1)

 PROGRAM_ICON = "kreversi"
 CENTER_ICON = "kreversi"
 
+#: The items the menu should show in top-level (via folders this contains the whole of the wheel menu). 
+ITEMS = [(CENTER_ICON, None), # the center item
+                 ("kate","kate"), ("kmail","kmail"), ("kmix","kmix"), ("wesnoth","wesnoth"), # normal items
+                 ("krita","[(None, '" + CENTER_ICON + "')('gimp','gimp')]") # a folder with the center icon and only one real item
+                 ]
+
+
 ### About Info ###
 
 appName     = "pyRad"
 # http://techbase.kde.org/Development/Tutorials/Plasma/Python/GettingStarted
 
 class Rad(QWidget):
-    def __init__(self, parent=None, f=Qt.FramelessWindowHint): # , f=Qt.Dialog) would set an explicit window type.
+    def __init__(self, parent=None, f=Qt.FramelessWindowHint):
         """Create the Window."""
         QWidget.__init__(self, parent, f)
         # Quit when this window gets closed
 	icon = QIcon(self.iconloader.loadIcon(PROGRAM_ICON, 0))
 	self.setWindowIcon(icon)
 	
-        # Add a circle-list for all the icons
+        # Add a circle-list for all items
 	self.circle = []
 
-        items = [(CENTER_ICON, None), # the center item
-                 ("kate","kate"), ("kmail","kmail"), ("kmix","kmix"), ("wesnoth","wesnoth"), # normal items
-                 ("krita","[('gimp','gimp')]") # a folder
-                 ]
-		    
-	self.arrange_in_circle(items)
+        # And arrange them in a circle
+     	self.arrange_in_circle(ITEMS)
 	
  
     def focusOutEvent(self, event):