Merge lp:~ricotz/slingshot/port-gmenu3 into lp:~elementary-pantheon/slingshot/trunk

Proposed by Rico Tzschichholz
Status: Superseded
Proposed branch: lp:~ricotz/slingshot/port-gmenu3
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 227 lines (+59/-67)
3 files modified
CMakeLists.txt (+2/-2)
src/Backend/App.vala (+24/-8)
src/Backend/AppSystem.vala (+33/-57)
To merge this branch: bzr merge lp:~ricotz/slingshot/port-gmenu3
Reviewer Review Type Date Requested Status
Corentin Noël Approve
Tom Beckmann (community) Approve
Review via email: mp+124553@code.launchpad.net

This proposal has been superseded by a proposal from 2014-02-23.

Description of the change

Transition to use libgnome-menu-3.0

To post a comment you must log in.
lp:~ricotz/slingshot/port-gmenu3 updated
274. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

Revision history for this message
Tom Beckmann (tombeckmann) wrote :

Working perfectly now.

review: Approve
lp:~ricotz/slingshot/port-gmenu3 updated
275. By Rico Tzschichholz

Port App and AppSystem to use libgnome-menu-3.0

276. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

277. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

278. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

279. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

280. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

281. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

282. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

283. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

284. By Andrea Basso

Reverted the gmenu-3 commit since it caused a severe bug. It'll be re-introduced after beta1

285. By Andrea Basso

Now Slingshot shows Ubuntu One and Ubuntu Tweak

286. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

287. By Andrea Basso

Some final tweaking and solving the single-letter problem

288. By Adam Davies

Changed from using the released event in the AppEntry to the clicked event to fix bug #956063.

289. By Cody Garver

Be less picky about Granite version for the time being.

290. By Adam Davies

Add tooltips to fix bug #1063333.

291. By Cody Garver

Updated POT file.

292. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

293. By Andrea Basso

Fixed sidebar not updating after installation and changed value. Slingshot is now beta1 ready

294. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

295. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

296. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

297. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

298. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

299. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

300. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

301. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

302. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

303. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

304. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

305. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

306. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

307. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

308. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

309. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

310. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

311. By Tom Beckmann

Re-added wnck activation in order to make everything work with newest gala update

312. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

313. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

314. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

315. By Akshay Shekher

Search now lists apps with NoDisplay=true as well

316. By Andrea Basso

Removed open-on-mouse option

317. By Victor Martinez

Added patch so that when Wingpanel will do as well, we get highlit Applications when Slingshot's open

318. By Andrea Basso

General improvements to code

319. By Andrea Basso

Forgot to remove a nasty bracket

320. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

321. By Andrea Basso

Fixed appearing of NoDisplay=True apps in CategoryView

322. By Andrea Basso

No more disappearing pages

323. By Andrea Basso

Zeitgeist is back with us

324. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

325. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

326. By Andrea Basso

Fixed scrolling bugs in CategoryView

327. By Andrea Basso

Slingshot doesn't show up when changing screen resolution

328. By Andrea Basso

Fixed a bug introduced with last commit

329. By Andrea Basso

Fixed bugs concerning the SearchEntry

330. By Andrea Basso

Fixed categories not switching after installation

331. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

332. By Julien Spautz

Move from press to release event for pages to fix bug #1094277.

333. By Julien Spautz

Fixes all sort of bugs concerning the SearchEntry

334. By Andrea Basso

Remove NoDisplay=True apps from SearchView.

335. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

336. By Andrea Basso

When typing after scrolling in SearchView, SearchView now scrolls back to the top to fix bug #1127170.

337. By Andrea Basso

Pages always display on startup to fix bug #1120825.

338. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

339. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

340. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

341. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

342. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

343. By Rico Tzschichholz

build: explictly link against libm

344. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

345. By Tom Beckmann

Allow using KP_Enter to trigger execute

346. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

347. By Cody Garver

Add 'make dist' command for creating release tarball to fix bug #1076823. Approved by David Gomes.

348. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

349. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

350. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

351. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

352. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

353. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

354. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

355. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

356. By Cody Garver

Release 0.7.1

357. By Julien Spautz

Fix bug #1084150

358. By Julien Spautz

Fixes bug #1099602

