def __show_successful_with_logout_button(self, message): dialog = InfoDialog(message) button = gtk.Button(_('_Logout')) button.connect('clicked', self.on_logout_button_clicked, dialog) dialog.add_option_button(button) dialog.launch()
def on_refresh_button_clicked(self, widget): do_ppa_disable = False if self.ppa_button.get_active(): proxy.disable_ppa() do_ppa_disable = True UpdateCacheDialog(widget.get_toplevel()).run() PACKAGE_WORKER.update_apt_cache(True) new_updates = list(PACKAGE_WORKER.get_update_package()) if new_updates: self.updateview.get_model().clear() self.updateview.update_updates(new_updates) else: dialog = InfoDialog(_("Your system is clean and no updates are available."), title=_('Software information is now up-to-date')) dialog.launch() if do_ppa_disable: proxy.enable_ppa() self.emit('call', 'ubuntutweak.modules.sourcecenter', 'update_thirdparty', {}) self.emit('call', 'ubuntutweak.modules.sourceeditor', 'update_source_combo', {})