aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-08-08 05:55:49 -0600
committerTed Gould <ted@canonical.com>2009-08-08 05:55:49 -0600
commitd61f15d257b8d7e27d4cc7955e9b870d0e44d73b (patch)
tree634fadf224375d7f93809874b762ff3e6468a1d9
parentdbf5b1d9ea6aef0fb55ffcd3b6322fbfb20e5e73 (diff)
downloadayatana-indicator-session-d61f15d257b8d7e27d4cc7955e9b870d0e44d73b.tar.gz
ayatana-indicator-session-d61f15d257b8d7e27d4cc7955e9b870d0e44d73b.tar.bz2
ayatana-indicator-session-d61f15d257b8d7e27d4cc7955e9b870d0e44d73b.zip
Handling the signal better. Now in the header file as well.
-rw-r--r--src/status-provider-pidgin.c4
-rw-r--r--src/status-provider.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/status-provider-pidgin.c b/src/status-provider-pidgin.c
index 5e42ff2..aaa8732 100644
--- a/src/status-provider-pidgin.c
+++ b/src/status-provider-pidgin.c
@@ -129,7 +129,7 @@ status_provider_pidgin_init (StatusProviderPidgin *self)
static void
status_provider_pidgin_dispose (GObject *object)
{
- StatusProviderPidginPrivate * priv = STATUS_PROVIDER_PIDGIN_GET_PRIVATE(self);
+ StatusProviderPidginPrivate * priv = STATUS_PROVIDER_PIDGIN_GET_PRIVATE(object);
if (priv->proxy != NULL) {
g_object_unref(priv->proxy);
@@ -172,7 +172,7 @@ set_status (StatusProvider * sp, StatusProviderStatus status)
StatusProviderPidginPrivate * priv = STATUS_PROVIDER_PIDGIN_GET_PRIVATE(sp);
pg_status_t pg_status = sp_to_pg_map[status];
priv->pg_status = pg_status;
- g_signal_emit(G_OBJECT(sp), signals[STATUS_CHANGED], 0, pg_to_sp_map[priv->pg_status], TRUE);
+ g_signal_emit(G_OBJECT(sp), STATUS_PROVIDER_SIGNAL_STATUS_CHANGED_ID, 0, pg_to_sp_map[priv->pg_status], TRUE);
return;
}
diff --git a/src/status-provider.h b/src/status-provider.h
index f01a90e..9cc9885 100644
--- a/src/status-provider.h
+++ b/src/status-provider.h
@@ -47,7 +47,8 @@ typedef enum
}
StatusProviderStatus;
-#define STATUS_PROVIDER_SIGNAL_STATUS_CHANGED "status-changed"
+#define STATUS_PROVIDER_SIGNAL_STATUS_CHANGED "status-changed"
+#define STATUS_PROVIDER_SIGNAL_STATUS_CHANGED_ID (g_signal_lookup(STATUS_PROVIDER_SIGNAL_STATUS_CHANGED, STATUS_PROVIDER_TYPE))
typedef struct _StatusProvider StatusProvider;
struct _StatusProvider {