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

Proposed by Adam Bieńkowski on 2016-08-31
Status: Merged
Approved by: Daniel Fore on 2016-09-02
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
Daniel Fore 2016-08-31 Approve on 2016-09-01
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.
Daniel Fore (danrabbit) wrote :

works for me

review: Approve
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 on 2016-09-02
286. By Adam Bieńkowski on 2016-09-02

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
1=== modified file 'src/Views/AppInfoView.vala'
2--- src/Views/AppInfoView.vala 2016-09-01 09:08:12 +0000
3+++ src/Views/AppInfoView.vala 2016-09-02 18:27:32 +0000
4@@ -161,9 +161,17 @@
5
6 public void load_more_content () {
7 new Thread<void*> ("content-loading", () => {
8+ app_version.label = package.get_version ();
9+
10 string url = null;
11 uint max_size = 0U;
12- package.component.get_screenshots ().foreach ((screenshot) => {
13+ var screenshots = package.component.get_screenshots ();
14+ if (screenshots.length == 0) {
15+ screenshot_stack.visible_child = app_screenshot_not_found;
16+ return null;
17+ }
18+
19+ screenshots.foreach ((screenshot) => {
20 screenshot.get_images ().foreach ((image) => {
21 if (max_size < image.get_width ()) {
22 url = image.get_url ();
23@@ -176,8 +184,6 @@
24 set_screenshot (url);
25 }
26
27- app_version.label = package.get_version ();
28-
29 return null;
30 });
31 }
32@@ -232,4 +238,4 @@
33 }
34 }
35 }
36-}
37+}
38\ No newline at end of file
39
40=== modified file 'src/Views/AppListView.vala'
41--- src/Views/AppListView.vala 2016-09-01 09:08:12 +0000
42+++ src/Views/AppListView.vala 2016-09-02 18:27:32 +0000
43@@ -151,6 +151,7 @@
44 var updated_grid = new Gtk.Grid ();
45 updated_grid.orientation = Gtk.Orientation.HORIZONTAL;
46 updated_grid.column_spacing = 12;
47+ updated_grid.margin = 6;
48 if (updating_cache) {
49 updated_grid.halign = Gtk.Align.CENTER;
50 var updating_label = new Gtk.Label (_("Searching for updates…"));

Subscribers

People subscribed via source and target branches