aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-02-11 20:10:33 -0600
committerTed Gould <ted@canonical.com>2009-02-11 20:10:33 -0600
commit609f0c83c117d38da4f4bb1f250f6624d3cbf9c5 (patch)
tree7cb6649c5978baedf1055d51785cb1e5e07d052f
parent69bec2a8b6dedf0a6e7ee7bd96ff82a26774ef42 (diff)
downloadlibayatana-indicator-609f0c83c117d38da4f4bb1f250f6624d3cbf9c5.tar.gz
libayatana-indicator-609f0c83c117d38da4f4bb1f250f6624d3cbf9c5.tar.bz2
libayatana-indicator-609f0c83c117d38da4f4bb1f250f6624d3cbf9c5.zip
Fixing the call, checking both lists of proxies, and adding some debug info.
-rw-r--r--docs/reference/libindicate-decl.txt27
-rw-r--r--libindicate/listener.c14
2 files changed, 38 insertions, 3 deletions
diff --git a/docs/reference/libindicate-decl.txt b/docs/reference/libindicate-decl.txt
index fce431d..7143c16 100644
--- a/docs/reference/libindicate-decl.txt
+++ b/docs/reference/libindicate-decl.txt
@@ -231,12 +231,22 @@ void
<RETURNS>void </RETURNS>
IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * 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
+</USER_FUNCTION>
<FUNCTION>
<NAME>indicate_listener_new</NAME>
<RETURNS>IndicateListener *</RETURNS>
void
</FUNCTION>
<FUNCTION>
+<NAME>indicate_listener_ref_default</NAME>
+<RETURNS>IndicateListener *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
<NAME>indicate_listener_get_property</NAME>
<RETURNS>void </RETURNS>
IndicateListener * listener,IndicateListenerServer * server,IndicateListenerIndicator * indicator,gchar * property,indicate_listener_get_property_cb callback,gpointer data
@@ -246,6 +256,16 @@ IndicateListener * listener,IndicateListenerServer * server,IndicateListenerIndi
<RETURNS>void </RETURNS>
IndicateListener * listener,IndicateListenerServer * server,IndicateListenerIndicator * indicator
</FUNCTION>
+<FUNCTION>
+<NAME>indicate_listener_server_get_type</NAME>
+<RETURNS>void </RETURNS>
+IndicateListener * listener,IndicateListenerServer * server,indicate_listener_get_server_property_cb callback,gpointer data
+</FUNCTION>
+<FUNCTION>
+<NAME>indicate_listener_server_get_desktop</NAME>
+<RETURNS>void </RETURNS>
+IndicateListener * listener,IndicateListenerServer * server,indicate_listener_get_server_property_cb callback,gpointer data
+</FUNCTION>
<MACRO>
<NAME>INDICATE_TYPE_SERVER</NAME>
#define INDICATE_TYPE_SERVER (indicate_server_get_type ())
@@ -326,7 +346,12 @@ const gchar * obj
<FUNCTION>
<NAME>indicate_server_set_desktop_file</NAME>
<RETURNS>void </RETURNS>
-const gchar * path
+IndicateServer * server, const gchar * path
+</FUNCTION>
+<FUNCTION>
+<NAME>indicate_server_set_type</NAME>
+<RETURNS>void </RETURNS>
+IndicateServer * server, const gchar * type
</FUNCTION>
<FUNCTION>
<NAME>indicate_server_show</NAME>
diff --git a/libindicate/listener.c b/libindicate/listener.c
index 797ca75..7775c57 100644
--- a/libindicate/listener.c
+++ b/libindicate/listener.c
@@ -732,6 +732,7 @@ typedef struct {
static void
property_cb (DBusGProxy * proxy, DBusGProxyCall * call, void * data)
{
+ g_debug("Callback for property");
property_cb_t * propertyt = data;
GError * error = NULL;
@@ -760,15 +761,22 @@ property_cb (DBusGProxy * proxy, DBusGProxyCall * call, void * data)
gchar * propstr = g_value_dup_string(&property);
+ g_debug("\tProperty value: %s", propstr);
+
return cb(listener, server, propstr, cb_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);
+
IndicateListenerPrivate * priv = INDICATE_LISTENER_GET_PRIVATE(listener);
- proxy_t * proxyt = g_hash_table_lookup(priv->proxies_working, server);
+ 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);
+ }
if (proxyt == NULL) {
return;
@@ -785,6 +793,7 @@ get_server_property (IndicateListener * listener, IndicateListenerServer * serve
bus_name = "session";
}
+ g_debug("Createing property proxy on %s bus", bus_name);
proxyt->property_proxy = dbus_g_proxy_new_for_name(bus,
proxyt->name,
"/org/freedesktop/indicate",
@@ -801,9 +810,10 @@ get_server_property (IndicateListener * listener, IndicateListenerServer * serve
"Get",
property_cb,
localdata,
+ NULL,
G_TYPE_STRING, "org.freedesktop.indicator",
G_TYPE_STRING, property_name,
- G_TYPE_INVALID, G_TYPE_INVALID);
+ G_TYPE_INVALID, G_TYPE_VALUE, G_TYPE_INVALID);
return;
}