diff options
author | Ted Gould <ted@canonical.com> | 2009-02-13 15:13:26 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-02-13 15:13:26 -0600 |
commit | f079d6726ddfdf96e1582945888bb3cc1b6c84a7 (patch) | |
tree | b57fb9e6b0cd064176a529fcca9e3e32413b43ac | |
parent | 9919392b132e3c69670c5728e330c9969bc34305 (diff) | |
parent | ebe1c53d131fbfbd5b2f8f1334a37f071574550b (diff) | |
download | libayatana-indicator-f079d6726ddfdf96e1582945888bb3cc1b6c84a7.tar.gz libayatana-indicator-f079d6726ddfdf96e1582945888bb3cc1b6c84a7.tar.bz2 libayatana-indicator-f079d6726ddfdf96e1582945888bb3cc1b6c84a7.zip |
Fixing a bug in the listener where properties weren't available on running servers.
-rw-r--r-- | docs/reference/libindicate-decl.txt | 20 | ||||
-rw-r--r-- | libindicate/listener.c | 5 | ||||
-rw-r--r-- | tests/listen-and-print.c | 14 |
3 files changed, 37 insertions, 2 deletions
diff --git a/docs/reference/libindicate-decl.txt b/docs/reference/libindicate-decl.txt index b9657c5..e3280bd 100644 --- a/docs/reference/libindicate-decl.txt +++ b/docs/reference/libindicate-decl.txt @@ -237,6 +237,16 @@ void IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data </USER_FUNCTION> <USER_FUNCTION> +<NAME>indicate_listener_get_property_time_cb</NAME> +<RETURNS>void </RETURNS> +IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GTimeVal * propertydata, gpointer data +</USER_FUNCTION> +<USER_FUNCTION> +<NAME>indicate_listener_get_property_icon_cb</NAME> +<RETURNS>void </RETURNS> +IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GdkPixbuf * propertydata, gpointer data +</USER_FUNCTION> +<USER_FUNCTION> <NAME>indicate_listener_get_server_property_cb</NAME> <RETURNS>void </RETURNS> IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data @@ -257,6 +267,16 @@ void IndicateListener * listener,IndicateListenerServer * server,IndicateListenerIndicator * indicator,gchar * property,indicate_listener_get_property_cb callback,gpointer data </FUNCTION> <FUNCTION> +<NAME>indicate_listener_get_property_time</NAME> +<RETURNS>void </RETURNS> +IndicateListener * listener,IndicateListenerServer * server,IndicateListenerIndicator * indicator,gchar * property,indicate_listener_get_property_time_cb callback,gpointer data +</FUNCTION> +<FUNCTION> +<NAME>indicate_listener_get_property_icon</NAME> +<RETURNS>void </RETURNS> +IndicateListener * listener,IndicateListenerServer * server,IndicateListenerIndicator * indicator,gchar * property,indicate_listener_get_property_icon_cb callback,gpointer data +</FUNCTION> +<FUNCTION> <NAME>indicate_listener_display</NAME> <RETURNS>void </RETURNS> IndicateListener * listener,IndicateListenerServer * server,IndicateListenerIndicator * indicator diff --git a/libindicate/listener.c b/libindicate/listener.c index b704236..3cc9111 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -846,15 +846,16 @@ property_cb (DBusGProxy * proxy, DBusGProxyCall * call, void * data) static void get_server_property (IndicateListener * listener, IndicateListenerServer * server, indicate_listener_get_server_property_cb callback, const gchar * property_name, gpointer data) { - /* g_debug("Setting up callback for property: %s", property_name); */ + /* g_debug("Setting up callback for property %s on %s", property_name, INDICATE_LISTENER_SERVER_DBUS_NAME(server)); */ IndicateListenerPrivate * priv = INDICATE_LISTENER_GET_PRIVATE(listener); proxy_t * proxyt = g_hash_table_lookup(priv->proxies_possible, server); if (proxyt == NULL) { - proxy_t * proxyt = g_hash_table_lookup(priv->proxies_working, server); + proxyt = g_hash_table_lookup(priv->proxies_working, server); } if (proxyt == NULL) { + g_warning("Can not find a proxy for the server at all."); return; } diff --git a/tests/listen-and-print.c b/tests/listen-and-print.c index a4c8c25..2535160 100644 --- a/tests/listen-and-print.c +++ b/tests/listen-and-print.c @@ -94,9 +94,23 @@ indicator_modified (IndicateListener * listener, IndicateListenerServer * server } static void +type_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data) +{ + g_debug("Indicator Server Type: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), value); +} + +static void +desktop_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data) +{ + g_debug("Indicator Server Desktop: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), value); +} + +static void server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) { g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); + indicate_listener_server_get_type(listener, server, type_cb, NULL); + indicate_listener_server_get_desktop(listener, server, desktop_cb, NULL); } static void |