diff options
author | Ted Gould <ted@canonical.com> | 2009-04-01 13:21:55 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-04-01 13:21:55 -0500 |
commit | 589454c1262cfe3b24423036349e762697a3df7f (patch) | |
tree | c3bdd2bf81aeff0a1ff6dda3c09a3ca17c44bb33 /libindicate | |
parent | f7bf54acfd41be9c753ff339e7b681ad05f87ff2 (diff) | |
download | libayatana-indicator-589454c1262cfe3b24423036349e762697a3df7f.tar.gz libayatana-indicator-589454c1262cfe3b24423036349e762697a3df7f.tar.bz2 libayatana-indicator-589454c1262cfe3b24423036349e762697a3df7f.zip |
Switch to searching on the connection, which is really what we care about and the proxy is a poor sustitute for.
Diffstat (limited to 'libindicate')
-rw-r--r-- | libindicate/listener.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libindicate/listener.c b/libindicate/listener.c index e54b9b4..f8ce32e 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -54,6 +54,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; struct _IndicateListenerServer { gchar * name; DBusGProxy * proxy; + DBusGConnection * connection; }; struct _IndicateListenerIndicator { @@ -96,7 +97,7 @@ proxy_t_equal (gconstpointer pa, gconstpointer pb) { proxy_t * a = (proxy_t *)pa; proxy_t * b = (proxy_t *)pb; - if (a->proxy == b->proxy) { + if (a->connection == b->connection) { return g_strcmp0(a->name, b->name); } else { /* we're only using this for equal, not sorting */ @@ -317,7 +318,7 @@ dbus_owner_change (DBusGProxy * proxy, const gchar * name, const gchar * prev, c } if (new != NULL && new[0] == '\0') { proxy_t searchitem; - searchitem.proxy = proxy; + searchitem.connection = bus; searchitem.name = (gchar *)name; /* Droping const, not that it isn't, but to remove the warning */ GList * proxyt_item; @@ -474,6 +475,7 @@ todo_idle (gpointer data) proxyt->connection = todo->bus; proxyt->server.name = todo->name; proxyt->server.proxy = proxyt->proxy; + proxyt->server.connection = proxyt->connection; priv->proxy_todo = g_array_remove_index(priv->proxy_todo, priv->proxy_todo->len - 1); @@ -896,7 +898,7 @@ get_server_property (IndicateListener * listener, IndicateListenerServer * serve proxy_t searchitem; searchitem.name = server->name; - searchitem.proxy = server->proxy; + searchitem.connection = server->connection; GList * proxyitem = g_list_find_custom(priv->proxies_possible, &searchitem, proxy_t_equal); if (proxyitem == NULL) { |