Merge lp:~elementary-apps/appcenter/no-double-update into lp:~elementary-apps/appcenter/appcenter

Proposed by Danielle Foré
Status: Merged
Approved by: Felipe Escoto
Approved revision: 198
Merged at revision: 200
Proposed branch: lp:~elementary-apps/appcenter/no-double-update
Merge into: lp:~elementary-apps/appcenter/appcenter
Diff against target: 35 lines (+2/-5)
2 files modified
src/Views/AppListView.vala (+1/-0)
src/Widgets/PackageRow.vala (+1/-5)
To merge this branch: bzr merge lp:~elementary-apps/appcenter/no-double-update
Reviewer Review Type Date Requested Status
Felipe Escoto (community) Approve
Review via email: mp+297504@code.launchpad.net

Commit message

Don't show update button for updated apps

Description of the change

Decide to show the update button when we're choosing the row header so that these two are always in sync

To post a comment you must log in.
198. By Danielle Foré

only use visible

Revision history for this message
Felipe Escoto (philip.scott) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Views/AppListView.vala'
--- src/Views/AppListView.vala 2016-04-24 21:16:21 +0000
+++ src/Views/AppListView.vala 2016-06-15 17:11:22 +0000
@@ -116,6 +116,7 @@
116 [CCode (instance_pos = -1)]116 [CCode (instance_pos = -1)]
117 private void package_row_update_header (Widgets.PackageRow row, Widgets.PackageRow? before) {117 private void package_row_update_header (Widgets.PackageRow row, Widgets.PackageRow? before) {
118 bool update_available = row.package.update_available;118 bool update_available = row.package.update_available;
119 row.action_stack.visible = row.package.update_available;
119 if (before == null && update_available) {120 if (before == null && update_available) {
120 var updates_grid = get_updates_grid ();121 var updates_grid = get_updates_grid ();
121 row.set_header (updates_grid);122 row.set_header (updates_grid);
122123
=== modified file 'src/Widgets/PackageRow.vala'
--- src/Widgets/PackageRow.vala 2016-03-20 00:34:08 +0000
+++ src/Widgets/PackageRow.vala 2016-06-15 17:11:22 +0000
@@ -29,7 +29,7 @@
2929
30 public Gtk.Button update_button;30 public Gtk.Button update_button;
31 public Gtk.Button cancel_button;31 public Gtk.Button cancel_button;
32 Gtk.Stack action_stack;32 public Gtk.Stack action_stack;
33 Gtk.Grid update_grid;33 Gtk.Grid update_grid;
34 Gtk.ProgressBar update_progressbar;34 Gtk.ProgressBar update_progressbar;
35 Gtk.Label update_label;35 Gtk.Label update_label;
@@ -66,11 +66,7 @@
66 changed ();66 changed ();
67 });67 });
6868
69 action_stack.no_show_all = !package.update_available;
70 action_stack.show_all ();
71 package.notify["update-available"].connect (() => {69 package.notify["update-available"].connect (() => {
72 action_stack.no_show_all = !package.update_available;
73 action_stack.show_all ();
74 changed ();70 changed ();
75 });71 });
7672

Subscribers

People subscribed via source and target branches

to all changes: