Merge lp:~voluntatefaber/slingshot/bug1098429 into lp:~elementary-pantheon/slingshot/trunk

Proposed by Andrea Basso
Status: Merged
Merged at revision: 334
Proposed branch: lp:~voluntatefaber/slingshot/bug1098429
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 139 lines (+15/-25)
5 files modified
src/Backend/App.vala (+0/-2)
src/Backend/AppSystem.vala (+3/-2)
src/SlingshotView.vala (+3/-8)
src/Widgets/AppEntry.vala (+0/-2)
src/Widgets/CategoryView.vala (+9/-11)
To merge this branch: bzr merge lp:~voluntatefaber/slingshot/bug1098429
Reviewer Review Type Date Requested Status
Cody Garver (community) Approve
Review via email: mp+148868@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Backend/App.vala'
2--- src/Backend/App.vala 2012-12-22 16:00:44 +0000
3+++ src/Backend/App.vala 2013-02-16 11:58:19 +0000
4@@ -30,7 +30,6 @@
5 public double popularity { get; set; }
6 public double relevancy { get; set; }
7 public string desktop_path { get; private set; }
8- public bool display { get; set; }
9
10 private bool is_command = false;
11
12@@ -46,7 +45,6 @@
13 icon_name = entry.get_icon () ?? "application-default-icon";
14 desktop_path = entry.get_desktop_file_path ();
15 keywords = Unity.AppInfoManager.get_default ().get_keywords (desktop_id);
16- display = !(entry.get_is_nodisplay ());
17
18 update_icon ();
19 Slingshot.icon_theme.changed.connect (update_icon);
20
21=== modified file 'src/Backend/AppSystem.vala'
22--- src/Backend/AppSystem.vala 2013-01-13 16:41:55 +0000
23+++ src/Backend/AppSystem.vala 2013-02-16 11:58:19 +0000
24@@ -38,7 +38,7 @@
25 rl_service = new RelevancyService ();
26 rl_service.update_complete.connect (update_popularity);
27
28- apps_menu = GMenu.Tree.lookup ("pantheon-applications.menu", TreeFlags.INCLUDE_EXCLUDED | TreeFlags.INCLUDE_NODISPLAY);
29+ apps_menu = GMenu.Tree.lookup ("pantheon-applications.menu", TreeFlags.INCLUDE_EXCLUDED);
30 apps_menu.add_monitor ((menu) => {
31
32 debug ("Apps menu tree changed. Updating..");
33@@ -137,7 +137,8 @@
34 private bool is_entry (TreeEntry entry) {
35
36 if (entry.get_launch_in_terminal () == false
37- && entry.get_is_excluded () == false) {
38+ && entry.get_is_excluded () == false
39+ && entry.get_is_nodisplay () == false) {
40 return true;
41 } else {
42 return false;
43
44=== modified file 'src/SlingshotView.vala'
45--- src/SlingshotView.vala 2013-02-11 22:48:50 +0000
46+++ src/SlingshotView.vala 2013-02-16 11:58:19 +0000
47@@ -268,8 +268,6 @@
48
49 populate_grid_view ();
50 category_view.setup_sidebar ();
51- category_view.connect_events ();
52-
53 });
54
55 // position on the right monitor when settings changed
56@@ -660,12 +658,9 @@
57 foreach (App app in app_system.get_apps_by_name ()) {
58
59 var app_entry = new AppEntry (app);
60- if (app_entry.display) {
61- app_entry.app_launched.connect (() => hide ());
62- grid_view.append (app_entry);
63- app_entry.show_all ();
64- }
65-
66+ app_entry.app_launched.connect (() => hide ());
67+ grid_view.append (app_entry);
68+ app_entry.show_all ();
69 }
70
71 view_manager.move (grid_view, 0, 0);
72
73=== modified file 'src/Widgets/AppEntry.vala'
74--- src/Widgets/AppEntry.vala 2012-12-22 16:00:44 +0000
75+++ src/Widgets/AppEntry.vala 2013-02-16 11:58:19 +0000
76@@ -33,7 +33,6 @@
77 public string desktop_id;
78 public int icon_size;
79 public string desktop_path;
80- public bool display;
81
82 public signal void app_launched ();
83
84@@ -59,7 +58,6 @@
85 exec_name = app.exec;
86 icon_size = Slingshot.settings.icon_size;
87 icon = app.icon;
88- display = app.display;
89
90 get_style_context ().add_class ("app");
91
92
93=== modified file 'src/Widgets/CategoryView.vala'
94--- src/Widgets/CategoryView.vala 2013-02-06 20:36:45 +0000
95+++ src/Widgets/CategoryView.vala 2013-02-16 11:58:19 +0000
96@@ -106,10 +106,18 @@
97 }
98
99 container.attach (category_switcher, 0, 0, 1, 2);
100+ category_switcher.selection_changed.connect ((name, nth) => {
101+
102+ view.reset_category_focus ();
103+ string category = category_ids.get (nth);
104+ show_filtered_apps (category);
105+ });
106+ category_switcher.selected = 0; //Must be after everything else
107+
108 category_switcher.show_all ();
109 }
110
111- public void connect_events () {
112+ private void connect_events () {
113
114 layout.scroll_event.connect ((event) => {
115 switch (event.direction.to_string ()) {
116@@ -144,15 +152,6 @@
117 move_page (switcher.active - switcher.old_active);
118 view.searchbar.grab_focus (); // this is because otherwise focus isn't the current page
119 });
120-
121- category_switcher.selection_changed.connect ((name, nth) => {
122-
123- view.reset_category_focus ();
124- string category = category_ids.get (nth);
125- show_filtered_apps (category);
126- });
127- category_switcher.selected = 0; //Must be after everything else
128-
129 }
130
131 private void add_app (App app) {
132@@ -171,7 +170,6 @@
133
134 layout.move (empty_cat_label, view.columns*130, view.rows*130 / 2);
135 foreach (App app in view.apps[category])
136- if (app.display)
137 add_app (app);
138
139 switcher.set_active (0);

Subscribers

People subscribed via source and target branches