summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-02-14 14:42:56 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2006-02-14 14:42:56 +0100
commita322dcddd7b886ecbdc5eaacec0b78a735d97428 (patch)
tree387804e5e5c1e6a5631a1a7f5e21fdfb335537c5
parentcca98271729fa52ee96da87b81a81635f42ef61c (diff)
parentde0af64f747c8f5783ed09efd9fc80f9ee9759a0 (diff)
downloadpython-apt-a322dcddd7b886ecbdc5eaacec0b78a735d97428.tar.gz
* removed the gnome2 dependencies
-rw-r--r--DistUpgrade/DistUpgradeViewGtk.py4
-rw-r--r--SoftwareProperties/SoftwareProperties.py26
-rw-r--r--UpdateManager/UpdateManager.py10
-rw-r--r--data/SoftwareProperties.glade4
-rw-r--r--data/UpdateManager.glade26
-rw-r--r--debian/changelog6
-rw-r--r--debian/control2
7 files changed, 52 insertions, 26 deletions
diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py
index bf4acf0c..11b5d9c6 100644
--- a/DistUpgrade/DistUpgradeViewGtk.py
+++ b/DistUpgrade/DistUpgradeViewGtk.py
@@ -102,10 +102,10 @@ class GtkFetchProgressAdapter(apt.progress.FetchProgress):
currentItem = self.totalItems
if self.currentCPS > 0:
- self.status.set_text(_("Downloading file %li of %li with %s/s" % (currentItem, self.totalItems, apt_pkg.SizeToStr(self.currentCPS))))
+ self.status.set_text(_("Downloading file %li of %li at %s/s" % (currentItem, self.totalItems, apt_pkg.SizeToStr(self.currentCPS))))
self.progress.set_text(_("%s remaining" % apt_pkg.TimeToStr(self.eta)))
else:
- self.status.set_text(_("Downloading file %li of %li with unknown speed" % (currentItem, self.totalItems)))
+ self.status.set_text(_("Downloading file %li of %li at unknown speed" % (currentItem, self.totalItems)))
self.progress.set_text(" ")
while gtk.events_pending():
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py
index b1d557d4..4254a3ee 100644
--- a/SoftwareProperties/SoftwareProperties.py
+++ b/SoftwareProperties/SoftwareProperties.py
@@ -48,6 +48,7 @@ CONF_MAP = {
"autoupdate" : "APT::Periodic::Update-Package-Lists",
"autodownload" : "APT::Periodic::Download-Upgradeable-Packages",
"autoclean" : "APT::Periodic::AutocleanInterval",
+ "unattended" : "APT::Periodic::Unattended-Upgrade",
"max_size" : "APT::Archives::MaxSize",
"max_age" : "APT::Archives::MaxAge"
}
@@ -151,6 +152,21 @@ class SoftwareProperties(SimpleGladeApp):
else:
self.checkbutton_auto_download.set_active(False)
+ # Unattended updates
+ if os.path.exists("/usr/bin/unattended-upgrade"):
+ # FIXME: we should always show the option. if unattended-upgrades is
+ # not installed a dialog should popup and allow the user to install
+ # unattended-upgrade
+ #self.checkbutton_unattended.set_sensitive(True)
+ self.checkbutton_unattended.show()
+ else:
+ #self.checkbutton_unattended.set_sensitive(False)
+ self.checkbutton_unattended.hide()
+ if apt_pkg.Config.FindI(CONF_MAP["unattended"]) == 1:
+ self.checkbutton_unattended.set_active(True)
+ else:
+ self.checkbutton_unattended.set_active(False)
+
# apt-key stuff
self.apt_key = apt_key()
self.init_keyslist()
@@ -228,6 +244,16 @@ class SoftwareProperties(SimpleGladeApp):
# FIXME: Write config options, apt_pkg should be able to do this.
self.write_config()
+ def on_opt_unattended_toggled(self, widget):
+ if self.checkbutton_unattended.get_active():
+ self.checkbutton_unattended.set_active(True)
+ apt_pkg.Config.Set(CONF_MAP["unattended"], str(1))
+ else:
+ self.checkbutton_unattended.set_active(False)
+ apt_pkg.Config.Set(CONF_MAP["unattended"], str(0))
+ # FIXME: Write config options, apt_pkg should be able to do this.
+ self.write_config()
+
def on_opt_autodownload_toggled(self, widget):
if self.checkbutton_auto_download.get_active():
self.checkbutton_auto_download.set_active(True)
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py
index 0638916f..885d68b8 100644
--- a/UpdateManager/UpdateManager.py
+++ b/UpdateManager/UpdateManager.py
@@ -29,7 +29,6 @@ import gtk
import gtk.gdk
import gtk.glade
import gobject
-import gnome
import apt
import apt_pkg
import gettext
@@ -179,7 +178,7 @@ class UpdateList:
#print "WARNING, keeping packages"
msg = ("<big><b>%s</b></big>\n\n%s" % \
(_("Cannot install all available updates"),
- _("Some updates require to install or remove further software. "
+ _("Some updates require to remove further software. "
"Use the function \"Smart Upgrade\" of the package manager "
"\"Synaptic\" or run \"sudo apt-get dist-upgrade\" in a "
"terminal to update your system completely.")))
@@ -223,7 +222,6 @@ class UpdateManager(SimpleGladeApp):
self.datadir = datadir
SimpleGladeApp.__init__(self, datadir+"glade/UpdateManager.glade",
None, domain="update-manager")
- self.gnome_program = gnome.init("update-manager", "0.41")
self.window_main.set_sensitive(False)
@@ -462,7 +460,7 @@ class UpdateManager(SimpleGladeApp):
self.fillstore()
def on_button_help_clicked(self, widget):
- gnome.help_display_desktop(self.gnome_program, "update-manager", "update-manager", "")
+ subprocess.Popen(["/usr/bin/yelp", "ghelp:update-manager"])
def on_button_install_clicked(self, widget):
#print "on_button_install_clicked"
@@ -660,6 +658,7 @@ class UpdateManager(SimpleGladeApp):
dialog.set_markup(primary);
dialog.format_secondary_text(secondary);
dialog.run()
+ dialog.destroy()
except IOError:
primary = "<span weight=\"bold\" size=\"larger\">%s</span>" % \
_("Could not download the release notes")
@@ -670,6 +669,7 @@ class UpdateManager(SimpleGladeApp):
dialog.set_markup(primary);
dialog.format_secondary_text(secondary);
dialog.run()
+ dialog.destroy()
self.window_main.set_sensitive(True)
self.window_main.window.set_cursor(None)
# user clicked cancel
@@ -718,6 +718,7 @@ class UpdateManager(SimpleGladeApp):
dialog.set_markup(primary);
dialog.format_secondary_text(secondary);
dialog.run()
+ dialog.destroy()
else:
#print "runing: %s" % script
os.execv(script,[])
@@ -797,6 +798,7 @@ class UpdateManager(SimpleGladeApp):
dialog.set_markup(msg)
dialog.vbox.set_spacing(6)
dialog.run()
+ dialog.destroy()
sys.exit(1)
#apt_pkg.Config.Set("Debug::pkgPolicy","1")
#self.depcache = apt_pkg.GetDepCache(self.cache)
diff --git a/data/SoftwareProperties.glade b/data/SoftwareProperties.glade
index 7fc37c30..89a56f11 100644
--- a/data/SoftwareProperties.glade
+++ b/data/SoftwareProperties.glade
@@ -390,8 +390,9 @@
<child>
<widget class="GtkCheckButton" id="checkbutton_unattended">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Only security updates from the official Ubuntu servers will be installed automatically. The software package &quot;unattended-upgrades&quot; needs to be installed therefor</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">_Install new updates without confirmation</property>
+ <property name="label" translatable="yes">_Install security updates without confirmation</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@@ -409,7 +410,6 @@
<child>
<widget class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
diff --git a/data/UpdateManager.glade b/data/UpdateManager.glade
index dfd54dc3..e9f2b32d 100644
--- a/data/UpdateManager.glade
+++ b/data/UpdateManager.glade
@@ -665,28 +665,20 @@
<property name="spacing">12</property>
<child>
- <widget class="GtkHButtonBox" id="hbuttonbox5">
+ <widget class="GtkButton" id="button_help">
<property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="button_help">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-help</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_button_help_clicked" last_modification_time="Thu, 24 Mar 2005 17:16:46 GMT"/>
- </widget>
- </child>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-help</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_button_help_clicked" last_modification_time="Thu, 24 Mar 2005 17:16:46 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
</packing>
</child>
diff --git a/debian/changelog b/debian/changelog
index ddbfd48d..c69f633b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+update-manager (0.42.2ubuntu4) dapper; urgency=low
+
+ * don't depend on python-gnome2 anymore (for xubuntu)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 14 Feb 2006 14:39:12 +0100
+
update-manager (0.42.2ubuntu3) dapper; urgency=low
* fixed description of the ubuntu repository (#30813)
diff --git a/debian/control b/debian/control
index 314ec741..a90fb941 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.6.1.1
Package: update-manager
Architecture: any
-Depends: ${python:Depends}, ${misc:Depends}, python, python-gnome2, python-glade2, python-apt (>= 0.6.15), synaptic (>= 0.57.8), lsb-release
+Depends: ${python:Depends}, ${misc:Depends}, python, python-glade2, python-apt (>= 0.6.15), synaptic (>= 0.57.8), lsb-release
Description: GNOME application that manages apt updates
This is the GNOME apt update manager. It checks for updates and lets the user
choose which to install.