示例#1
0
 def execute(self, *args):
     if self.appExec:
         if self.useTerminal:
             cmd = "x-terminal-emulator -e \"" + self.appExec + "\""
             if os.path.exists("/usr/bin/mate-terminal"):
                 cmd = "mate-terminal -e \"" + self.appExec + "\""
             Execute(cmd, self.appPath)
         else:
             Execute(None, desktopFile=self.desktopFile)
示例#2
0
 def ButtonReleased(self, w, ev, ev2):
     if ev.button == 1:
         if not hasattr(self, "press_x") or \
                 not w.drag_check_threshold(int(self.press_x),
                                             int(self.press_y),
                                             int(ev.x),
                                             int(ev.y)):
             if self.Win.pinmenu == False:
                 self.Win.wTree.get_widget("window1").hide()
             if "applications" in self.Win.plugins:
                 self.Win.plugins["applications"].wTree.get_widget("entry1").grab_focus()
             Execute(w, self.Exec)
示例#3
0
 def uninstall(self, *args):
     Execute("mint-remove-application " + self.desktopFile)
示例#4
0
 def ButtonClicked(self, widget, Exec):
     self.mintMenuWin.hide()
     if Exec:
         Execute(Exec)
示例#5
0
 def showMenuEditor(self, action, userdata=None):
     if os.path.exists("/usr/bin/mozo"):
         Execute("mozo")
     elif os.path.exists("/usr/bin/menulibre"):
         Execute("menulibre")
示例#6
0
 def showPreferences(self, action, userdata=None):
     Execute("/usr/lib/linuxmint/mintMenu/preferences.py")
示例#7
0
 def showMenuEditor(self, action, userdata=None):
     Execute("mozo")
示例#8
0
 def showPreferences(self, action, userdata=None):
     # Execute("mateconf-editor /apps/mintMenu")
     Execute(os.path.join(PATH, "mintMenuConfig.py"))