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 __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. 3
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. 4
0
        def __init__(self, image_dir):
                global_settings.client_name = gui_misc.get_wi_name()
                self.image_dir = image_dir
    
                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.pub_pkg_list = None
                self.pr = progress.NullProgressTracker()
                self.pub_new_tasks = []
                self.pkg_install_tasks = []
                self.icon_theme = gtk.icon_theme_get_default()
                icon_location = os.path.join(self.application_dir, ICON_LOCATION)
                self.icon_theme.append_search_path(icon_location)
                self.param = None
                self.disabled_pubs = {}
                self.repo_gui = None
                self.first_run = True

                # Webinstall Dialog
                builder = gtk.Builder()
                self.gladefile = os.path.join(self.application_dir,
                        "usr/share/package-manager/packagemanager.ui")
                builder.add_from_file(self.gladefile)
                self.w_webinstall_dialog = \
                        builder.get_object("webinstalldialog")
                
                self.w_webinstall_proceed = \
                        builder.get_object("proceed_button")
                self.w_webinstall_cancel = \
                        builder.get_object("cancel_button")
                self.w_webinstall_help = \
                        builder.get_object("help_button")
                self.w_webinstall_close = \
                        builder.get_object("close_button")
                self.w_webinstall_proceed_label = \
                        builder.get_object("proceed_new_repo_label")
                self.w_webinstall_toplabel = \
                        builder.get_object("webinstall_toplabel")
                self.w_webinstall_frame = \
                        builder.get_object("webinstall_frame")
                self.w_webinstall_image = \
                        builder.get_object("pkgimage")
                self.window_icon = gui_misc.get_icon(self.icon_theme, 
                    'packagemanager', 48)
                self.w_webinstall_image.set_from_pixbuf(self.window_icon)
                self.w_webinstall_info_label = \
                        builder.get_object("label19")

                self.w_webinstall_textview = \
                        builder.get_object("webinstall_textview")  
                infobuffer = self.w_webinstall_textview.get_buffer()
                infobuffer.create_tag("bold", weight=pango.WEIGHT_BOLD)
                infobuffer.create_tag("disabled", foreground="#757575") #Close to DimGrey

                self.__setup_signals()
 
                self.w_webinstall_dialog.set_icon(self.window_icon)
                self.api_o = gui_misc.get_api_object(self.image_dir, self.pr,
                    self.w_webinstall_dialog)
                gui_misc.setup_logging()
Esempio n. 5
0
    def __init__(self, image_dir):
        global_settings.client_name = gui_misc.get_wi_name()
        self.image_dir = image_dir

        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.pub_pkg_list = None
        self.pr = progress.NullProgressTracker()
        self.pub_new_tasks = []
        self.pkg_install_tasks = []
        self.icon_theme = gtk.icon_theme_get_default()
        icon_location = os.path.join(self.application_dir, ICON_LOCATION)
        self.icon_theme.append_search_path(icon_location)
        self.param = None
        self.disabled_pubs = {}
        self.repo_gui = None
        self.first_run = True

        # Webinstall Dialog
        builder = gtk.Builder()
        self.gladefile = os.path.join(
            self.application_dir,
            "usr/share/package-manager/packagemanager.ui")
        builder.add_from_file(self.gladefile)
        self.w_webinstall_dialog = \
                builder.get_object("webinstalldialog")

        self.w_webinstall_proceed = \
                builder.get_object("proceed_button")
        self.w_webinstall_cancel = \
                builder.get_object("cancel_button")
        self.w_webinstall_help = \
                builder.get_object("help_button")
        self.w_webinstall_close = \
                builder.get_object("close_button")
        self.w_webinstall_proceed_label = \
                builder.get_object("proceed_new_repo_label")
        self.w_webinstall_toplabel = \
                builder.get_object("webinstall_toplabel")
        self.w_webinstall_frame = \
                builder.get_object("webinstall_frame")
        self.w_webinstall_image = \
                builder.get_object("pkgimage")
        self.window_icon = gui_misc.get_icon(self.icon_theme, 'packagemanager',
                                             48)
        self.w_webinstall_image.set_from_pixbuf(self.window_icon)
        self.w_webinstall_info_label = \
                builder.get_object("label19")

        self.w_webinstall_textview = \
                builder.get_object("webinstall_textview")
        infobuffer = self.w_webinstall_textview.get_buffer()
        infobuffer.create_tag("bold", weight=pango.WEIGHT_BOLD)
        infobuffer.create_tag("disabled",
                              foreground="#757575")  #Close to DimGrey

        self.__setup_signals()

        self.w_webinstall_dialog.set_icon(self.window_icon)
        self.api_o = gui_misc.get_api_object(self.image_dir, self.pr,
                                             self.w_webinstall_dialog)
        gui_misc.setup_logging()
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))