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

Proposed by Adam Bieńkowski on 2016-02-10
Status: Merged
Approved by: Cody Garver on 2016-02-10
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 2016-02-10 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
1=== modified file 'src/Widgets/CategoryView.vala'
2--- src/Widgets/CategoryView.vala 2015-12-19 17:13:52 +0000
3+++ src/Widgets/CategoryView.vala 2016-02-10 10:59:29 +0000
4@@ -44,9 +44,13 @@
5
6 category_switcher = new Sidebar ();
7
8+ var scrolled_category = new Gtk.ScrolledWindow (null, null);
9+ scrolled_category.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
10+ scrolled_category.add (category_switcher);
11+
12 app_view = new Widgets.Grid (view.rows, view.columns - 1);
13
14- container.add (category_switcher);
15+ container.add (scrolled_category);
16 container.add (separator);
17 container.add (app_view);
18 add (container);
19@@ -70,6 +74,7 @@
20 category_switcher.add_category (GLib.dgettext ("gnome-menus-3.0", cat_name).dup ());
21 n++;
22 }
23+
24 category_switcher.show_all ();
25
26 int minimum_width;
27@@ -98,17 +103,13 @@
28 app_entry.app_launched.connect (() => view.close_indicator ());
29 app_view.append (app_entry);
30 app_view.show_all ();
31-
32 }
33
34 public void show_filtered_apps (string category) {
35-
36 app_view.clear ();
37 foreach (Backend.App app in view.apps[category])
38 add_app (app);
39
40 current_position = 0;
41-
42 }
43-
44 }

Subscribers

People subscribed via source and target branches