aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-03-30 13:23:49 -0500
committerTed Gould <ted@gould.cx>2011-03-30 13:23:49 -0500
commitb9355e5f0e32e04c93158e962e985f60abfbb35b (patch)
treeed6c05b6236821320b3394b140027647f6614d0b
parent6be8ddada1ca8b9901d7b9dccef39af47230bf32 (diff)
downloadayatana-indicator-datetime-b9355e5f0e32e04c93158e962e985f60abfbb35b.tar.gz
ayatana-indicator-datetime-b9355e5f0e32e04c93158e962e985f60abfbb35b.tar.bz2
ayatana-indicator-datetime-b9355e5f0e32e04c93158e962e985f60abfbb35b.zip
Check for the signal name in the handler
-rw-r--r--src/indicator-datetime.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 1e8b452..222844e 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -390,7 +390,7 @@ system_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data)
g_error_free(error);
return;
}
- g_signal_connect(proxy, "g-signal::ActiveChanged", G_CALLBACK(session_active_change_cb), self);
+ g_signal_connect(proxy, "g-signal", G_CALLBACK(session_active_change_cb), self);
}
@@ -820,9 +820,11 @@ static void
session_active_change_cb (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name,
GVariant * parameters, gpointer user_data)
{
- // Just returned from suspend
- IndicatorDatetime * self = INDICATOR_DATETIME(user_data);
- update_time(self);
+ if (g_strcmp0(signal_name, "ActiveChanged") == 0) {
+ // Just returned from suspend
+ IndicatorDatetime * self = INDICATOR_DATETIME(user_data);
+ update_time(self);
+ }
return;
}