359. By Julien Spautz

Fixes bug #1152844 by removing "KP_" from the key name and thus mapping keypad keys to their "normal" equivalent.

I also added support for Home and End, switching to the first/last page or category.

Alt + n switches to the nth page, Alt+0 to the last one. This might need some designer input, but I thinks it's a neat feature, and consistent with DynamicNotebook's behaviour.

360. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

361. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

362. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

363. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

364. By Cody Garver

Release 0.7.2

365. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

366. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

367. By Marcus Lundgren

Change view modes with Ctrl + n, fixing bug #1182740.

368. By Tigran Gabrielyan

Only use OptionContext parser if we have args to avoid slow down in startup time to fix bug #1043689.

369. By Cody Garver

Release 0.7.3

370. By Rico Tzschichholz

Fix build with valac 0.21.1

371. By Julien Spautz

Fixed bug #1200223 and Slingshot now orders accented-name apps too.

372. By Airlangga Cahya Utama

Make it so that Chromium, Wine and other third party apps show up on Slingshot.

373. By Airlangga Cahya Utama

Fixed bug #1211562 by forcing listen to Home and End keys.

374. By Cody Garver

Release 0.7.4

375. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

376. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

377. By Tigran Gabrielyan

Fix fallback methods of finding an apps icon to work in all views. Fixes bug #1072036.

378. By Tigran Gabrielyan

Accept ctrl+shift+v as paste in search Edit to fix bug #1084887.

379. By Tigran Gabrielyan

Fix previous commit. Couldn't type "v" in searchbar.

380. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

381. By Raphael Isemann

Code style cleanup.

382. By Tigran Gabrielyan

Fixed bug #1221557, pressing Escape on Slingshot now works as expected.

If the search bar is empty, it will hide() Slingshot, but if there's text on it, it'll clear the text entry.

383. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

384. By Cody Garver

Release 0.7.5

385. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

386. By Jeremy Wootten

Prevents infinite loop in key_press_event handling when an input manager (ibus) is active, which appears to be due to a bug in either Gtk3 or ibus, by using an event box and custom handler rather than overriding the default handler.

Two other minor changes:
1) prevent some critical error messages when apps have no keywords.
2) prevent critical error message due to empty_cat_label not being created.

Fixes bug #1213321.

387. By Jeremy Wootten

Connect to searchbar activate signal to detect Return key.

Fixes regression introduced by revision 386 by connecting to searchbar activate signal. The Enter/Return key press is now detected.

388. By Jeremy Wootten

Whitelist ibus-setup to fix bug #1103660.

389. By Cody Garver

Silence C compilation warnings.

390. By Cody Garver

Release 0.7.6

391. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

392. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

393. By Tigran Gabrielyan

1) Long pressing "Applications" button will no longer cause slingshot to be unclosable.

2) Clicking dock items with slingshot open will work with only 1 click, however, slingshot needs to be closed on mouse press, rather than mouse up. If that's an issue, that part will have to be reverted.

3) Slingshot will now close if topleft hotcorner is set to show slingshot.

4) Grab keyboard focus, prevents alt tab bug, and be consistent with other popovers/indicator menus

394. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

395. By Cody Garver

Release 0.7.6.1

396. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

Revision history for this message
Corentin Noël (tintou) wrote :

This branch can be modified as the vapi is now provided by vala on Isis

review: Needs Fixing
lp:~ricotz/slingshot/port-gmenu3 updated
397. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

398. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

399. By Corentin Noël

* Removed every using statement
* Changed VWidgets and HWidgets to Widgets with the corresponding orientation (Gtk deprecation)
* Ported Zeitgeist parts to version 2.0

400. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

401. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

402. By Pim Vullers <email address hidden>

Unity and Zeitgeist integration is now optional. Default is ON.

403. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

404. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

405. By Rico Tzschichholz

Port to libgnome-menu-3.0 API

