Merge lp:~3v1n0/libindicator/launch-shortucts-nicks-with-ctx-13.10 into lp:libindicator/13.10

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Lars Karlitski
Approved revision: 487
Merged at revision: 485
Proposed branch: lp:~3v1n0/libindicator/launch-shortucts-nicks-with-ctx-13.10
Merge into: lp:libindicator/13.10
Diff against target: 70 lines (+22/-10)
2 files modified
libindicator/indicator-desktop-shortcuts.c (+8/-2)
libindicator/indicator-desktop-shortcuts.h (+14/-8)
To merge this branch: bzr merge lp:~3v1n0/libindicator/launch-shortucts-nicks-with-ctx-13.10
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Lars Karlitski (community) Approve
Review via email: mp+157331@code.launchpad.net

Commit message

IndicatorDestkopShortcuts: add indicator_desktop_shortcuts_nick_exec_with_context

It allows to pass a GAppLaunchContext to pass platform-data when launching
actions. Deprecate old API.

Description of the change

Same as lp:~3v1n0/libindicator/launch-shortucts-nicks-with-ctx, but with old-API deprecation and whitespace adjustments.

To post a comment you must log in.
Revision history for this message
Lars Karlitski (larsu) wrote :

+1

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

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 2012-04-02 23:42:07 +0000
3+++ libindicator/indicator-desktop-shortcuts.c 2013-04-05 11:26:42 +0000
4@@ -567,7 +567,7 @@
5 Return value: #TRUE on success or #FALSE on error.
6 */
7 gboolean
8-indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gchar * nick)
9+indicator_desktop_shortcuts_nick_exec_with_context (IndicatorDesktopShortcuts * ids, const gchar * nick, GAppLaunchContext * launch_context)
10 {
11 GError * error = NULL;
12
13@@ -654,7 +654,7 @@
14 return FALSE;
15 }
16
17- gboolean launched = g_app_info_launch(G_APP_INFO(appinfo), NULL, NULL, &error);
18+ gboolean launched = g_app_info_launch(G_APP_INFO(appinfo), NULL, launch_context, &error);
19
20 if (error != NULL) {
21 g_warning("Unable to launch file from nick '%s': %s", nick, error->message);
22@@ -668,3 +668,9 @@
23
24 return launched;
25 }
26+
27+gboolean
28+indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gchar * nick)
29+{
30+ return indicator_desktop_shortcuts_nick_exec_with_context (ids, nick, NULL);
31+}
32
33=== modified file 'libindicator/indicator-desktop-shortcuts.h'
34--- libindicator/indicator-desktop-shortcuts.h 2010-02-15 21:44:00 +0000
35+++ libindicator/indicator-desktop-shortcuts.h 2013-04-05 11:26:42 +0000
36@@ -24,6 +24,7 @@
37 #ifndef __INDICATOR_DESKTOP_SHORTCUTS_H__
38 #define __INDICATOR_DESKTOP_SHORTCUTS_H__
39
40+#include <gio/gio.h>
41 #include <glib.h>
42 #include <glib-object.h>
43
44@@ -60,14 +61,19 @@
45 GObject parent;
46 };
47
48-GType indicator_desktop_shortcuts_get_type (void);
49-IndicatorDesktopShortcuts * indicator_desktop_shortcuts_new (const gchar * file,
50- const gchar * identity);
51-const gchar ** indicator_desktop_shortcuts_get_nicks (IndicatorDesktopShortcuts * ids);
52-gchar * indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids,
53- const gchar * nick);
54-gboolean indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids,
55- const gchar * nick);
56+GType indicator_desktop_shortcuts_get_type (void);
57+IndicatorDesktopShortcuts * indicator_desktop_shortcuts_new (const gchar * file,
58+ const gchar * identity);
59+const gchar ** indicator_desktop_shortcuts_get_nicks (IndicatorDesktopShortcuts * ids);
60+gchar * indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids,
61+ const gchar * nick);
62+gboolean indicator_desktop_shortcuts_nick_exec_with_context (IndicatorDesktopShortcuts * ids,
63+ const gchar * nick,
64+ GAppLaunchContext * launch_context);
65+
66+GLIB_DEPRECATED_FOR(indicator_desktop_shortcuts_nick_exec_with_context)
67+gboolean indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids,
68+ const gchar * nick);
69
70 G_END_DECLS
71

Subscribers

People subscribed via source and target branches