summaryrefslogtreecommitdiff
path: root/UpdateManager/UpdateManager.py
diff options
context:
space:
mode:
authorSebastian Heinlein <sebastian.heinlein@web.de>2006-03-23 19:29:20 +0100
committerSebastian Heinlein <sebastian.heinlein@web.de>2006-03-23 19:29:20 +0100
commit324d4bd436562e780260f1d0996b584fe5dc8f0b (patch)
tree6f19fbd3864e3dad63dd6de59de78a3cf538f796 /UpdateManager/UpdateManager.py
parent1efe23e431c6f73c1b6256a5bcaedcd0cd3026d6 (diff)
downloadpython-apt-324d4bd436562e780260f1d0996b584fe5dc8f0b.tar.gz
* remove some old duplicated code
* do not hide the checkbutton column at startup
Diffstat (limited to 'UpdateManager/UpdateManager.py')
-rw-r--r--UpdateManager/UpdateManager.py25
1 files changed, 6 insertions, 19 deletions
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py
index 9b7b3e28..bdbfc20f 100644
--- a/UpdateManager/UpdateManager.py
+++ b/UpdateManager/UpdateManager.py
@@ -266,7 +266,7 @@ class UpdateManager(SimpleGladeApp):
#self.treeview_update.set_fixed_height_mode(True)
self.treeview_update.append_column(self.cb)
- self.cb.set_visible(False)
+ self.cb.set_visible(True)
self.treeview_update.append_column(c0)
self.treeview_update.set_search_column(LIST_NAME)
@@ -419,6 +419,8 @@ class UpdateManager(SimpleGladeApp):
self.button_install.set_sensitive(True)
def update_count(self):
+ """activate or disable widgets and show dialog texts correspoding to
+ the number of available updates"""
if self.list.num_updates == 0:
text_header= "<big><b>"+_("Your system is up-to-date")+"</b></big>"
text_download = ""
@@ -426,6 +428,8 @@ class UpdateManager(SimpleGladeApp):
self.treeview_update.set_sensitive(False)
self.label_downsize.set_text=""
self.button_close.grab_default()
+ self.textview_changes.get_buffer().set_text("")
+ self.textview_descr.get_buffer().set_text("")
else:
text_header = "<big><b>"+gettext.ngettext("You can install one update", "You can install %s updates" % len(self.store), len(self.store))+"</b></big>"
@@ -600,24 +604,7 @@ class UpdateManager(SimpleGladeApp):
# fill them again
self.list.update(self.cache)
- if self.list.num_updates < 1:
- # set the label and treeview and hide the checkbox column
- self.cb.set_visible(False)
- text = "<big><b>%s</b></big>\n\n%s" % (_("Your system is up-to-date"),
- _("There are no updates available."))
- self.label_header.set_markup(text)
- # make sure no install is possible
- self.button_install.set_sensitive(False)
- self.textview_changes.get_buffer().set_text("")
- self.textview_descr.get_buffer().set_text("")
- else:
- self.cb.set_visible(True)
- self.treeview_update.set_headers_visible(False)
- text = _("<big><b>Available Updates</b></big>\n"
- "\n"
- "The following packages are found to be upgradable. You can upgrade them by "
- "using the Install button.")
- self.label_header.set_markup(text)
+ if self.list.num_updates > 0:
i=0
for pkg in self.list.pkgs: