diff options
-rw-r--r-- | data/com.canonical.indicator.messages | 2 | ||||
-rw-r--r-- | debian/changelog | 56 | ||||
-rw-r--r-- | debian/control | 1 | ||||
-rwxr-xr-x | libmessaging-menu/client-example.py | 21 | ||||
-rw-r--r-- | libmessaging-menu/messaging-menu-app.c | 2 | ||||
-rw-r--r-- | libmessaging-menu/messaging-menu-message.c | 2 | ||||
-rw-r--r-- | m4/gcov.m4 | 2 | ||||
-rw-r--r-- | src/im-application-list.c | 34 | ||||
-rw-r--r-- | tests/manual | 11 |
9 files changed, 124 insertions, 7 deletions
diff --git a/data/com.canonical.indicator.messages b/data/com.canonical.indicator.messages index 2bc6156..2210b6b 100644 --- a/data/com.canonical.indicator.messages +++ b/data/com.canonical.indicator.messages @@ -8,7 +8,9 @@ ObjectPath=/com/canonical/indicator/messages/desktop [phone] ObjectPath=/com/canonical/indicator/messages/phone +Position=100 [phone_greeter] ObjectPath=/com/canonical/indicator/messages/phone +Position=100 diff --git a/debian/changelog b/debian/changelog index e3d1e97..230a105 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,59 @@ +indicator-messages (13.10.1+14.10.20141009-0ubuntu1) utopic; urgency=low + + [ Ted Gould ] + * Symbolic icon test on Unity8 phone + + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 09 Oct 2014 13:30:07 +0000 + +indicator-messages (13.10.1+14.10.20141007-0ubuntu1) utopic; urgency=low + + [ Charles Kerr ] + * Make title string match updated designs. (LP: #1377286) + + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 07 Oct 2014 19:41:05 +0000 + +indicator-messages (13.10.1+14.10.20141006-0ubuntu1) utopic; urgency=low + + [ Charles Kerr ] + * Move the position of this indicator on the panel. (LP: #1377294) + + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 06 Oct 2014 17:25:02 +0000 + +indicator-messages (13.10.1+14.10.20140925-0ubuntu1) utopic; urgency=low + + [ Lars Uebernickel ] + * Support X-Ubuntu-SymbolicIcon in desktop files (LP: #1365408) + + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 25 Sep 2014 14:41:04 +0000 + +indicator-messages (13.10.1+14.10.20140814.1-0ubuntu2) utopic; urgency=low + + * Add "Multi-Arch: same" to libmessaging-menu0 + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 02 Sep 2014 11:17:34 +0200 + +indicator-messages (13.10.1+14.10.20140814.1-0ubuntu1) utopic; urgency=low + + [ Charles Kerr ] + * Change the title to "Notification center". + + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 14 Aug 2014 14:55:23 +0000 + +indicator-messages (13.10.1+14.10.20140725-0ubuntu1) utopic; urgency=low + + [ Lars Uebernickel ] + * messaging-menu-message: add missing break statements + + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 25 Jul 2014 08:59:38 +0000 + +indicator-messages (13.10.1+14.10.20140611-0ubuntu1) utopic; urgency=low + + [ Charles Kerr ] + * Add example of using libmessaging-menu from a python client (LP: + #1315384) + + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 11 Jun 2014 17:23:06 +0000 + indicator-messages (13.10.1+14.04.20140410-0ubuntu1) trusty; urgency=low [ Lars Uebernickel ] diff --git a/debian/control b/debian/control index 164cded..b2c899d 100644 --- a/debian/control +++ b/debian/control @@ -51,6 +51,7 @@ Description: indicator that collects messages that need a response Package: libmessaging-menu0 Architecture: any +Multi-Arch: same Section: libs Depends: ${shlibs:Depends}, ${misc:Depends}, diff --git a/libmessaging-menu/client-example.py b/libmessaging-menu/client-example.py new file mode 100755 index 0000000..76cb326 --- /dev/null +++ b/libmessaging-menu/client-example.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +from gi.repository import GLib, Gio, MessagingMenu + +mmapp = MessagingMenu.App(desktop_id='evolution.desktop') + +# make the application appear in the messaging menu. The name and icon are taken from the desktop file above +mmapp.register() + +def source_activated(mmapp, source_id): + print('source {} activated'.format(source_id)) + +# do something when the user clicks on a source. The source will be removed automatically +mmapp.connect('activate-source', source_activated) + +# add a 'source' (a menu item below the application's name) with the name 'Inbox' and a count of 7 +icon = Gio.ThemedIcon.new_with_default_fallbacks('my-source-icon') +mmapp.append_source_with_count('inbox', icon, 'Inbox', 7) + +# this is not necessary for gtk applications, which start a mainloop in gtk_main() +GLib.MainLoop().run() diff --git a/libmessaging-menu/messaging-menu-app.c b/libmessaging-menu/messaging-menu-app.c index c1f33f0..83dfb41 100644 --- a/libmessaging-menu/messaging-menu-app.c +++ b/libmessaging-menu/messaging-menu-app.c @@ -207,7 +207,7 @@ messaging_menu_app_get_dbus_object_path (MessagingMenuApp *app) g_app_info_get_id (G_APP_INFO (app->appinfo)), NULL); - g_strcanon (path, "/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", '_'); + g_strcanon (path, "/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", '_'); return path; } diff --git a/libmessaging-menu/messaging-menu-message.c b/libmessaging-menu/messaging-menu-message.c index daa549a..4bf8b7c 100644 --- a/libmessaging-menu/messaging-menu-message.c +++ b/libmessaging-menu/messaging-menu-message.c @@ -139,6 +139,7 @@ messaging_menu_message_get_property (GObject *object, case PROP_BODY: g_value_set_string (value, msg->body); + break; case PROP_TIME: g_value_set_int64 (value, msg->time); @@ -181,6 +182,7 @@ messaging_menu_message_set_property (GObject *object, case PROP_BODY: msg->body = g_value_dup_string (value); + break; case PROP_TIME: msg->time = g_value_get_int64 (value); @@ -30,7 +30,7 @@ AC_DEFUN([AC_TDD_GCOV], AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.]) fi - lcov_version_list="1.6 1.7 1.8 1.9 1.10" + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11" AC_CHECK_PROG(LCOV, lcov, lcov) AC_CHECK_PROG(GENHTML, genhtml, genhtml) diff --git a/src/im-application-list.c b/src/im-application-list.c index 7862f1a..7e8032b 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -194,7 +194,7 @@ im_application_list_update_root_action (ImApplicationList *list) g_object_unref(icon); /* title */ - g_variant_builder_add (&builder, "{sv}", "title", g_variant_new_string (_("Incoming"))); + g_variant_builder_add (&builder, "{sv}", "title", g_variant_new_string (_("Notifications"))); /* accessible description */ g_variant_builder_open(&builder, G_VARIANT_TYPE_DICT_ENTRY); @@ -886,14 +886,40 @@ im_application_list_sources_listed (GObject *source_object, } static GIcon * -get_symbolic_app_icon (GAppInfo *info) +get_symbolic_app_icon (GDesktopAppInfo *info) { + gchar *x_symbolic_icon; GIcon *icon; const gchar * const *names; gchar *symbolic_name; GIcon *symbolic_icon; - icon = g_app_info_get_icon (info); + /* If X-Ubuntu-SymbolicIcon exists, use that. It is always interpreted + * as a filename. + * + * Simply appending -symbolic to the normal icon doesn't work for + * icons specified by file name, because the symbolic icon might be in + * a different format (symbolic icons tend to be svg and normal icons + * png). Also, icons specified by file names don't allow for fallbacks + * (without stating the file from this process), and we'd want to fall + * back to the normal app icon. + * + * See lp: #1365408 + */ + if ((x_symbolic_icon = g_desktop_app_info_get_string (info, "X-Ubuntu-SymbolicIcon"))) + { + GFile *file; + + file = g_file_new_for_path (x_symbolic_icon); + symbolic_icon = g_file_icon_new (file); + + g_object_unref (file); + g_free (x_symbolic_icon); + + return symbolic_icon; + } + + icon = g_app_info_get_icon (G_APP_INFO (info)); if (icon == NULL) return NULL; @@ -1014,7 +1040,7 @@ im_application_list_message_added (Application *app, im_application_list_update_root_action (app->list); } - app_icon = get_symbolic_app_icon (G_APP_INFO (app->info)); + app_icon = get_symbolic_app_icon (app->info); g_signal_emit (app->list, signals[MESSAGE_ADDED], 0, app->id, app_icon, id, serialized_icon, title, diff --git a/tests/manual b/tests/manual index 7d5404f..ed930a9 100644 --- a/tests/manual +++ b/tests/manual @@ -17,8 +17,17 @@ Test-case indicator-messages/unity8-items-check <dl> <dt>Login to a user session running Unity 8</dt> <dt>Pull down the top panel until it sticks open</dt> - <dt>Navigate through the tabs until "Incoming" is shown</dt> + <dt>Navigate through the tabs until "Notifications" is shown</dt> <dd>Incoming is at the top of the menu</dd> <dd>The menu is populated with items</dd> </dl> +Test-case indicator-messages/unity8-phone-symbolic-icon +<dl> + <dt>NOTE: Requires Unity8 and Telephony hardware</dt> + <dt>Login to a user session running Unity 8</dt> + <dt>Send an SMS to the device</dt> + <dd>Icon on the panel should change color signifying a new message</dd> + <dt>Verify the application icon in the menu item is monochromatic</dt> + <dd>On the right side of the item the application icon should have no color</dd> +</dl> |