Esempio n. 1
0
        def __load_info_view_log(self):
                textbuffer = self.w_log_info_textview.get_buffer()
                textbuffer.set_text("")
                textiter = textbuffer.get_end_iter()
                log_info_ext = gui_misc.get_log_info_ext()
                pm_info_log = gui_misc.get_log_path(gui_misc.get_pm_name()) + log_info_ext
                wi_info_log = gui_misc.get_log_path(gui_misc.get_wi_name()) + log_info_ext
                um_info_log = gui_misc.get_log_path(gui_misc.get_um_name()) + log_info_ext

                self.__write_to_view_log(um_info_log,
                    textbuffer, textiter, _("None: ") + gui_misc.get_um_name() + "\n")
                self.__write_to_view_log(wi_info_log,
                    textbuffer, textiter, _("None: ") + gui_misc.get_wi_name() + "\n")
                self.__write_to_view_log(pm_info_log,
                    textbuffer, textiter, _("None: ") + gui_misc.get_pm_name() + "\n")
                gobject.idle_add(self.w_log_info_textview.scroll_to_iter, textiter, 0.0)
Esempio n. 2
0
        def __init__(self, image_directory, application_path):
                global_settings.client_name = gui_misc.get_um_name()
                self.api_lock = nrlock.NRLock()
                self.image_dir_arg = image_directory
                if self.image_dir_arg == None:
                        self.image_dir_arg = gui_misc.get_image_path()
                self.application_path = application_path
                self.gconf = pmgconf.PMGConf()
                try:
                        self.application_dir = os.environ["PACKAGE_MANAGER_ROOT"]
                except KeyError:
                        self.application_dir = "/"
                misc.setlocale(locale.LC_ALL, "")
                for module in (gettext, gtk.glade):
                        module.bindtextdomain("pkg", os.path.join(
                            self.application_dir,
                            "usr/share/locale"))
                        module.textdomain("pkg")
                gui_misc.init_for_help(self.application_dir)

                self.icon_theme = gtk.icon_theme_get_default()
                pkg_icon_location = os.path.join(self.application_dir, PKG_ICON_LOCATION)
                self.icon_theme.append_search_path(pkg_icon_location)
                icon_location = os.path.join(self.application_dir, ICON_LOCATION)
                self.icon_theme.append_search_path(icon_location)
                self.progress_tracker = progress.NullProgressTracker()
                self.api_obj = None
                self.installupdate = None
                self.return_status = enumerations.UPDATES_UNDETERMINED
                self.pylintstub = None
                
                gui_misc.setup_logging()
                gobject.idle_add(self.__do_image_update)
Esempio n. 3
0
        def __load_info_view_log(self):
                textbuffer = self.w_log_info_textview.get_buffer()
                textbuffer.set_text("")
                textiter = textbuffer.get_end_iter()
                log_dir = gui_misc.get_log_dir()
                log_info_ext = gui_misc.get_log_info_ext()
                pm_info_log = os.path.join(log_dir, gui_misc.get_pm_name() + log_info_ext)
                wi_info_log = os.path.join(log_dir, gui_misc.get_wi_name() + log_info_ext)
                um_info_log = os.path.join(log_dir, gui_misc.get_um_name() + log_info_ext)

                self.__write_to_view_log(um_info_log,
                    textbuffer, textiter, _("None: ") + gui_misc.get_um_name() + "\n")
                self.__write_to_view_log(wi_info_log,
                    textbuffer, textiter, _("None: ") + gui_misc.get_wi_name() + "\n")
                self.__write_to_view_log(pm_info_log,
                    textbuffer, textiter, _("None: ") + gui_misc.get_pm_name() + "\n")
                gobject.idle_add(self.w_log_info_textview.scroll_to_iter, textiter, 0.0)
Esempio n. 4
0
    def __init__(self, image_directory, application_path):
        global_settings.client_name = gui_misc.get_um_name()
        self.api_lock = nrlock.NRLock()
        self.image_dir_arg = image_directory
        self.exact_match = True
        if self.image_dir_arg == None:
            self.image_dir_arg, self.exact_match = api.get_default_image_root()
        if not self.exact_match:
            if debug:
                print >>sys.stderr, ("Unable to get the image directory")
            sys.exit(enumerations.UPDATES_UNDETERMINED)
        self.application_path = application_path
        self.gconf = pmgconf.PMGConf()
        try:
            self.application_dir = os.environ["PACKAGE_MANAGER_ROOT"]
        except KeyError:
            self.application_dir = "/"
        misc.setlocale(locale.LC_ALL, "")
        for module in (gettext, gtk.glade):
            module.bindtextdomain("pkg", os.path.join(self.application_dir, "usr/share/locale"))
            module.textdomain("pkg")
        gui_misc.init_for_help(self.application_dir)

        self.icon_theme = gtk.icon_theme_get_default()
        pkg_icon_location = os.path.join(self.application_dir, PKG_ICON_LOCATION)
        self.icon_theme.append_search_path(pkg_icon_location)
        icon_location = os.path.join(self.application_dir, ICON_LOCATION)
        self.icon_theme.append_search_path(icon_location)
        self.progress_tracker = progress.NullProgressTracker()
        self.api_obj = None
        self.installupdate = None
        self.return_status = enumerations.UPDATES_UNDETERMINED
        self.pylintstub = None

        gui_misc.setup_logging()
        gobject.idle_add(self.__do_image_update)
Esempio n. 5
0
 def __clear_logs(self, ext):
         self.__clear_log(gui_misc.get_log_path(gui_misc.get_pm_name()) + ext)
         self.__clear_log(gui_misc.get_log_path(gui_misc.get_wi_name()) + ext)
         self.__clear_log(gui_misc.get_log_path(gui_misc.get_um_name()) + ext)
Esempio n. 6
0
 def __clear_logs(self, log_dir, ext):
         self.__clear_log(os.path.join(log_dir, gui_misc.get_pm_name() + ext))
         self.__clear_log(os.path.join(log_dir, gui_misc.get_wi_name() + ext))
         self.__clear_log(os.path.join(log_dir, gui_misc.get_um_name() + ext))