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)
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)
def uninstall(self, *args): Execute("mint-remove-application " + self.desktopFile)
def ButtonClicked(self, widget, Exec): self.mintMenuWin.hide() if Exec: Execute(Exec)
def showMenuEditor(self, action, userdata=None): if os.path.exists("/usr/bin/mozo"): Execute("mozo") elif os.path.exists("/usr/bin/menulibre"): Execute("menulibre")
def showPreferences(self, action, userdata=None): Execute("/usr/lib/linuxmint/mintMenu/preferences.py")
def showMenuEditor(self, action, userdata=None): Execute("mozo")
def showPreferences(self, action, userdata=None): # Execute("mateconf-editor /apps/mintMenu") Execute(os.path.join(PATH, "mintMenuConfig.py"))