aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/com.canonical.indicator.messages.application.xml2
-rw-r--r--libmessaging-menu/messaging-menu-app.c23
-rw-r--r--src/im-application-list.c2
3 files changed, 26 insertions, 1 deletions
diff --git a/common/com.canonical.indicator.messages.application.xml b/common/com.canonical.indicator.messages.application.xml
index f37cd25..5e99780 100644
--- a/common/com.canonical.indicator.messages.application.xml
+++ b/common/com.canonical.indicator.messages.application.xml
@@ -12,6 +12,8 @@
</method>
<method name="ActivateMessage">
<arg type="s" name="message_id" direction="in" />
+ <arg type="s" name="action_id" direction="in" />
+ <arg type="av" name="parameter" direction="in" />
</method>
<method name="Dismiss">
<arg type="as" name="sources" direction="in" />
diff --git a/libmessaging-menu/messaging-menu-app.c b/libmessaging-menu/messaging-menu-app.c
index cea0eb9..8b9f76b 100644
--- a/libmessaging-menu/messaging-menu-app.c
+++ b/libmessaging-menu/messaging-menu-app.c
@@ -546,6 +546,8 @@ static gboolean
messaging_menu_app_activate_message (IndicatorMessagesApplication *app_interface,
GDBusMethodInvocation *invocation,
const gchar *message_id,
+ const gchar *action_id,
+ GVariant *params,
gpointer user_data)
{
MessagingMenuApp *app = user_data;
@@ -554,7 +556,26 @@ messaging_menu_app_activate_message (IndicatorMessagesApplication *app_interface
msg = g_hash_table_lookup (app->messages, message_id);
if (msg)
{
- g_signal_emit_by_name (msg, "activate", NULL, NULL);
+ if (*action_id)
+ {
+ gchar *signal;
+
+ signal = g_strconcat ("activate::", action_id, NULL);
+
+ if (g_variant_n_children (params))
+ {
+ GVariant *param = g_variant_get_child_value (params, 0);
+ g_signal_emit_by_name (msg, signal, action_id, param);
+ g_variant_unref (param);
+ }
+ else
+ g_signal_emit_by_name (msg, signal, action_id, NULL);
+
+ g_free (signal);
+ }
+ else
+ g_signal_emit_by_name (msg, "activate", NULL, NULL);
+
/* Activate implies removing the message, no need for MessageRemoved */
messaging_menu_app_remove_message_internal (app, message_id);
diff --git a/src/im-application-list.c b/src/im-application-list.c
index 4eaaed0..7c53e69 100644
--- a/src/im-application-list.c
+++ b/src/im-application-list.c
@@ -152,6 +152,8 @@ im_application_list_message_activated (GSimpleAction *action,
{
indicator_messages_application_call_activate_message (app->proxy,
message_id,
+ "",
+ g_variant_new_array (G_VARIANT_TYPE_VARIANT, NULL, 0),
app->cancellable,
NULL, NULL);
}