Moved addProfile action in createActions
[stack/code/dboxswitch.git] / gui.py
diff --git a/gui.py b/gui.py
index 5f16273..17a4e14 100755 (executable)
--- a/gui.py
+++ b/gui.py
@@ -89,6 +89,10 @@ class Gui(QtGui.QDialog):
         self.quitAction = QtGui.QAction("&Quit", self,
                 triggered=QtGui.qApp.quit)
 
+        #profile manager component
+        self.addProfile = QtGui.QAction("  Add &Profile  ", self,
+                triggered=self.addProfile, icon=QtGui.QIcon(appconf.icon))
+
 
     def createTrayIcon(self):
          """ Builds a new tray icon with a context menu and an action for the profile manager menu """
@@ -130,12 +134,9 @@ class Gui(QtGui.QDialog):
 
                 self.menuProfiles.addAction(menuItem_Profile)
 
-            #menuItem_Profile = self.menuProfiles.addAction("")
-            #self.menuProfiles.addAction(menuItem_Profile)
             self.menuProfiles.addSeparator()
-            menuItem_Profile = QtGui.QAction("  Add &Profile  ", self,
-            triggered=self.addProfile, icon=QtGui.QIcon(appconf.icon))
-            self.menuProfiles.addAction(menuItem_Profile)
+            #action and menu item for adding a New Profile
+            self.menuProfiles.addAction(self.addProfile)
 
             self.menuProfiles.activateWindow()
             self.menuProfiles.popup(QtGui.QCursor.pos())