diff options
author | Ted Gould <ted@gould.cx> | 2013-08-18 23:17:35 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2013-08-18 23:17:35 -0500 |
commit | a48ab9b84578f6d3f22d7be310d8e32be779c0e0 (patch) | |
tree | 0fd88dae03d8d05d3c349dcc080c91ff9dc5cec7 /src | |
parent | 2673fba29a0f3bd090dc3a8dc0002d91ebf401a1 (diff) | |
download | ayatana-indicator-messages-a48ab9b84578f6d3f22d7be310d8e32be779c0e0.tar.gz ayatana-indicator-messages-a48ab9b84578f6d3f22d7be310d8e32be779c0e0.tar.bz2 ayatana-indicator-messages-a48ab9b84578f6d3f22d7be310d8e32be779c0e0.zip |
Check the action state to get whether it's drawing or not
Diffstat (limited to 'src')
-rw-r--r-- | src/im-application-list.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c index 8078582..fedd9e1 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -141,14 +141,27 @@ im_application_list_update_draws_attention (ImApplicationList *list) static gboolean app_source_action_check_draw (Application * app, const gchar * action_name) { + gboolean retval = FALSE; + GVariant * state; + GVariant * draw; - return FALSE; + state = g_action_group_get_action_state (G_ACTION_GROUP(app->source_actions), action_name); + + /* uxsb */ + draw = g_variant_get_child_value(state, 3); + retval = g_variant_get_boolean(draw); + + g_variant_unref(draw); + g_variant_unref(state); + + return retval; } /* Check a message action to see if it draws */ static gboolean app_message_action_check_draw (Application * app, const gchar * action_name) { + /* TODO: Not stored currently */ return FALSE; } |