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
=== modified file 'libindicator/indicator-desktop-shortcuts.c'
--- libindicator/indicator-desktop-shortcuts.c 2012-04-02 23:42:07 +0000
+++ libindicator/indicator-desktop-shortcuts.c 2013-04-05 11:26:42 +0000
@@ -567,7 +567,7 @@
567 Return value: #TRUE on success or #FALSE on error.567 Return value: #TRUE on success or #FALSE on error.
568*/568*/
569gboolean569gboolean
570indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gchar * nick)570indicator_desktop_shortcuts_nick_exec_with_context (IndicatorDesktopShortcuts * ids, const gchar * nick, GAppLaunchContext * launch_context)
571{571{
572 GError * error = NULL;572 GError * error = NULL;
573573
@@ -654,7 +654,7 @@
654 return FALSE;654 return FALSE;
655 }655 }
656656
657 gboolean launched = g_app_info_launch(G_APP_INFO(appinfo), NULL, NULL, &error);657 gboolean launched = g_app_info_launch(G_APP_INFO(appinfo), NULL, launch_context, &error);
658658
659 if (error != NULL) {659 if (error != NULL) {
660 g_warning("Unable to launch file from nick '%s': %s", nick, error->message);660 g_warning("Unable to launch file from nick '%s': %s", nick, error->message);
@@ -668,3 +668,9 @@
668668
669 return launched;669 return launched;
670}670}
671
672gboolean
673indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gchar * nick)
674{
675 return indicator_desktop_shortcuts_nick_exec_with_context (ids, nick, NULL);
676}
671677
=== modified file 'libindicator/indicator-desktop-shortcuts.h'
--- libindicator/indicator-desktop-shortcuts.h 2010-02-15 21:44:00 +0000
+++ libindicator/indicator-desktop-shortcuts.h 2013-04-05 11:26:42 +0000
@@ -24,6 +24,7 @@
24#ifndef __INDICATOR_DESKTOP_SHORTCUTS_H__24#ifndef __INDICATOR_DESKTOP_SHORTCUTS_H__
25#define __INDICATOR_DESKTOP_SHORTCUTS_H__25#define __INDICATOR_DESKTOP_SHORTCUTS_H__
2626
27#include <gio/gio.h>
27#include <glib.h>28#include <glib.h>
28#include <glib-object.h>29#include <glib-object.h>
2930
@@ -60,14 +61,19 @@
60 GObject parent;61 GObject parent;
61};62};
6263
63GType indicator_desktop_shortcuts_get_type (void);64GType indicator_desktop_shortcuts_get_type (void);
64IndicatorDesktopShortcuts * indicator_desktop_shortcuts_new (const gchar * file,65IndicatorDesktopShortcuts * indicator_desktop_shortcuts_new (const gchar * file,
65 const gchar * identity);66 const gchar * identity);
66const gchar ** indicator_desktop_shortcuts_get_nicks (IndicatorDesktopShortcuts * ids);67const gchar ** indicator_desktop_shortcuts_get_nicks (IndicatorDesktopShortcuts * ids);
67gchar * indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids,68gchar * indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids,
68 const gchar * nick);69 const gchar * nick);
69gboolean indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids,70gboolean indicator_desktop_shortcuts_nick_exec_with_context (IndicatorDesktopShortcuts * ids,
70 const gchar * nick);71 const gchar * nick,
72 GAppLaunchContext * launch_context);
73
74GLIB_DEPRECATED_FOR(indicator_desktop_shortcuts_nick_exec_with_context)
75gboolean indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids,
76 const gchar * nick);
7177
72G_END_DECLS78G_END_DECLS
7379

Subscribers

People subscribed via source and target branches