gnome-session r5211 - in trunk: . gnome-session
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r5211 - in trunk: . gnome-session
- Date: Mon, 19 Jan 2009 00:45:07 +0000 (UTC)
Author: mccann
Date: Mon Jan 19 00:45:07 2009
New Revision: 5211
URL: http://svn.gnome.org/viewvc/gnome-session?rev=5211&view=rev
Log:
2009-01-18 William Jon McCann <jmccann redhat com>
* gnome-session/gsm-presence.c (on_bus_name_owner_changed):
Compare the correct string for name owner changes.
Modified:
trunk/ChangeLog
trunk/gnome-session/gsm-presence.c
Modified: trunk/gnome-session/gsm-presence.c
==============================================================================
--- trunk/gnome-session/gsm-presence.c (original)
+++ trunk/gnome-session/gsm-presence.c Mon Jan 19 00:45:07 2009
@@ -207,6 +207,12 @@
{
GError *error;
+ if (service_name == NULL
+ || strcmp (service_name, GS_NAME) != 0) {
+ /* ignore */
+ return;
+ }
+
if (strlen (new_service_name) == 0
&& strlen (old_service_name) > 0) {
/* service removed */
@@ -214,31 +220,29 @@
} else if (strlen (old_service_name) == 0
&& strlen (new_service_name) > 0) {
/* service added */
- if (strcmp (new_service_name, GS_NAME) == 0) {
- error = NULL;
- presence->priv->screensaver_proxy = dbus_g_proxy_new_for_name_owner (presence->priv->bus_connection,
- GS_NAME,
- GS_PATH,
- GS_INTERFACE,
- &error);
- if (presence->priv->screensaver_proxy != NULL) {
- g_signal_connect (presence->priv->screensaver_proxy,
- "destroy",
- G_CALLBACK (on_screensaver_proxy_destroy),
- presence);
- dbus_g_proxy_add_signal (presence->priv->screensaver_proxy,
- "ActiveChanged",
- G_TYPE_BOOLEAN,
- G_TYPE_INVALID);
- dbus_g_proxy_connect_signal (presence->priv->screensaver_proxy,
- "ActiveChanged",
- G_CALLBACK (on_screensaver_active_changed),
- presence,
- NULL);
- } else {
- g_warning ("Unable to get screensaver proxy: %s", error->message);
- g_error_free (error);
- }
+ error = NULL;
+ presence->priv->screensaver_proxy = dbus_g_proxy_new_for_name_owner (presence->priv->bus_connection,
+ GS_NAME,
+ GS_PATH,
+ GS_INTERFACE,
+ &error);
+ if (presence->priv->screensaver_proxy != NULL) {
+ g_signal_connect (presence->priv->screensaver_proxy,
+ "destroy",
+ G_CALLBACK (on_screensaver_proxy_destroy),
+ presence);
+ dbus_g_proxy_add_signal (presence->priv->screensaver_proxy,
+ "ActiveChanged",
+ G_TYPE_BOOLEAN,
+ G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (presence->priv->screensaver_proxy,
+ "ActiveChanged",
+ G_CALLBACK (on_screensaver_active_changed),
+ presence,
+ NULL);
+ } else {
+ g_warning ("Unable to get screensaver proxy: %s", error->message);
+ g_error_free (error);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]