diff options
| author | Michael Vogt <egon@top> | 2005-12-12 12:32:30 +0100 |
|---|---|---|
| committer | Michael Vogt <egon@top> | 2005-12-12 12:32:30 +0100 |
| commit | b070222e78249be7956b80603fe8f7da7302d989 (patch) | |
| tree | 27823e8a9ced84f7381957faf439a48cb568f8bb /UpdateManager | |
| parent | 333fa1f25afbfa3e634baaa1da5936ee6dd6a83d (diff) | |
| download | python-apt-b070222e78249be7956b80603fe8f7da7302d989.tar.gz | |
* SoftwareProperties/SoftwareProperties.py:
- small fixes to make it easy to embedd the software properties
* UpdateManager.py:
- don't "call" gnome-software-properties but import it and run
it as part of update-manager
* channels/Ubuntu.info.in:
- remove certain translations flags
Diffstat (limited to 'UpdateManager')
| -rw-r--r-- | UpdateManager/UpdateManager.py | 56 |
1 files changed, 38 insertions, 18 deletions
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index ba6c5565..99126e79 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -577,27 +577,47 @@ class UpdateManager(SimpleGladeApp): """ start gnome-software preferences """ # args: "-n" means we take care of the reloading of the # package list ourself - apt_pkg.PkgSystemUnLock() - args = ['/usr/bin/gnome-software-properties', '-n'] - child = subprocess.Popen(args) - self.window_main.set_sensitive(False) - res = None - while res == None: - res = child.poll() - time.sleep(0.05) - while gtk.events_pending(): - gtk.main_iteration() + #apt_pkg.PkgSystemUnLock() + #args = ['/usr/bin/gnome-software-properties', '-n'] + #child = subprocess.Popen(args) + #self.window_main.set_sensitive(False) + #res = None + #while res == None: + # res = child.poll() + # time.sleep(0.05) + ## while gtk.events_pending(): + # gtk.main_iteration() # repository information changed, call "reload" - try: - apt_pkg.PkgSystemLock() - except SystemError: - print "Error geting the cache" - apt_pkg.PkgSystemLock() - if res > 0: - self.on_button_reload_clicked(None) + #try: + # apt_pkg.PkgSystemLock() + #except SystemError: + # print "Error geting the cache" + # apt_pkg.PkgSystemLock() + # if res > 0: + # self.on_button_reload_clicked(None) + # self.window_main.set_sensitive(True) + self.window_main.set_sensitive(False) + from SoftwareProperties import SoftwareProperties + prop = SoftwareProperties(self.datadir, None) + prop.window_main.set_transient_for(self.window_main) + prop.run() + prop.window_main.hide() + if prop.modified: + primary = "<span weight=\"bold\" size=\"larger\">%s</span>" % \ + _("Repositories changed") + secondary = _("You need to reload the package list from the servers " + "for your changes to take effect. Do you want to do " + "this now?") + dialog = gtk.MessageDialog(self.window_main,gtk.DIALOG_MODAL, + gtk.MESSAGE_INFO,gtk.BUTTONS_YES_NO,"") + dialog.set_markup(primary); + dialog.format_secondary_text(secondary); + res = dialog.run() + dialog.destroy() + if res == gtk.RESPONSE_YES: + self.on_button_reload_clicked(None) self.window_main.set_sensitive(True) - def fillstore(self): # clean most objects |
