From 6fcd4248c16a4f6b0d21cece73b29cdbab6335bb Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Wed, 3 Oct 2012 07:50:22 +0200 Subject: Call gtk-update-icon-cache on $(datadir)/icons/hicolor That's were icons are installed, not $(pkgdatadir). --- data/icons/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index 17dca13..44cd81b 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = scalable 16x16 22x22 24x24 32x32 48x48 -gtk_update_icon_cache = gtk-update-icon-cache -f -t $(pkgdatadir)/icons/hicolor +gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor install-data-hook: update-icon-cache uninstall-hook: update-icon-cache -- cgit v1.2.3 From 2ab588d17de27d836a815eff1b310e323097b3db Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Tue, 9 Oct 2012 16:12:15 -0400 Subject: Fixed typo in docstring --- libmessaging-menu/messaging-menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmessaging-menu/messaging-menu.c b/libmessaging-menu/messaging-menu.c index 3c5c6d4..70861d3 100644 --- a/libmessaging-menu/messaging-menu.c +++ b/libmessaging-menu/messaging-menu.c @@ -34,7 +34,7 @@ * application through a desktop file id, which must be passed to * messaging_menu_app_new(). * - * To register the appliction with the Messaging Menu, call + * To register the application with the Messaging Menu, call * messaging_menu_app_register(). This signifies that the application * should be present in the menu and be marked as "running". * -- cgit v1.2.3 From cad05adc731337b32532b43af127909131a6e582 Mon Sep 17 00:00:00 2001 From: Jason Conti Date: Wed, 10 Oct 2012 15:14:38 -0400 Subject: Unexport actions/menus on dispose --- libmessaging-menu/messaging-menu.c | 49 ++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/libmessaging-menu/messaging-menu.c b/libmessaging-menu/messaging-menu.c index 70861d3..4b88a08 100644 --- a/libmessaging-menu/messaging-menu.c +++ b/libmessaging-menu/messaging-menu.c @@ -105,9 +105,12 @@ struct _MessagingMenuApp gboolean status_set; GSimpleActionGroup *source_actions; GMenu *menu; + GDBusConnection *bus; IndicatorMessagesService *messages_service; guint watch_id; + guint action_export_id; + guint menu_export_id; GCancellable *cancellable; }; @@ -166,44 +169,41 @@ export_menus_and_actions (GObject *source, gpointer user_data) { MessagingMenuApp *app = user_data; - GDBusConnection *bus; GError *error = NULL; - guint id; gchar *object_path; object_path = messaging_menu_app_get_dbus_object_path (app); if (!object_path) return; - bus = g_bus_get_finish (res, &error); - if (bus == NULL) + app->bus = g_bus_get_finish (res, &error); + if (app->bus == NULL) { g_warning ("unable to connect to session bus: %s", error->message); g_error_free (error); return; } - id = g_dbus_connection_export_action_group (bus, - object_path, - G_ACTION_GROUP (app->source_actions), - &error); - if (!id) + app->action_export_id = g_dbus_connection_export_action_group (app->bus, + object_path, + G_ACTION_GROUP (app->source_actions), + &error); + if (!app->action_export_id) { g_warning ("unable to export action group: %s", error->message); g_error_free (error); } - id = g_dbus_connection_export_menu_model (bus, - object_path, - G_MENU_MODEL (app->menu), - &error); - if (!id) + app->menu_export_id = g_dbus_connection_export_menu_model (app->bus, + object_path, + G_MENU_MODEL (app->menu), + &error); + if (!app->menu_export_id) { g_warning ("unable to export menu: %s", error->message); g_error_free (error); } - g_object_unref (bus); g_free (object_path); } @@ -257,6 +257,21 @@ messaging_menu_app_dispose (GObject *object) { MessagingMenuApp *app = MESSAGING_MENU_APP (object); + if (app->bus) + { + + if (app->action_export_id > 0) + g_dbus_connection_unexport_action_group (app->bus, app->action_export_id); + + if (app->menu_export_id > 0) + g_dbus_connection_unexport_menu_model (app->bus, app->menu_export_id); + + app->action_export_id = 0; + app->menu_export_id = 0; + g_object_unref (app->bus); + app->bus = NULL; + } + if (app->watch_id > 0) { g_bus_unwatch_name (app->watch_id); @@ -416,6 +431,10 @@ messaging_menu_app_init (MessagingMenuApp *app) { app->registered = -1; app->status_set = FALSE; + app->bus = NULL; + + app->action_export_id = 0; + app->menu_export_id = 0; app->cancellable = g_cancellable_new (); -- cgit v1.2.3 From 3a5caf3d7f33d62aecb4e51db4cfb0be96d85dad Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 11 Oct 2012 12:34:29 +0200 Subject: libmessaging-menu: clear error before reusing it --- libmessaging-menu/messaging-menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmessaging-menu/messaging-menu.c b/libmessaging-menu/messaging-menu.c index 70861d3..6348dcf 100644 --- a/libmessaging-menu/messaging-menu.c +++ b/libmessaging-menu/messaging-menu.c @@ -190,7 +190,7 @@ export_menus_and_actions (GObject *source, if (!id) { g_warning ("unable to export action group: %s", error->message); - g_error_free (error); + g_clear_error (&error); } id = g_dbus_connection_export_menu_model (bus, @@ -200,7 +200,7 @@ export_menus_and_actions (GObject *source, if (!id) { g_warning ("unable to export menu: %s", error->message); - g_error_free (error); + g_clear_error (&error); } g_object_unref (bus); -- cgit v1.2.3 From 583ceac5a302189c69d5def703987e5be7b28ba7 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Wed, 24 Oct 2012 10:12:41 +0200 Subject: messaging_menu_app_set_source_icon: unset x-canonical-icon if NULL is passed --- libmessaging-menu/messaging-menu.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/libmessaging-menu/messaging-menu.c b/libmessaging-menu/messaging-menu.c index 59f93a2..cef5687 100644 --- a/libmessaging-menu/messaging-menu.c +++ b/libmessaging-menu/messaging-menu.c @@ -1033,7 +1033,7 @@ messaging_menu_app_set_source_label (MessagingMenuApp *app, * messaging_menu_app_set_source_icon: * @app: a #MessagingMenuApp * @source_id: a source id - * @icon: the new icon for the source + * @icon: (allow-none): the new icon for the source * * Changes the icon of @source_id to @icon. */ @@ -1044,7 +1044,6 @@ messaging_menu_app_set_source_icon (MessagingMenuApp *app, { gint pos; GMenuItem *item; - gchar *iconstr; g_return_if_fail (MESSAGING_MENU_IS_APP (app)); g_return_if_fail (source_id != NULL); @@ -1053,11 +1052,22 @@ messaging_menu_app_set_source_icon (MessagingMenuApp *app, if (item == NULL) return; - iconstr = icon ? g_icon_to_string (icon) : NULL; - g_menu_item_set_attribute (item, "x-canonical-icon", "s", iconstr); + if (icon) + { + gchar *iconstr; + + iconstr = g_icon_to_string (icon); + g_menu_item_set_attribute (item, "x-canonical-icon", "s", iconstr); + + g_free (iconstr); + } + else + { + g_menu_item_set_attribute_value (item, "x-canonical-icon", NULL); + } + g_menu_replace_item (app->menu, pos, item); - g_free (iconstr); g_object_unref (item); } -- cgit v1.2.3 From fdec219a2e7b5f1db4125ec4eff9d5dfc93188d2 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Wed, 24 Oct 2012 17:15:11 +0200 Subject: 12.10.5 --- NEWS | 7 +++++++ configure.ac | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 629218d..341594a 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,11 @@ +12.10.5 + +* fix crash caused by GError not being cleared (lp #1064314) +* fix crash when registering an app that was previously unregistered (lp #1065169) +* remove the icon if NULL is passed to source_set_icon (lp #1070421) +* call gtk-update-icon-cache (lp #1060618) + 12.10.4 * specify fallback icons for the ones with status emblem (lp #1056595) diff --git a/configure.ac b/configure.ac index 971bd96..8aa2e8a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -AC_INIT(indicator-messages, 12.10.4) +AC_INIT(indicator-messages, 12.10.5) AC_PREREQ(2.62) -- cgit v1.2.3