def set_modal_and_transient(self, parent_window): gui_misc.set_modal_and_transient(self.w_view_log_dialog, parent_window)
def set_modal_and_transient(self, parent_window): gui_misc.set_modal_and_transient(self.w_preferencesdialog, parent_window)
def __init__(self, parent): self.parent = parent if not bootenv.BootEnv.libbe_exists(): msg = _("The <b>libbe</b> library was not " "found on your system." "\nAll functions for managing Boot Environments are disabled") msgbox = gtk.MessageDialog( buttons = gtk.BUTTONS_CLOSE, flags = gtk.DIALOG_MODAL, type = gtk.MESSAGE_INFO, message_format = None) msgbox.set_markup(msg) msgbox.set_title(_("BE management")) msgbox.run() msgbox.destroy() return self.be_list = \ gtk.ListStore( gobject.TYPE_INT, # BE_ID gobject.TYPE_BOOLEAN, # BE_MARKED gobject.TYPE_STRING, # BE_NAME gobject.TYPE_STRING, # BE_ORIG_NAME gobject.TYPE_STRING, # BE_DATE_TIME gtk.gdk.Pixbuf, # BE_CURRENT_PIXBUF gobject.TYPE_BOOLEAN, # BE_ACTIVE_DEFAULT gobject.TYPE_STRING, # BE_SIZE gobject.TYPE_BOOLEAN, # BE_EDITABLE ) self.progress_stop_thread = False self.initial_active = 0 self.initial_default = 0 gladefile = os.path.join(self.parent.application_dir, "usr/share/package-manager/packagemanager.ui") builder = gtk.Builder() builder.add_from_file(gladefile) self.w_beadmin_dialog = builder.get_object("beadmin") self.w_beadmin_dialog.set_icon(self.parent.window_icon) self.w_be_treeview = builder.get_object("betreeview") self.w_help_button = builder.get_object("help_bebutton") self.w_cancel_button = builder.get_object("cancelbebutton") self.w_ok_button = builder.get_object("okbebutton") w_active_gtkimage = builder.get_object("activebeimage") self.w_progress_dialog = builder.get_object("progressdialog") self.w_progress_dialog.connect('delete-event', lambda stub1, stub2: True) self.w_progress_dialog.set_icon(self.parent.window_icon) self.w_progressinfo_label = builder.get_object("progressinfo") progress_button = builder.get_object("progresscancel") self.w_progressbar = builder.get_object("progressbar") # Dialog reused in the repository.py self.w_beconfirmation_dialog = \ builder.get_object("confirmationdialog") self.w_beconfirmation_dialog.set_icon(self.parent.window_icon) self.w_beconfirmation_textview = \ builder.get_object("confirmtext") self.w_okbe_button = builder.get_object("ok_conf") self.w_cancelbe_button = builder.get_object("cancel_conf") self.w_ok_button.set_sensitive(False) progress_button.hide() self.w_progressbar.set_pulse_step(0.1) self.list_filter = self.be_list.filter_new() self.w_be_treeview.set_model(self.list_filter) self.__init_tree_views() self.active_image = gui_misc.get_icon( self.parent.icon_theme, "status_checkmark") w_active_gtkimage.set_from_pixbuf(self.active_image) bebuffer = self.w_beconfirmation_textview.get_buffer() bebuffer.create_tag("bold", weight=pango.WEIGHT_BOLD) self.__setup_signals() sel = self.w_be_treeview.get_selection() self.w_cancel_button.grab_focus() sel.set_mode(gtk.SELECTION_SINGLE) self.w_beconfirmation_dialog.set_title( _("Boot Environment Confirmation")) gui_misc.set_modal_and_transient(self.w_beadmin_dialog, self.parent.w_main_window) self.parent.child = self self.w_beadmin_dialog.show_all() self.w_progress_dialog.set_title( _("Loading Boot Environment Information")) self.w_progressinfo_label.set_text( _("Fetching BE entries...")) self.w_progress_dialog.show() Thread(target = self.__progress_pulse).start() Thread(target = self.__prepare_beadmin_list).start()
def set_modal_and_transient(self, parent_window): gui_misc.set_modal_and_transient(self.w_version_info_dialog, parent_window)
def set_modal_and_transient(self, parent_window): gui_misc.set_modal_and_transient(self.api_search_error_dialog, parent_window)
def set_modal_and_transient(self, parent_window): self.parent_window = parent_window gui_misc.set_modal_and_transient(self.w_exportconfirm_dialog, parent_window)
def __init__(self, parent): self.parent = parent if not bootenv.BootEnv.libbe_exists(): msg = _( "The <b>libbe</b> library was not " "found on your system." "\nAll functions for managing Boot Environments are disabled") msgbox = gtk.MessageDialog(buttons=gtk.BUTTONS_CLOSE, flags=gtk.DIALOG_MODAL, type=gtk.MESSAGE_INFO, message_format=None) msgbox.set_markup(msg) msgbox.set_title(_("BE management")) msgbox.run() msgbox.destroy() return self.be_list = \ gtk.ListStore( gobject.TYPE_INT, # BE_ID gobject.TYPE_BOOLEAN, # BE_MARKED gobject.TYPE_STRING, # BE_NAME gobject.TYPE_STRING, # BE_ORIG_NAME gobject.TYPE_STRING, # BE_DATE_TIME gtk.gdk.Pixbuf, # BE_CURRENT_PIXBUF gobject.TYPE_BOOLEAN, # BE_ACTIVE_DEFAULT gobject.TYPE_STRING, # BE_SIZE gobject.TYPE_BOOLEAN, # BE_EDITABLE ) self.progress_stop_thread = False self.initial_active = 0 self.initial_default = 0 gladefile = os.path.join( self.parent.application_dir, "usr/share/package-manager/packagemanager.ui") builder = gtk.Builder() builder.add_from_file(gladefile) self.w_beadmin_dialog = builder.get_object("beadmin") self.w_beadmin_dialog.set_icon(self.parent.window_icon) self.w_be_treeview = builder.get_object("betreeview") self.w_help_button = builder.get_object("help_bebutton") self.w_cancel_button = builder.get_object("cancelbebutton") self.w_ok_button = builder.get_object("okbebutton") w_active_gtkimage = builder.get_object("activebeimage") self.w_progress_dialog = builder.get_object("progressdialog") self.w_progress_dialog.connect('delete-event', lambda stub1, stub2: True) self.w_progress_dialog.set_icon(self.parent.window_icon) self.w_progressinfo_label = builder.get_object("progressinfo") progress_button = builder.get_object("progresscancel") self.w_progressbar = builder.get_object("progressbar") # Dialog reused in the repository.py self.w_beconfirmation_dialog = \ builder.get_object("confirmationdialog") self.w_beconfirmation_dialog.set_icon(self.parent.window_icon) self.w_beconfirmation_textview = \ builder.get_object("confirmtext") self.w_okbe_button = builder.get_object("ok_conf") self.w_cancelbe_button = builder.get_object("cancel_conf") self.w_ok_button.set_sensitive(False) progress_button.hide() self.w_progressbar.set_pulse_step(0.1) self.list_filter = self.be_list.filter_new() self.w_be_treeview.set_model(self.list_filter) self.__init_tree_views() self.active_image = gui_misc.get_icon(self.parent.icon_theme, "status_checkmark") w_active_gtkimage.set_from_pixbuf(self.active_image) bebuffer = self.w_beconfirmation_textview.get_buffer() bebuffer.create_tag("bold", weight=pango.WEIGHT_BOLD) self.__setup_signals() sel = self.w_be_treeview.get_selection() self.w_cancel_button.grab_focus() sel.set_mode(gtk.SELECTION_SINGLE) self.w_beconfirmation_dialog.set_title( _("Boot Environment Confirmation")) gui_misc.set_modal_and_transient(self.w_beadmin_dialog, self.parent.w_main_window) self.parent.child = self self.w_beadmin_dialog.show_all() self.w_progress_dialog.set_title( _("Loading Boot Environment Information")) self.w_progressinfo_label.set_text(_("Fetching BE entries...")) self.w_progress_dialog.show() Thread(target=self.__progress_pulse).start() Thread(target=self.__prepare_beadmin_list).start()
def __init__(self, parent, dialog_icon, parent_window): if not bootenv.BootEnv.libbe_exists(): msg = _("The <b>libbe</b> library was not " "found on your system.") msgbox = gtk.MessageDialog( buttons = gtk.BUTTONS_CLOSE, flags = gtk.DIALOG_MODAL, type = gtk.MESSAGE_INFO, message_format = None) msgbox.set_markup(msg) msgbox.set_title(_("Rename BE")) msgbox.run() msgbox.destroy() return # Before performing update all (image-update) task, we are storing # the active on reboot be name. If the be name after update is different # it means that new BE was created and we can show BE rename dialog # otherwise we can show update completed dialog. # Also we need to store original BE name to work-around the bug: 6472202 self.active_be_before_update_all = self.__get_activated_be_name() self.parent = parent self.stop_progress_bouncing = False self.stopped_bouncing_progress = True builder = gtk.Builder() gladefile = os.path.join(self.parent.application_dir, "usr/share/package-manager/packagemanager.ui") builder.add_from_file(gladefile) self.w_ua_completed_dialog = \ builder.get_object("ua_completed_dialog") self.w_ua_be_entry = \ builder.get_object("ua_be_entry") self.w_ua_release_notes_button = \ builder.get_object("release_notes_button") self.w_be_error_label = \ builder.get_object("be_error_label") self.w_ua_help_button = \ builder.get_object("ua_help_button") self.w_ua_restart_later_button = \ builder.get_object("ua_restart_later_button") self.w_ua_restart_now_button = \ builder.get_object("ua_restart_now_button") self.w_ua_ok_image = \ builder.get_object("ua_ok_image") self.w_ua_whats_this_button = \ builder.get_object("ua_whats_this_button") self.w_ua_whats_this_button.set_tooltip_text(_( "A boot environment (BE) contains the operating\n" "system image and updated packages. The\n" "system will boot into the new BE on restart.")) self.w_progress_dialog = builder.get_object("progressdialog") self.w_progressinfo_label = builder.get_object("progressinfo") self.w_progress_cancel = builder.get_object("progresscancel") self.w_progressbar = builder.get_object("progressbar") self.w_progress_dialog.connect('delete-event', lambda stub1, stub2: True) self.w_progress_cancel.set_sensitive(False) self.w_progress_dialog.set_title(_("Rename BE")) self.w_progressinfo_label.set_text(_("Renaming BE, please wait...")) self.w_progress_dialog.set_icon(dialog_icon) self.w_ua_completed_dialog.set_icon(dialog_icon) checkmark_icon = gui_misc.get_icon( self.parent.icon_theme, "pm-check", 24) self.w_ua_ok_image.set_from_pixbuf(checkmark_icon) gui_misc.set_modal_and_transient(self.w_progress_dialog, parent_window) gui_misc.set_modal_and_transient(self.w_ua_completed_dialog, parent_window) self.__setup_signals()
def __init__(self, parent, dialog_icon, parent_window): if not bootenv.BootEnv.libbe_exists(): msg = _("The <b>libbe</b> library was not " "found on your system.") msgbox = gtk.MessageDialog(buttons=gtk.BUTTONS_CLOSE, flags=gtk.DIALOG_MODAL, type=gtk.MESSAGE_INFO, message_format=None) msgbox.set_markup(msg) msgbox.set_title(_("Rename BE")) msgbox.run() msgbox.destroy() return # Before performing update all (image-update) task, we are storing # the active on reboot be name. If the be name after update is different # it means that new BE was created and we can show BE rename dialog # otherwise we can show update completed dialog. # Also we need to store original BE name to work-around the bug: 6472202 self.active_be_before_update_all = self.__get_activated_be_name() self.parent = parent self.stop_progress_bouncing = False self.stopped_bouncing_progress = True builder = gtk.Builder() gladefile = os.path.join( self.parent.application_dir, "usr/share/package-manager/packagemanager.ui") builder.add_from_file(gladefile) self.w_ua_completed_dialog = \ builder.get_object("ua_completed_dialog") self.w_ua_be_entry = \ builder.get_object("ua_be_entry") self.w_ua_release_notes_button = \ builder.get_object("release_notes_button") self.w_be_error_label = \ builder.get_object("be_error_label") self.w_ua_help_button = \ builder.get_object("ua_help_button") self.w_ua_restart_later_button = \ builder.get_object("ua_restart_later_button") self.w_ua_restart_now_button = \ builder.get_object("ua_restart_now_button") self.w_ua_ok_image = \ builder.get_object("ua_ok_image") self.w_ua_whats_this_button = \ builder.get_object("ua_whats_this_button") self.w_ua_whats_this_button.set_tooltip_text( _("A boot environment (BE) contains the operating\n" "system image and updated packages. The\n" "system will boot into the new BE on restart.")) self.w_progress_dialog = builder.get_object("progressdialog") self.w_progressinfo_label = builder.get_object("progressinfo") self.w_progress_cancel = builder.get_object("progresscancel") self.w_progressbar = builder.get_object("progressbar") self.w_progress_dialog.connect('delete-event', lambda stub1, stub2: True) self.w_progress_cancel.set_sensitive(False) self.w_progress_dialog.set_title(_("Rename BE")) self.w_progressinfo_label.set_text(_("Renaming BE, please wait...")) self.w_progress_dialog.set_icon(dialog_icon) self.w_ua_completed_dialog.set_icon(dialog_icon) checkmark_icon = gui_misc.get_icon(self.parent.icon_theme, "pm-check", 24) self.w_ua_ok_image.set_from_pixbuf(checkmark_icon) gui_misc.set_modal_and_transient(self.w_progress_dialog, parent_window) gui_misc.set_modal_and_transient(self.w_ua_completed_dialog, parent_window) self.__setup_signals()