diff -Nru indicator-messages-0.5.91/AUTHORS indicator-messages-0.5.92/AUTHORS --- indicator-messages-0.5.91/AUTHORS 2012-02-14 21:13:25.000000000 +0000 +++ indicator-messages-0.5.92/AUTHORS 2012-02-23 05:55:37.000000000 +0000 @@ -2,6 +2,7 @@ Allan LeSage Andrea Cimitan + Charles Kerr Chow Loong Jin Chris Coulson cody diff -Nru indicator-messages-0.5.91/ChangeLog indicator-messages-0.5.92/ChangeLog --- indicator-messages-0.5.91/ChangeLog 2012-02-14 21:13:24.000000000 +0000 +++ indicator-messages-0.5.92/ChangeLog 2012-02-23 05:55:37.000000000 +0000 @@ -1,5 +1,41 @@ # Generated by Makefile. Do not edit. +2012-02-22 Ted Gould + + 0.5.92 + +2012-02-22 Ted Gould + + Remove unneeded goto's and clean up the code + +2012-02-21 Charles Kerr + + silence LP Bug #937438 - Coverity got confused by goto's and gave Coverity PW.BRANCH_PAST_INITIALIZATION - CID 10663 + +2012-02-21 Charles Kerr + + trivial: fix a comment typo + +2012-02-21 Charles Kerr + + trivial: fix error message grammar + +2012-02-21 Charles Kerr + + trivial: fix comment typo + +2012-02-21 Charles Kerr + + trivial: remove unnecessary cast + +2012-02-16 Michael Terry + + tell accountsservices about whether the user has messages or not + +2012-02-15 Michael Terry + + tell accounts service about message status + 2012-02-14 Ted Gould 0.5.91 diff -Nru indicator-messages-0.5.91/configure indicator-messages-0.5.92/configure --- indicator-messages-0.5.91/configure 2012-02-14 21:13:05.000000000 +0000 +++ indicator-messages-0.5.92/configure 2012-02-23 05:55:29.000000000 +0000 @@ -2776,7 +2776,7 @@ # Define the identity of the package. PACKAGE=indicator-messages - VERSION=0.5.91 + VERSION=0.5.92 cat >>confdefs.h <<_ACEOF diff -Nru indicator-messages-0.5.91/configure.ac indicator-messages-0.5.92/configure.ac --- indicator-messages-0.5.91/configure.ac 2012-02-14 21:12:51.000000000 +0000 +++ indicator-messages-0.5.92/configure.ac 2012-02-23 05:55:18.000000000 +0000 @@ -4,7 +4,7 @@ AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-messages, 0.5.91) +AM_INIT_AUTOMAKE(indicator-messages, 0.5.92) AM_MAINTAINER_MODE diff -Nru indicator-messages-0.5.91/debian/changelog indicator-messages-0.5.92/debian/changelog --- indicator-messages-0.5.91/debian/changelog 2012-02-15 20:32:35.000000000 +0000 +++ indicator-messages-0.5.92/debian/changelog 2012-02-23 08:01:10.000000000 +0000 @@ -1,3 +1,18 @@ +indicator-messages (0.5.92-0ubuntu1) precise; urgency=low + + [ Ted Gould ] + * New upstream release. + * Fix goto handling (by removing) (LP: #937441, LP: #937438) + * Tell accountsservice when user has messages for the benefit of + LightDM. + * Dropping debian/patches: Merged upstream + + [ Ken VanDine ] + * debian/source/format + - dropped "3.0 (quilt), it doesn't play well with bzr maintained packages + + -- Ken VanDine Thu, 23 Feb 2012 02:48:09 -0500 + indicator-messages (0.5.91-0ubuntu3) precise; urgency=low * debian/source/format: diff -Nru indicator-messages-0.5.91/debian/patches/series indicator-messages-0.5.92/debian/patches/series --- indicator-messages-0.5.91/debian/patches/series 2012-02-15 19:38:34.000000000 +0000 +++ indicator-messages-0.5.92/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -tell-accounts-service.patch diff -Nru indicator-messages-0.5.91/debian/patches/tell-accounts-service.patch indicator-messages-0.5.92/debian/patches/tell-accounts-service.patch --- indicator-messages-0.5.91/debian/patches/tell-accounts-service.patch 2012-02-15 19:39:06.000000000 +0000 +++ indicator-messages-0.5.92/debian/patches/tell-accounts-service.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,240 +0,0 @@ -Index: indicator-messages/src/messages-service-dbus.c -=================================================================== ---- indicator-messages.orig/src/messages-service-dbus.c 2012-02-15 14:36:39.800065000 -0500 -+++ indicator-messages/src/messages-service-dbus.c 2012-02-15 14:39:02.823505930 -0500 -@@ -42,6 +42,8 @@ - struct _MessageServiceDbusPrivate - { - GDBusConnection * connection; -+ GCancellable * accounts_cancel; -+ GDBusProxy * accounts_user; - gboolean dot; - gboolean hidden; - }; -@@ -155,9 +157,199 @@ - } - - static void -+accounts_notify_cb (GObject *source_object, GAsyncResult *res, -+ gpointer user_data) -+{ -+ GError * error = NULL; -+ GVariant * answer = g_dbus_proxy_call_finish(G_DBUS_PROXY(source_object), res, &error); -+ -+ if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { -+ g_error_free(error); -+ return; /* Must exit before accessing freed memory */ -+ } -+ -+ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(user_data); -+ -+ if (priv->accounts_cancel != NULL) { -+ g_object_unref(priv->accounts_cancel); -+ priv->accounts_cancel = NULL; -+ } -+ -+ if (error != NULL) { -+ g_warning("Unable to get notify accounts service of message status: %s", error->message); -+ g_error_free(error); -+ return; -+ } -+ -+ g_variant_unref (answer); -+} -+ -+static void -+accounts_notify (MessageServiceDbus *self) -+{ -+ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(self); -+ -+ if (priv->accounts_user == NULL) -+ return; /* We're not able to talk to accounts service */ -+ -+ if (priv->accounts_cancel != NULL) { -+ /* Cancel old notify before starting new one */ -+ g_cancellable_cancel(priv->accounts_cancel); -+ g_object_unref(priv->accounts_cancel); -+ priv->accounts_cancel = NULL; -+ } -+ -+ priv->accounts_cancel = g_cancellable_new(); -+ g_dbus_proxy_call(priv->accounts_user, -+ "SetXHasMessages", -+ g_variant_new ("(b)", priv->dot), -+ G_DBUS_CALL_FLAGS_NONE, -+ -1, /* timeout */ -+ priv->accounts_cancel, -+ accounts_notify_cb, -+ self); -+} -+ -+static void -+get_accounts_user_proxy_cb (GObject *source_object, GAsyncResult *res, -+ gpointer user_data) -+{ -+ GError * error = NULL; -+ GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error); -+ -+ if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { -+ g_error_free(error); -+ return; /* Must exit before accessing freed memory */ -+ } -+ -+ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(user_data); -+ -+ if (priv->accounts_cancel != NULL) { -+ g_object_unref(priv->accounts_cancel); -+ priv->accounts_cancel = NULL; -+ } -+ -+ if (error != NULL) { -+ g_warning("Unable to get proxy of accountsservice: %s", error->message); -+ g_error_free(error); -+ return; -+ } -+ -+ priv->accounts_user = proxy; -+ accounts_notify (MESSAGE_SERVICE_DBUS (user_data)); -+} -+ -+static void -+get_accounts_user_find_user_cb (GObject *source_object, GAsyncResult *res, -+ gpointer user_data) -+{ -+ GError * error = NULL; -+ GVariant * answer = g_dbus_proxy_call_finish(G_DBUS_PROXY(source_object), res, &error); -+ -+ /* We're done with main accounts proxy now */ -+ g_object_unref (source_object); -+ -+ if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { -+ g_error_free(error); -+ return; /* Must exit before accessing freed memory */ -+ } -+ -+ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(user_data); -+ -+ if (priv->accounts_cancel != NULL) { -+ g_object_unref(priv->accounts_cancel); -+ priv->accounts_cancel = NULL; -+ } -+ -+ if (error != NULL) { -+ g_warning("Unable to get object name of user from accountsservice: %s", error->message); -+ g_error_free(error); -+ return; -+ } -+ -+ if (!g_variant_is_of_type (answer, G_VARIANT_TYPE ("(o)"))) { -+ g_warning("Unexpected type from FindUserByName: %s", g_variant_get_type_string (answer)); -+ g_variant_unref(answer); -+ return; -+ } -+ -+ const gchar *path; -+ g_variant_get(answer, "(&o)", &path); -+ -+ priv->accounts_cancel = g_cancellable_new(); -+ g_dbus_proxy_new_for_bus(G_BUS_TYPE_SYSTEM, -+ G_DBUS_PROXY_FLAGS_NONE, -+ NULL, -+ "org.freedesktop.Accounts", -+ path, -+ "org.freedesktop.Accounts.User", -+ priv->accounts_cancel, -+ get_accounts_user_proxy_cb, -+ user_data); -+ -+ g_variant_unref (answer); -+} -+ -+static void -+get_accounts_proxy_cb (GObject *source_object, GAsyncResult *res, -+ gpointer user_data) -+{ -+ GError * error = NULL; -+ GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error); -+ -+ if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { -+ g_error_free(error); -+ return; /* Must exit before accessing freed memory */ -+ } -+ -+ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(user_data); -+ -+ if (priv->accounts_cancel != NULL) { -+ g_object_unref(priv->accounts_cancel); -+ priv->accounts_cancel = NULL; -+ } -+ -+ if (error != NULL) { -+ g_warning("Unable to get proxy of accountsservice: %s", error->message); -+ g_error_free(error); -+ return; -+ } -+ -+ priv->accounts_cancel = g_cancellable_new(); -+ g_dbus_proxy_call(proxy, -+ "FindUserByName", -+ g_variant_new ("(s)", g_get_user_name ()), -+ G_DBUS_CALL_FLAGS_NONE, -+ -1, /* timeout */ -+ priv->accounts_cancel, -+ get_accounts_user_find_user_cb, -+ user_data); -+} -+ -+static void -+get_accounts_proxy (MessageServiceDbus *self) -+{ -+ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(self); -+ -+ g_return_if_fail(priv->accounts_cancel == NULL); -+ -+ priv->accounts_cancel = g_cancellable_new(); -+ g_dbus_proxy_new_for_bus(G_BUS_TYPE_SYSTEM, -+ G_DBUS_PROXY_FLAGS_NONE, -+ NULL, -+ "org.freedesktop.Accounts", -+ "/org/freedesktop/Accounts", -+ "org.freedesktop.Accounts", -+ priv->accounts_cancel, -+ get_accounts_proxy_cb, -+ self); -+} -+ -+static void - message_service_dbus_init (MessageServiceDbus *self) - { - g_bus_get(G_BUS_TYPE_SESSION, NULL, connection_cb, self); -+ get_accounts_proxy (self); - - MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(self); - -@@ -177,6 +369,17 @@ - priv->connection = NULL; - } - -+ if (priv->accounts_cancel != NULL) { -+ g_cancellable_cancel(priv->accounts_cancel); -+ g_object_unref(priv->accounts_cancel); -+ priv->accounts_cancel = NULL; -+ } -+ -+ if (priv->accounts_user != NULL) { -+ g_object_unref(priv->accounts_user); -+ priv->accounts_user = NULL; -+ } -+ - G_OBJECT_CLASS (message_service_dbus_parent_class)->dispose (object); - return; - } -@@ -240,6 +443,8 @@ - g_variant_new("(b)", priv->dot), - NULL); - } -+ -+ accounts_notify (self); - } - return; - } diff -Nru indicator-messages-0.5.91/debian/source/format indicator-messages-0.5.92/debian/source/format --- indicator-messages-0.5.91/debian/source/format 2012-02-23 08:01:09.000000000 +0000 +++ indicator-messages-0.5.92/debian/source/format 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -3.0 (quilt) diff -Nru indicator-messages-0.5.91/src/status-items.c indicator-messages-0.5.92/src/status-items.c --- indicator-messages-0.5.91/src/status-items.c 2012-02-10 04:32:09.000000000 +0000 +++ indicator-messages-0.5.92/src/status-items.c 2012-02-23 05:04:22.000000000 +0000 @@ -253,62 +253,66 @@ static gboolean load_status_provider (gpointer dir) { - gchar * provider = (gchar *)dir; + gchar * provider = dir; - if (!g_file_test(provider, G_FILE_TEST_EXISTS)) { - goto exit_final; + /* load the module */ + GModule * module = NULL; + if (g_file_test(provider, G_FILE_TEST_EXISTS)) { + g_debug("Loading status provider: %s", provider); + module = g_module_open(provider, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); + if (module == NULL) { + g_warning("Unable to open module: %s", provider); + } } - g_debug("Loading status provider: %s", provider); - - GModule * module; - - module = g_module_open(provider, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); - if (module == NULL) { - g_warning("Unable to module for: %s", provider); - goto exit_module_fail; - } - - /* Got it */ - GType (*type_func) (void); - if (!g_module_symbol(module, STATUS_PROVIDER_EXPORT_S, (gpointer *)&type_func)) { - g_warning("Unable to find type symbol in: %s", provider); - goto exit_module_fail; - } - - GType provider_type = type_func(); - if (provider_type == 0) { - g_warning("Unable to create type from: %s", provider); - goto exit_module_fail; + /* find the status provider's GType */ + GType provider_type = 0; + if (module != NULL) { + GType (*type_func) (void); + if (!g_module_symbol(module, STATUS_PROVIDER_EXPORT_S, (gpointer *)&type_func)) { + g_warning("Unable to find type symbol in: %s", provider); + } else { + provider_type = type_func(); + if (provider_type == 0) { + g_warning("Unable to create type from: %s", provider); + } + } } - StatusProvider * sprovider = STATUS_PROVIDER(g_object_new(provider_type, NULL)); - if (sprovider == NULL) { - g_warning("Unable to build provider from: %s", provider); - goto exit_module_fail; + /* instantiate the status provider */ + StatusProvider * sprovider = NULL; + if (provider_type != 0) { + sprovider = STATUS_PROVIDER(g_object_new(provider_type, NULL)); + if (sprovider == NULL) { + g_warning("Unable to build provider from: %s", provider); + } } - /* On update let's talk to all of them and create the aggregate - value to export */ - g_signal_connect(G_OBJECT(sprovider), STATUS_PROVIDER_SIGNAL_STATUS_CHANGED, G_CALLBACK(update_status), NULL); - - /* Attach the module object to the status provider so - that when the status provider is free'd the module - is close automatically. */ - g_object_set_data_full(G_OBJECT(sprovider), "status-provider-module", module, module_destroy_in_idle); - - status_providers = g_list_prepend(status_providers, sprovider); + /* use the provider */ + if (sprovider != NULL) { + /* On update let's talk to all of them and create the aggregate + value to export */ + g_signal_connect(G_OBJECT(sprovider), + STATUS_PROVIDER_SIGNAL_STATUS_CHANGED, + G_CALLBACK(update_status), NULL); + + /* Attach the module object to the status provider so + that when the status provider is free'd the module + is closed automatically. */ + g_object_set_data_full(G_OBJECT(sprovider), + "status-provider-module", + module, module_destroy_in_idle); + module = NULL; /* don't close module in this func */ - /* Force and update every time just so we know we're - in a consistent state*/ - update_status(); + status_providers = g_list_prepend(status_providers, sprovider); - goto exit_final; - -exit_module_fail: - g_module_close(module); + /* Force an update to ensure a consistent state */ + update_status(); + } -exit_final: + /* cleanup */ + if (module != NULL) + g_module_close(module); g_free(provider); - return FALSE; + return FALSE; /* only call this idle func once */ }