From b83afc695eb3d983d694ad9b8c9bad7a469b5a80 Mon Sep 17 00:00:00 2001 From: "glatzor@ubuntu.com" <> Date: Mon, 11 Sep 2006 19:29:59 +0200 Subject: * Gtk seems to require that you set the activatable property of a cell renderer explictly to True if there is one with False * Rebuild channel templates --- UpdateManager/UpdateManager.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 9880b528..af1ec6c3 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -248,7 +248,7 @@ class UpdateList: # sort by origin for pkg in cache: - if pkg.markedUpgrade or pkg.markedInstall or pkg.isUpgradable: + if pkg.isUpgradable: # TRANSLATORS: updates from an 'unknown' origin originstr = _("Other updates") for aorigin in pkg.candidateOrigin: @@ -262,7 +262,7 @@ class UpdateList: self.pkgs[origin_node] = [] self.pkgs[origin_node].append(pkg) self.num_updates = self.num_updates + 1 - if pkg.isUpgradable: + if pkg.isUpgradable and not (pkg.markedUpgrade or pkg.markedInstall): self.held_back.append(pkg.name) for l in self.pkgs.keys(): self.pkgs[l].sort(lambda x,y: cmp(x.name,y.name)) @@ -392,7 +392,9 @@ class UpdateManager(SimpleGladeApp): renderer.set_property("active", to_install) if pkg.name in self.list.held_back: renderer.set_property("activatable", False) - + else: + renderer.set_property("activatable", True) + def package_column_view_func(self, cell_layout, renderer, model, iter): self.header_column_func(cell_layout, renderer, model, iter) -- cgit v1.2.3 From cb5c5cca3e6d5b90018a2dc49b77d61dede3628c Mon Sep 17 00:00:00 2001 From: "glatzor@ubuntu.com" <> Date: Mon, 11 Sep 2006 19:38:20 +0200 Subject: * do not allow to toggle deactivated updates by row activation --- UpdateManager/UpdateManager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'UpdateManager') diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index af1ec6c3..5d6518b1 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -732,9 +732,13 @@ class UpdateManager(SimpleGladeApp): def toggled(self, renderer, path): """ a toggle button in the listview was toggled """ - self.setBusy(True) iter = self.store.get_iter(path) pkg = self.store.get_value(iter, LIST_PKG) + # make sure that we don't allow to toggle deactivated updates + # this is needed for the call by the row activation callback + if pkg.name in self.list.held_back: + return False + self.setBusy(True) # update the cache if pkg.markedInstall or pkg.markedUpgrade: pkg.markKeep() -- cgit v1.2.3