Пример #1
0
 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()
Пример #2
0
 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')
Пример #3
0
 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()