예제 #1
0
    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()
예제 #2
0
    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()
예제 #3
0
    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)
예제 #4
0
    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)
예제 #5
0
 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 ()
예제 #6
0
 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()