diff options
author | Ted Gould <ted@gould.cx> | 2014-11-03 20:56:20 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-11-03 20:56:20 +0000 |
commit | 2b470ce8dfbdfc6f6d7c5344bef76784b3f5915a (patch) | |
tree | 84b83a5df9e93a07dba3dc512e6354aa54439e33 /src/im-phone-menu.c | |
parent | 8ff11f946024ddd04f1e5322efcd57ecb147efdf (diff) | |
parent | 330352f2d5983357dad382b89bb4c0be803cf7cb (diff) | |
download | ayatana-indicator-messages-2b470ce8dfbdfc6f6d7c5344bef76784b3f5915a.tar.gz ayatana-indicator-messages-2b470ce8dfbdfc6f6d7c5344bef76784b3f5915a.tar.bz2 ayatana-indicator-messages-2b470ce8dfbdfc6f6d7c5344bef76784b3f5915a.zip |
Add filtering for lock screen. Fixes: 1358340
Approved by: PS Jenkins bot
Diffstat (limited to 'src/im-phone-menu.c')
-rw-r--r-- | src/im-phone-menu.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/im-phone-menu.c b/src/im-phone-menu.c index 754fc2b..58a23ff 100644 --- a/src/im-phone-menu.c +++ b/src/im-phone-menu.c @@ -142,12 +142,13 @@ im_phone_menu_init (ImPhoneMenu *menu) } ImPhoneMenu * -im_phone_menu_new (ImApplicationList *applist) +im_phone_menu_new (ImApplicationList *applist, gboolean greeter) { g_return_val_if_fail (IM_IS_APPLICATION_LIST (applist), NULL); return g_object_new (IM_TYPE_PHONE_MENU, "application-list", applist, + "on-greeter", greeter, NULL); } @@ -179,10 +180,12 @@ im_phone_menu_add_message (ImPhoneMenu *menu, gint n_messages; gint pos; GVariant *serialized_app_icon; + gboolean show_data; g_return_if_fail (IM_IS_PHONE_MENU (menu)); g_return_if_fail (app_id); + show_data = im_menu_show_data(IM_MENU (menu)); action_name = g_strconcat (app_id, ".msg.", id, NULL); item = g_menu_item_new (title, NULL); @@ -190,8 +193,10 @@ im_phone_menu_add_message (ImPhoneMenu *menu, 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); + if (show_data) + g_menu_item_set_attribute (item, "x-canonical-subtitle", "s", subtitle); + if (show_data) + g_menu_item_set_attribute (item, "x-canonical-text", "s", body); g_menu_item_set_attribute (item, "x-canonical-time", "x", time); if (serialized_icon) @@ -203,7 +208,7 @@ im_phone_menu_add_message (ImPhoneMenu *menu, g_variant_unref (serialized_app_icon); } - if (actions) + if (actions && show_data) g_menu_item_set_attribute (item, "x-canonical-message-actions", "v", actions); n_messages = g_menu_model_get_n_items (G_MENU_MODEL (menu->message_section)); |