Merge lp:~3v1n0/libindicator/shortcut-nicks-startup-notify into lp:libindicator/13.10

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Mathieu Trudel-Lapierre
Approved revision: 486
Merged at revision: 486
Proposed branch: lp:~3v1n0/libindicator/shortcut-nicks-startup-notify
Merge into: lp:libindicator/13.10
Diff against target: 57 lines (+19/-5)
1 file modified
libindicator/indicator-desktop-shortcuts.c (+19/-5)
To merge this branch: bzr merge lp:~3v1n0/libindicator/shortcut-nicks-startup-notify
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+157785@code.launchpad.net

Commit message

IndicatorDestkopShortcuts: add StartupNotify parameter in our internal fake .desktop file

Otherwise GAppInfo won't pass the relevant platform-data to the Application launched.
Plus, fix the docs.

Description of the change

In lp:~3v1n0/libindicator/launch-shortucts-nicks-with-ctx I've forgot to add a StartupNotify prameter inside the internal key-file that we create to generate a DesktopAppInfo. Without it, not all the relevant platform-data (such as the activation timestamp) will be passed to clients.
And we need it.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Approve.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libindicator/indicator-desktop-shortcuts.c'
2--- libindicator/indicator-desktop-shortcuts.c 2013-04-05 11:09:02 +0000
3+++ libindicator/indicator-desktop-shortcuts.c 2013-04-09 02:58:23 +0000
4@@ -555,9 +555,10 @@
5 }
6
7 /**
8- indicator_desktop_shortcuts_nick_exec:
9+ indicator_desktop_shortcuts_nick_exec_with_context:
10 @ids: The #IndicatorDesktopShortcuts object to look in
11 @nick: Which command that we're referencing.
12+ @launch_context: The #GAppLaunchContext to use for launching the shortcut
13
14 Here we take a @nick and try and execute the action that is
15 associated with it. The @nick parameter should be gotten
16@@ -630,9 +631,9 @@
17 gchar * desktopdata = g_strdup_printf("[" G_KEY_FILE_DESKTOP_GROUP "]\n"
18 G_KEY_FILE_DESKTOP_KEY_TYPE "=" G_KEY_FILE_DESKTOP_TYPE_APPLICATION "\n"
19 G_KEY_FILE_DESKTOP_KEY_NAME "=%s\n"
20- G_KEY_FILE_DESKTOP_KEY_EXEC "=%s\n",
21- name, exec);
22-
23+ G_KEY_FILE_DESKTOP_KEY_EXEC "=%s\n"
24+ G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY "=%s\n",
25+ name, exec, launch_context ? "true" : "false");
26
27 g_free(name); g_free(exec);
28 /* g_debug("Desktop file: \n%s", desktopdata); */
29@@ -653,7 +654,6 @@
30 g_key_file_free(launcher);
31 return FALSE;
32 }
33-
34 gboolean launched = g_app_info_launch(G_APP_INFO(appinfo), NULL, launch_context, &error);
35
36 if (error != NULL) {
37@@ -669,6 +669,20 @@
38 return launched;
39 }
40
41+/**
42+ indicator_desktop_shortcuts_nick_exec:
43+ @ids: The #IndicatorDesktopShortcuts object to look in
44+ @nick: Which command that we're referencing.
45+
46+ Here we take a @nick and try and execute the action that is
47+ associated with it. The @nick parameter should be gotten
48+ from #indicator_desktop_shortcuts_get_nicks though it's not
49+ required that the exact memory location be the same.
50+ This function is deprecated and shouldn't be used in newly
51+ written code.
52+
53+ Return value: #TRUE on success or #FALSE on error.
54+*/
55 gboolean
56 indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gchar * nick)
57 {

Subscribers

People subscribed via source and target branches