diff options
author | Ted Gould <ted@canonical.com> | 2009-09-04 21:59:46 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-09-04 21:59:46 -0500 |
commit | f7cbbad880d7412004429888f0fe8bb4e809499d (patch) | |
tree | c7657d111ba75f6438ca6ac19dc5e4ecd7fe6760 /src/messages-service.c | |
parent | bbbc78a5a802f67478eedba9f34b9bc769076b62 (diff) | |
download | ayatana-indicator-messages-f7cbbad880d7412004429888f0fe8bb4e809499d.tar.gz ayatana-indicator-messages-f7cbbad880d7412004429888f0fe8bb4e809499d.tar.bz2 ayatana-indicator-messages-f7cbbad880d7412004429888f0fe8bb4e809499d.zip |
Connecting into the attention signal.
Diffstat (limited to 'src/messages-service.c')
-rw-r--r-- | src/messages-service.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/messages-service.c b/src/messages-service.c index 57094d3..7f80620 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -114,6 +114,7 @@ struct _imList_t { IndicateListenerIndicator * indicator; DbusmenuMenuitem * menuitem; gulong timechange_cb; + gulong attentionchange_cb; }; static gboolean @@ -543,6 +544,9 @@ server_count_changed (AppMenuItem * appitem, guint count, gpointer data) return; } +/* Respond to the IM entrie's time changing + which results in it needing to resort the list + and rebuild the menu to match. */ static void im_time_changed (ImMenuItem * imitem, glong seconds, gpointer data) { @@ -552,6 +556,15 @@ im_time_changed (ImMenuItem * imitem, glong seconds, gpointer data) return; } +/* The IM entrie's request for attention has changed + so we need to pass that up the stack. */ +static void +im_attention_changed (ImMenuItem * imitem, gboolean requestit, gpointer data) +{ + + return; +} + static void server_removed (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) { @@ -744,6 +757,7 @@ indicator_added (IndicateListener * listener, IndicateListenerServer * server, I /* Added a this entry into the IM list */ sl_item->imList = g_list_insert_sorted(sl_item->imList, listItem, imList_sort); listItem->timechange_cb = g_signal_connect(G_OBJECT(menuitem), IM_MENU_ITEM_SIGNAL_TIME_CHANGED, G_CALLBACK(im_time_changed), sl_item); + listItem->attentionchange_cb = g_signal_connect(G_OBJECT(menuitem), IM_MENU_ITEM_SIGNAL_ATTENTION_CHANGED, G_CALLBACK(im_attention_changed), sl_item); /* Check the length of the list. If we've got more inidactors than we allow. Well. Someone's gotta pay. Sorry. I didn't @@ -817,6 +831,7 @@ indicator_removed (IndicateListener * listener, IndicateListenerServer * server, if (!removed && menuitem != NULL) { sl_item->imList = g_list_remove(sl_item->imList, ilt); g_signal_handler_disconnect(menuitem, ilt->timechange_cb); + g_signal_handler_disconnect(menuitem, ilt->attentionchange_cb); g_free(ilt); if (im_menu_item_get_attention(IM_MENU_ITEM(menuitem)) && im_menu_item_shown(IM_MENU_ITEM(menuitem))) { |