def __show_preferences_cb(self, menu_item, user_data): if self.xml == None: self.xml = gtk.glade.XML(config.getGladedir() + "/preferences.glade") self.preferences = self.xml.get_widget("preferences_window") widget = self.xml.get_widget("close_button") widget.connect("clicked", self.__close_button_clicked_cb, None) self.__populate_preferences() self.preferences.show_all()
def create_menu(self): self.verbs = [("show_main", self.show_main_window), ("add", self.add_task), ("help", self.show_help), ("about", self.show_about)] #check for file in current dir if self.debug_flag: if os.access("gnome-schedule-applet.xml", os.F_OK): datadir = './' else: if os.access(config.getGladedir() + "/gnome-schedule-applet.xml", os.F_OK): datadir = config.getGladedir() else: print _("ERROR: Could not load menu xml file") datadir = '' quit() self.applet.setup_menu_from_file(datadir, "gnome-schedule-applet.xml", "gnome-schedule", self.verbs)
def create_menu(self): self.verbs = [ ("show_main", self.show_main_window), ("add", self.add_task), ("help", self.show_help), ("about", self.show_about), ] # check for file in current dir if self.debug_flag: if os.access("gnome-schedule-applet.xml", os.F_OK): datadir = "./" else: if os.access(config.getGladedir() + "/gnome-schedule-applet.xml", os.F_OK): datadir = config.getGladedir() else: print _("ERROR: Could not load menu xml file") datadir = "" quit() self.applet.setup_menu_from_file(datadir, "gnome-schedule-applet.xml", "gnome-schedule", self.verbs)
def __loadGlade__(self): if self.debug_flag: if os.access("gnome-schedule.glade", os.F_OK): try: self.xml = gtk.glade.XML ("gnome-schedule.glade", domain="gnome-schedule") except: print _("ERROR: Could not load glade file") quit () else: try: self.xml = gtk.glade.XML (config.getGladedir() + "/gnome-schedule.glade", domain="gnome-schedule") except: print _("ERROR: Could not load glade file") quit ()
def __loadGlade__(self): if self.debug_flag: if os.access("gnome-schedule.glade", os.F_OK): try: self.xml = gtk.glade.XML("gnome-schedule.glade", domain="gnome-schedule") except: print _("ERROR: Could not load glade file") quit() else: try: self.xml = gtk.glade.XML(config.getGladedir() + "/gnome-schedule.glade", domain="gnome-schedule") except: print _("ERROR: Could not load glade file") quit()