aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/im-application-list.c6
-rw-r--r--src/im-phone-menu.c11
-rw-r--r--src/im-phone-menu.h1
3 files changed, 15 insertions, 3 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c
index 1f901ec..c446d12 100644
--- a/src/im-application-list.c
+++ b/src/im-application-list.c
@@ -271,13 +271,15 @@ im_application_list_class_init (ImApplicationListClass *klass)
NULL, NULL,
g_cclosure_marshal_generic,
G_TYPE_NONE,
- 8,
+ 10,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_VARIANT,
G_TYPE_INT64,
G_TYPE_BOOLEAN);
@@ -529,7 +531,7 @@ im_application_list_message_added (Application *app,
g_simple_action_group_insert (app->message_actions, G_ACTION (action));
g_signal_emit (app->list, signals[MESSAGE_ADDED], 0,
- app->id, app_iconstr, id, iconstr, title, subtitle, body, time, draws_attention);
+ app->id, app_iconstr, id, iconstr, title, subtitle, body, actions, time, draws_attention);
g_variant_unref (actions);
g_free (app_iconstr);
diff --git a/src/im-phone-menu.c b/src/im-phone-menu.c
index 728c08b..6e511ac 100644
--- a/src/im-phone-menu.c
+++ b/src/im-phone-menu.c
@@ -151,6 +151,7 @@ im_phone_menu_add_message (ImPhoneMenu *menu,
const gchar *title,
const gchar *subtitle,
const gchar *body,
+ GVariant *actions,
gint64 time)
{
GMenuItem *item;
@@ -162,7 +163,15 @@ im_phone_menu_add_message (ImPhoneMenu *menu,
action_name = g_strconcat (app_id, ".msg.", id, NULL);
item = g_menu_item_new (title, action_name);
- g_menu_item_set_attribute (item, "x-canonical-type", "s", "com.canonical.indicator.messages.messageitem");
+
+ if (g_variant_n_children (actions))
+ {
+ g_menu_item_set_attribute (item, "x-canonical-type", "s", "com.canonical.indicator.messages.snapdecision");
+ g_menu_item_set_attribute (item, "x-canonical-message-actions", "v", actions);
+ }
+ else
+ g_menu_item_set_attribute (item, "x-canonical-type", "s", "com.canonical.indicator.messages.messageitem");
+
g_menu_item_set_attribute (item, "x-canonical-message-id", "s", id);
g_menu_item_set_attribute (item, "x-canonical-subtitle", "s", subtitle);
g_menu_item_set_attribute (item, "x-canonical-text", "s", body);
diff --git a/src/im-phone-menu.h b/src/im-phone-menu.h
index f6a6118..84908e2 100644
--- a/src/im-phone-menu.h
+++ b/src/im-phone-menu.h
@@ -45,6 +45,7 @@ void im_phone_menu_add_message (ImPhoneMenu *men
const gchar *title,
const gchar *subtitle,
const gchar *body,
+ GVariant *actions,
gint64 time);
void im_phone_menu_remove_message (ImPhoneMenu *menu,