From 05d072b4e78d6e4f5e4c9e85d01dc0d704c70d80 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 6 Dec 2010 20:57:41 -0600 Subject: Changing what we're checking with the watcher, now that it's persistant more of the time we need to not block if it exists. --- src/app-indicator.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index dc9fb47..5260f58 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -1035,14 +1035,16 @@ check_connect (AppIndicator *self) /* Do we have a connection? */ if (priv->connection == NULL) return; - /* We're alreadying connecting or trying to connect. */ - if (priv->watcher_proxy != NULL) return; - - gchar * name = g_dbus_proxy_get_name_owner(priv->watcher_proxy); - if (name == NULL) { - return; + /* If we already have a proxy, let's see if it has someone + implementing it. If not, we can't do much more than to + do nothing. */ + if (priv->watcher_proxy != NULL) { + gchar * name = g_dbus_proxy_get_name_owner(priv->watcher_proxy); + if (name == NULL) { + return; + } + g_free(name); } - g_free(name); /* Do we have enough information? */ if (priv->menu == NULL) return; -- cgit v1.2.3