From aa951a3eb41ba3e4c9fcf9732992aa6e28dc83a8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 1 Dec 2009 16:34:32 -0600 Subject: Change the watch function to return both an API version and a user set version. --- libindicator/indicator-service-manager.c | 6 +++--- libindicator/indicator-service.c | 2 +- libindicator/indicator-service.xml | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libindicator/indicator-service-manager.c b/libindicator/indicator-service-manager.c index 4eaed23..4cf80c6 100644 --- a/libindicator/indicator-service-manager.c +++ b/libindicator/indicator-service-manager.c @@ -232,7 +232,7 @@ get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspe } static void -watch_cb (DBusGProxy * proxy, gint service_version, GError * error, gpointer user_data) +watch_cb (DBusGProxy * proxy, guint service_api_version, guint this_service_version, GError * error, gpointer user_data) { IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(user_data); @@ -242,8 +242,8 @@ watch_cb (DBusGProxy * proxy, gint service_version, GError * error, gpointer use return; } - if (service_version != INDICATOR_SERVICE_VERSION) { - g_warning("Service is using a different version of the service interface. Expecting %d and got %d.", INDICATOR_SERVICE_VERSION, service_version); + if (service_api_version != INDICATOR_SERVICE_VERSION) { + g_warning("Service is using a different version of the service interface. Expecting %d and got %d.", INDICATOR_SERVICE_VERSION, service_api_version); return; } diff --git a/libindicator/indicator-service.c b/libindicator/indicator-service.c index 69422c5..a4cdb68 100644 --- a/libindicator/indicator-service.c +++ b/libindicator/indicator-service.c @@ -305,7 +305,7 @@ _indicator_service_server_watch (IndicatorService * service, DBusGMethodInvocati priv->timeout = 0; } - dbus_g_method_return(method, 1); + dbus_g_method_return(method, INDICATOR_SERVICE_VERSION, 0); return TRUE; } diff --git a/libindicator/indicator-service.xml b/libindicator/indicator-service.xml index d876ea8..dc872e2 100644 --- a/libindicator/indicator-service.xml +++ b/libindicator/indicator-service.xml @@ -7,7 +7,8 @@ - + + -- cgit v1.2.3