Merge lp:~donadigo/slingshot/scrollable-category-view into lp:~elementary-pantheon/slingshot/trunk

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Cody Garver
Approved revision: 631
Merged at revision: 631
Proposed branch: lp:~donadigo/slingshot/scrollable-category-view
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 44 lines (+6/-5)
1 file modified
src/Widgets/CategoryView.vala (+6/-5)
To merge this branch: bzr merge lp:~donadigo/slingshot/scrollable-category-view
Reviewer Review Type Date Requested Status
elementary Pantheon team Pending
Review via email: mp+285581@code.launchpad.net

Commit message

Category view is now scrollable (lp:988405)

Description of the change

Fixes bug #988405 "Category view is not scrollable".

Should be a fast review, I also removed some unneded lines in CategoryView.vala.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Widgets/CategoryView.vala'
--- src/Widgets/CategoryView.vala 2015-12-19 17:13:52 +0000
+++ src/Widgets/CategoryView.vala 2016-02-10 10:59:29 +0000
@@ -44,9 +44,13 @@
4444
45 category_switcher = new Sidebar ();45 category_switcher = new Sidebar ();
4646
47 var scrolled_category = new Gtk.ScrolledWindow (null, null);
48 scrolled_category.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
49 scrolled_category.add (category_switcher);
50
47 app_view = new Widgets.Grid (view.rows, view.columns - 1);51 app_view = new Widgets.Grid (view.rows, view.columns - 1);
4852
49 container.add (category_switcher);53 container.add (scrolled_category);
50 container.add (separator);54 container.add (separator);
51 container.add (app_view);55 container.add (app_view);
52 add (container);56 add (container);
@@ -70,6 +74,7 @@
70 category_switcher.add_category (GLib.dgettext ("gnome-menus-3.0", cat_name).dup ());74 category_switcher.add_category (GLib.dgettext ("gnome-menus-3.0", cat_name).dup ());
71 n++;75 n++;
72 }76 }
77
73 category_switcher.show_all ();78 category_switcher.show_all ();
7479
75 int minimum_width;80 int minimum_width;
@@ -98,17 +103,13 @@
98 app_entry.app_launched.connect (() => view.close_indicator ());103 app_entry.app_launched.connect (() => view.close_indicator ());
99 app_view.append (app_entry);104 app_view.append (app_entry);
100 app_view.show_all ();105 app_view.show_all ();
101
102 }106 }
103107
104 public void show_filtered_apps (string category) {108 public void show_filtered_apps (string category) {
105
106 app_view.clear ();109 app_view.clear ();
107 foreach (Backend.App app in view.apps[category])110 foreach (Backend.App app in view.apps[category])
108 add_app (app);111 add_app (app);
109112
110 current_position = 0;113 current_position = 0;
111
112 }114 }
113
114}115}

Subscribers

People subscribed via source and target branches