diff options
author | Ted Gould <ted@gould.cx> | 2013-08-15 15:28:10 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2013-08-15 15:28:10 -0500 |
commit | 86cedd8ccb7c779436f5d9cf0caec90dfef97dd7 (patch) | |
tree | ec33b414bb1ba97d9883eddd48259bc684726f07 /src | |
parent | 1f28cf89abf224957c3e9eb60e103d4204958fcc (diff) | |
download | ayatana-indicator-messages-86cedd8ccb7c779436f5d9cf0caec90dfef97dd7.tar.gz ayatana-indicator-messages-86cedd8ccb7c779436f5d9cf0caec90dfef97dd7.tar.bz2 ayatana-indicator-messages-86cedd8ccb7c779436f5d9cf0caec90dfef97dd7.zip |
Adding a set status signal
Diffstat (limited to 'src')
-rw-r--r-- | src/im-application-list.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c index 8083704..878e57f 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -52,6 +52,7 @@ enum APP_ADDED, APP_STOPPED, REMOVE_ALL, + STATUS_SET, N_SIGNALS }; @@ -421,6 +422,16 @@ im_application_list_class_init (ImApplicationListClass *klass) g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + + signals[STATUS_SET] = g_signal_new ("status-set", + IM_TYPE_APPLICATION_LIST, + G_SIGNAL_RUN_FIRST, + 0, + NULL, NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, + G_TYPE_STRING); } static void @@ -1009,7 +1020,8 @@ status_activated (GSimpleAction * action, GVariant * param, gpointer user_data) they tell us different. */ g_hash_table_remove_all(list->app_status); - /* TODO: Emit a state change */ + const gchar * status = g_variant_get_string(param, NULL); + g_signal_emit (list, signals[STATUS_SET], 0, status); return; } |