diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-12-17 12:59:42 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2012-12-17 12:59:42 +0000 |
commit | 9ea243e57d7d8797e586112a588621d74068dbd1 (patch) | |
tree | 4340d437d05aa3f6faa605947f3f55f79d8d3b87 /src | |
parent | b52a6391da6a2dadc8a8caf0fbee85c2a89ba19b (diff) | |
parent | 12c0fb327dfef1f778de252c715f3b61bfcaea28 (diff) | |
download | ayatana-indicator-messages-9ea243e57d7d8797e586112a588621d74068dbd1.tar.gz ayatana-indicator-messages-9ea243e57d7d8797e586112a588621d74068dbd1.tar.bz2 ayatana-indicator-messages-9ea243e57d7d8797e586112a588621d74068dbd1.zip |
Make handling of multiple processes with the same desktop id more robust.
Approved by Renato Araujo Oliveira Filho.
Diffstat (limited to 'src')
-rw-r--r-- | src/im-application-list.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c index 5a7f768..959a820 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -796,9 +796,10 @@ im_application_list_proxy_created (GObject *source_object, GError *error = NULL; app->proxy = indicator_messages_application_proxy_new_finish (result, &error); - if (!app) + if (!app->proxy) { - g_warning ("could not create application proxy: %s", error->message); + if (error->code != G_IO_ERROR_CANCELLED) + g_warning ("could not create application proxy: %s", error->message); g_error_free (error); return; } @@ -839,11 +840,17 @@ im_application_list_set_remote (ImApplicationList *list, return; } - if (app->proxy || app->cancellable) + if (app->cancellable) { - g_warning ("replacing '%s' at %s with %s", id, unique_bus_name, - g_dbus_proxy_get_name_owner (G_DBUS_PROXY (app->proxy))); + gchar *name_owner = NULL; + + if (app->proxy) + name_owner = g_dbus_proxy_get_name_owner (G_DBUS_PROXY (app->proxy)); + g_warning ("replacing '%s' at %s with %s", id, name_owner, unique_bus_name); + im_application_list_unset_remote (app); + + g_free (name_owner); } app->cancellable = g_cancellable_new (); |