def on_save_button_clicked(self, wiget): text = self.textview.get_text().strip() if proxy.edit_file(self.textview.get_path(), text) == "error": ErrorDialog(_("Please check the permission of the sources.list file"), title=_("Save failed!")).launch() else: self.save_button.set_sensitive(False) self.redo_button.set_sensitive(False) self.refresh_button.set_sensitive(True) self.notify_mainwindow() self.notify_sourcecenter()
def on_save_button_clicked(self, wiget): text = self.textview.get_text().strip() if proxy.edit_file(self.textview.get_path(), text) == 'error': ErrorDialog(_('Please check the permission of the sources.list file'), title=_('Save failed!')).launch() else: self.save_button.set_sensitive(False) self.redo_button.set_sensitive(False) self.refresh_button.set_sensitive(True) self.emit('call', 'mainwindow', 'get_notify', {}) self.emit('update', 'thirdsoft', 'update_thirdparty')
def on_save_button_clicked(self, wiget): text = self.textview.get_text().strip() if proxy.edit_file(self.textview.get_path(), text) == 'error': ErrorDialog( _('Please check the permission of the sources.list file'), title=_('Save failed!')).launch() else: self.save_button.set_sensitive(False) self.redo_button.set_sensitive(False) self.refresh_button.set_sensitive(True) self.notify_mainwindow() self.notify_sourcecenter()