aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiklas Wenzel <nikwen.developer@gmail.com>2015-04-25 22:49:57 +0200
committerNiklas Wenzel <nikwen.developer@gmail.com>2015-04-25 22:49:57 +0200
commitde0c62586869f6a6a2d093e3b352bc9db85c23b9 (patch)
tree4c3c8c4cf0915a8a8ec867822d29d6abe4e6f3ad /src
parent6a466d23f9424f095801b2d1ba608cf06b0a86a7 (diff)
downloadayatana-indicator-messages-de0c62586869f6a6a2d093e3b352bc9db85c23b9.tar.gz
ayatana-indicator-messages-de0c62586869f6a6a2d093e3b352bc9db85c23b9.tar.bz2
ayatana-indicator-messages-de0c62586869f6a6a2d093e3b352bc9db85c23b9.zip
Unescape action names when passing them to the proxy in im_application_list_remove_all()
Diffstat (limited to 'src')
-rw-r--r--src/im-application-list.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c
index 36b2ff3..82025cc 100644
--- a/src/im-application-list.c
+++ b/src/im-application-list.c
@@ -522,10 +522,38 @@ im_application_list_remove_all (GSimpleAction *action,
if (app->proxy != NULL) /* If it is remote, we tell the app we've cleared */
{
+ /* Unescape action names */
+ GArray *unescaped_source_actions_array = g_array_new(TRUE, FALSE, sizeof(gchar*));
+ for (it = source_actions; *it; it++)
+ {
+ gchar *action_name;
+
+ action_name = unescape_action_name (*it);
+
+ g_array_append_val(unescaped_source_actions_array, action_name);
+ }
+
+ gchar **unescaped_source_actions = (gchar**) g_array_free(unescaped_source_actions_array, FALSE);
+
+ GArray *unescaped_message_actions_array = g_array_new(TRUE, FALSE, sizeof(gchar*));
+ for (it = message_actions; *it; it++)
+ {
+ gchar *action_name;
+
+ action_name = unescape_action_name (*it);
+
+ g_array_append_val(unescaped_message_actions_array, action_name);
+ }
+
+ gchar **unescaped_message_actions = (gchar**) g_array_free(unescaped_message_actions_array, FALSE);
+
indicator_messages_application_call_dismiss (app->proxy,
- (const gchar * const *) source_actions,
- (const gchar * const *) message_actions,
+ (const gchar * const *) unescaped_source_actions,
+ (const gchar * const *) unescaped_message_actions,
app->cancellable, NULL, NULL);
+
+ g_strfreev (unescaped_source_actions);
+ g_strfreev (unescaped_message_actions);
}
g_strfreev (source_actions);