Merge lp:~donadigo/appcenter/ui-margins into lp:~elementary-apps/appcenter/appcenter

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Danielle Foré
Approved revision: 286
Merged at revision: 287
Proposed branch: lp:~donadigo/appcenter/ui-margins
Merge into: lp:~elementary-apps/appcenter/appcenter
Diff against target: 50 lines (+11/-4)
2 files modified
src/Views/AppInfoView.vala (+10/-4)
src/Views/AppListView.vala (+1/-0)
To merge this branch: bzr merge lp:~donadigo/appcenter/ui-margins
Reviewer Review Type Date Requested Status
Danielle Foré Approve
Review via email: mp+304494@code.launchpad.net

Commit message

* Add margin to updated grid
* Do not load screenshots if there are none

Description of the change

Bitesize branch which fixes the updated grid margins and if there are no screenshots immedietaly displays that in the UI.

To post a comment you must log in.
Revision history for this message
Danielle Foré (danrabbit) wrote :

works for me

review: Approve
Revision history for this message
RabbitBot (rabbitbot-a) wrote :

Attempt to merge into lp:appcenter failed due to conflicts:

text conflict in src/Views/AppInfoView.vala

lp:~donadigo/appcenter/ui-margins updated
286. By Adam Bieńkowski

Add margin to updated grid; do not load screenshots if there are none

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Views/AppInfoView.vala'
--- src/Views/AppInfoView.vala 2016-09-01 09:08:12 +0000
+++ src/Views/AppInfoView.vala 2016-09-02 18:27:32 +0000
@@ -161,9 +161,17 @@
161161
162 public void load_more_content () {162 public void load_more_content () {
163 new Thread<void*> ("content-loading", () => {163 new Thread<void*> ("content-loading", () => {
164 app_version.label = package.get_version ();
165
164 string url = null;166 string url = null;
165 uint max_size = 0U;167 uint max_size = 0U;
166 package.component.get_screenshots ().foreach ((screenshot) => {168 var screenshots = package.component.get_screenshots ();
169 if (screenshots.length == 0) {
170 screenshot_stack.visible_child = app_screenshot_not_found;
171 return null;
172 }
173
174 screenshots.foreach ((screenshot) => {
167 screenshot.get_images ().foreach ((image) => {175 screenshot.get_images ().foreach ((image) => {
168 if (max_size < image.get_width ()) {176 if (max_size < image.get_width ()) {
169 url = image.get_url ();177 url = image.get_url ();
@@ -176,8 +184,6 @@
176 set_screenshot (url);184 set_screenshot (url);
177 }185 }
178186
179 app_version.label = package.get_version ();
180
181 return null;187 return null;
182 });188 });
183 }189 }
@@ -232,4 +238,4 @@
232 }238 }
233 }239 }
234 }240 }
235}241}
236\ No newline at end of file242\ No newline at end of file
237243
=== modified file 'src/Views/AppListView.vala'
--- src/Views/AppListView.vala 2016-09-01 09:08:12 +0000
+++ src/Views/AppListView.vala 2016-09-02 18:27:32 +0000
@@ -151,6 +151,7 @@
151 var updated_grid = new Gtk.Grid ();151 var updated_grid = new Gtk.Grid ();
152 updated_grid.orientation = Gtk.Orientation.HORIZONTAL;152 updated_grid.orientation = Gtk.Orientation.HORIZONTAL;
153 updated_grid.column_spacing = 12;153 updated_grid.column_spacing = 12;
154 updated_grid.margin = 6;
154 if (updating_cache) {155 if (updating_cache) {
155 updated_grid.halign = Gtk.Align.CENTER;156 updated_grid.halign = Gtk.Align.CENTER;
156 var updating_label = new Gtk.Label (_("Searching for updates…"));157 var updating_label = new Gtk.Label (_("Searching for updates…"));

Subscribers

People subscribed via source and target branches