Revision history for this message
Corentin Noël (tintou) :
review: Approve

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-01-31 17:57:40 +0000
3+++ CMakeLists.txt 2014-02-23 17:08:29 +0000
4@@ -54,7 +54,7 @@
5 message ("-- Zeitgeist integration disabled")
6 endif ()
7
8-set (CORE_DEPS "gobject-2.0;glib-2.0;gio-2.0;gio-unix-2.0;gee-1.0;libgnome-menu;libwnck-3.0;gdk-x11-3.0;${UNITY_DEPS};")
9+set (CORE_DEPS "gobject-2.0;glib-2.0;gio-2.0;gio-unix-2.0;gee-1.0;libgnome-menu-3.0;libwnck-3.0;gdk-x11-3.0;${UNITY_DEPS};")
10 set (UI_DEPS "gtk+-3.0>=3.2.0;granite;${ZEITGEIST_DEPS};")
11
12 find_package (PkgConfig)
13@@ -62,7 +62,7 @@
14
15 find_package (Vala REQUIRED)
16 include (ValaVersion)
17-ensure_vala_version ("0.15.1" MINIMUM)
18+ensure_vala_version ("0.18.0" MINIMUM)
19
20 include (ValaPrecompile)
21 vala_precompile (VALA_C ${APPNAME}
22
23=== modified file 'src/Backend/App.vala'
24--- src/Backend/App.vala 2014-01-31 17:57:40 +0000
25+++ src/Backend/App.vala 2014-02-23 17:08:29 +0000
26@@ -24,7 +24,7 @@
27 public string exec { get; private set; }
28 public string icon_name { get; private set; default = ""; }
29 public string[] keywords { get; private set;}
30- public Gdk.Pixbuf icon { get; private set; }
31+ public Gdk.Pixbuf? icon { get; private set; default = null; }
32 public double popularity { get; set; }
33 public double relevancy { get; set; }
34 public string desktop_path { get; private set; }
35@@ -36,18 +36,34 @@
36 public signal void launched (App app);
37
38 public App (GMenu.TreeEntry entry) {
39- name = entry.get_display_name ();
40- description = entry.get_comment () ?? name;
41- exec = entry.get_exec ();
42+ unowned GLib.DesktopAppInfo info = entry.get_app_info ();
43+ name = info.get_display_name ().dup ();
44+ description = info.get_description ().dup () ?? name;
45+ exec = info.get_commandline ().dup ();
46 desktop_id = entry.get_desktop_file_id ();
47- icon_name = entry.get_icon () ?? "application-default-icon";
48 desktop_path = entry.get_desktop_file_path ();
49 #if HAVE_UNITY
50 keywords = Unity.AppInfoManager.get_default ().get_keywords (desktop_id);
51 #endif
52- generic_name = entry.get_generic_name ();
53-
54- update_icon ();
55+ generic_name = info.get_generic_name ();
56+
57+ if (info.get_icon () is ThemedIcon) {
58+ icon_name = (info.get_icon () as ThemedIcon).get_names ()[0].dup ();
59+ } else if (info.get_icon () is LoadableIcon) {
60+ try {
61+ var ios = (info.get_icon () as LoadableIcon).load (0, null, null);
62+ icon = new Gdk.Pixbuf.from_stream_at_scale (ios, Slingshot.settings.icon_size,
63+ Slingshot.settings.icon_size, true, null);
64+ } catch {
65+ icon_name = "application-default-icon";
66+ }
67+ } else {
68+ icon_name = "application-default-icon";
69+ }
70+
71+ if (icon == null)
72+ update_icon ();
73+
74 Slingshot.icon_theme.changed.connect (update_icon);
75 }
76
77
78=== modified file 'src/Backend/AppSystem.vala'
79--- src/Backend/AppSystem.vala 2014-01-31 15:20:32 +0000
80+++ src/Backend/AppSystem.vala 2014-02-23 17:08:29 +0000
81@@ -27,7 +27,6 @@
82 #endif
83
84 public signal void changed ();
85- private bool index_changed = false;
86
87 construct {
88
89@@ -36,43 +35,43 @@
90 rl_service.update_complete.connect (update_popularity);
91 #endif
92
93- apps_menu = GMenu.Tree.lookup ("pantheon-applications.menu", GMenu.TreeFlags.INCLUDE_EXCLUDED);
94- apps_menu.add_monitor ((menu) => {
95-
96- debug ("Apps menu tree changed. Updating…");
97- index_changed = true;
98- update_app_system ();
99- changed ();
100-
101- });
102-
103- apps_menu.set_sort_key (GMenu.TreeSortKey.DISPLAY_NAME);
104+ apps_menu = new GMenu.Tree ("pantheon-applications.menu", GMenu.TreeFlags.INCLUDE_EXCLUDED | GMenu.TreeFlags.SORT_DISPLAY_NAME);
105+ apps_menu.changed.connect (update_app_system);
106+
107+ apps = new Gee.HashMap<string, Gee.ArrayList<App>> ();
108+ categories = new Gee.ArrayList<GMenu.TreeDirectory> ();
109+
110 update_app_system ();
111
112 }
113
114 private void update_app_system () {
115
116+ debug ("Updating Applications menu tree...");
117 #if HAVE_ZEITGEIST
118 rl_service.refresh_popularity ();
119 #endif
120
121+ apps_menu.load_sync ();
122+
123 update_categories_index ();
124 update_apps ();
125
126+ changed ();
127+
128 }
129
130 private void update_categories_index () {
131
132- var root_tree = apps_menu.get_root_directory ();
133-
134- if (categories == null || index_changed) {
135- categories = new Gee.ArrayList<GMenu.TreeDirectory> ();
136-
137- foreach (GMenu.TreeItem item in root_tree.get_contents ()) {
138- if (item.get_type () == GMenu.TreeItemType.DIRECTORY)
139- if (((GMenu.TreeDirectory) item).get_is_nodisplay () == false)
140- categories.add ((GMenu.TreeDirectory) item);
141+ categories.clear ();
142+
143+ var iter = apps_menu.get_root_directory ().iter ();
144+ GMenu.TreeItemType type;
145+ while ((type = iter.next ()) != GMenu.TreeItemType.INVALID) {
146+ if (type == GMenu.TreeItemType.DIRECTORY) {
147+ var dir = iter.get_directory ();
148+ if (!dir.get_is_nodisplay ())
149+ categories.add (dir);
150 }
151 }
152
153@@ -89,21 +88,10 @@
154
155 private void update_apps () {
156
157- if (index_changed) {
158- apps.clear ();
159- apps = null;
160- index_changed = false;
161- }
162-
163- if (apps == null) {
164-
165- apps = new Gee.HashMap<string, Gee.ArrayList<App>> ();
166-
167- foreach (GMenu.TreeDirectory cat in categories) {
168- apps.set (cat.get_name (), get_apps_by_category (cat));
169- }
170-
171- }
172+ apps.clear ();
173+
174+ foreach (var cat in categories)
175+ apps.set (cat.get_name (), get_apps_by_category (cat));
176
177 }
178
179@@ -117,39 +105,27 @@
180
181 var app_list = new Gee.ArrayList<App> ();
182
183- foreach (GMenu.TreeItem item in category.get_contents ()) {
184- App app;
185- switch (item.get_type ()) {
186+ var iter = category.iter ();
187+ GMenu.TreeItemType type;
188+ while ((type = iter.next ()) != GMenu.TreeItemType.INVALID) {
189+ switch (type) {
190 case GMenu.TreeItemType.DIRECTORY:
191- app_list.add_all (get_apps_by_category ((GMenu.TreeDirectory) item));
192+ app_list.add_all (get_apps_by_category (iter.get_directory ()));
193 break;
194 case GMenu.TreeItemType.ENTRY:
195- if (is_entry ((GMenu.TreeEntry) item)) {
196- app = new App ((GMenu.TreeEntry) item);
197+ var app = new App (iter.get_entry ());
198 #if HAVE_ZEITGEIST
199- app.launched.connect (rl_service.app_launched);
200+ app.launched.connect (rl_service.app_launched);
201 #endif
202- app_list.add (app);
203- }
204+ app_list.add (app);
205 break;
206 }
207 }
208+
209 return app_list;
210
211 }
212
213- private bool is_entry (GMenu.TreeEntry entry) {
214-
215- if (entry.get_launch_in_terminal () == false
216- && entry.get_is_excluded () == false
217- && entry.get_is_nodisplay () == false) {
218- return true;
219- } else {
220- return false;
221- }
222-
223- }
224-
225 public Gee.HashMap<string, Gee.ArrayList<App>> get_apps () {
226
227 return apps;

Subscribers

People subscribed via source and target branches