Merge lp:~rbalint/update-manager/enable-only-removals into lp:update-manager

Proposed by Balint Reczey
Status: Merged
Merged at revision: 2838
Proposed branch: lp:~rbalint/update-manager/enable-only-removals
Merge into: lp:update-manager
Diff against target: 40 lines (+8/-3)
2 files modified
UpdateManager/Core/MyCache.py (+4/-0)
UpdateManager/UpdatesAvailable.py (+4/-3)
To merge this branch: bzr merge lp:~rbalint/update-manager/enable-only-removals
Reviewer Review Type Date Requested Status
Julian Andres Klode Approve
Review via email: mp+355535@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UpdateManager/Core/MyCache.py'
2--- UpdateManager/Core/MyCache.py 2018-09-11 13:51:21 +0000
3+++ UpdateManager/Core/MyCache.py 2018-09-24 11:54:38 +0000
4@@ -142,6 +142,10 @@
5 def keep_count(self):
6 return self._depcache.keep_count
7
8+ @property
9+ def del_count(self):
10+ return self._depcache.del_count
11+
12 def _check_dependencies(self, target, deps):
13 """Return True if any of the dependencies in deps match target."""
14 # TODO: handle virtual packages
15
16=== modified file 'UpdateManager/UpdatesAvailable.py'
17--- UpdateManager/UpdatesAvailable.py 2018-03-18 21:43:58 +0000
18+++ UpdateManager/UpdatesAvailable.py 2018-09-24 11:54:38 +0000
19@@ -632,7 +632,7 @@
20 Gtk.MenuItem.new_with_mnemonic(_("_Deselect All"))
21 item_select_none.connect("activate", self.select_none_upgrades)
22 menu.append(item_select_none)
23- num_updates = self.cache.install_count
24+ num_updates = self.cache.install_count + self.cache.del_count
25 if num_updates == 0:
26 item_select_none.set_property("sensitive", False)
27 item_select_all = Gtk.MenuItem.new_with_mnemonic(_("Select _All"))
28@@ -724,9 +724,10 @@
29 self.hbox_restart.set_visible(requires_restart)
30
31 def _refresh_updates_count(self):
32- self.button_install.set_sensitive(self.cache.install_count)
33+ self.button_install.set_sensitive(self.cache.install_count +
34+ self.cache.del_count)
35 try:
36- inst_count = self.cache.install_count
37+ inst_count = self.cache.install_count + self.cache.del_count
38 self.dl_size = self.cache.required_download
39 download_str = ""
40 if self.dl_size != 0:

Subscribers

People subscribed via source and target branches

to status/vote changes: