From a48ab9b84578f6d3f22d7be310d8e32be779c0e0 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 18 Aug 2013 23:17:35 -0500 Subject: Check the action state to get whether it's drawing or not --- src/im-application-list.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/im-application-list.c') 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; } -- cgit v1.2.3