diff options
author | Ted Gould <ted@gould.cx> | 2015-02-18 17:20:15 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2015-02-18 17:20:15 -0600 |
commit | 0f90f415b9b860a2013ba8bfb306977c2b0fea28 (patch) | |
tree | 97f135e9ca7fd0417418f712a75f9a0a0230137f /src | |
parent | c0ffb83fb803dd5375000f20106efe30baa4b135 (diff) | |
download | ayatana-indicator-messages-0f90f415b9b860a2013ba8bfb306977c2b0fea28.tar.gz ayatana-indicator-messages-0f90f415b9b860a2013ba8bfb306977c2b0fea28.tar.bz2 ayatana-indicator-messages-0f90f415b9b860a2013ba8bfb306977c2b0fea28.zip |
Adding a version of source_removed that doesn't unescape
Diffstat (limited to 'src')
-rw-r--r-- | src/im-application-list.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c index 08c9730..2d0d7fd 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -343,6 +343,17 @@ application_update_draws_attention (Application * app) return was_drawing_attention != app->draws_attention; } +static void +im_application_list_source_removed_action (Application *app, + const gchar *action_name) +{ + g_action_map_remove_action (G_ACTION_MAP(app->source_actions), action_name); + g_signal_emit (app->list, signals[SOURCE_REMOVED], 0, app->id, action_name); + + if (application_update_draws_attention(app)) + im_application_list_update_root_action (app->list); +} + /* Remove a source from an application, signal up and update the status of the draws attention flag. */ static void @@ -353,11 +364,7 @@ im_application_list_source_removed (Application *app, action_name = escape_action_name (id); - g_action_map_remove_action (G_ACTION_MAP(app->source_actions), action_name); - g_signal_emit (app->list, signals[SOURCE_REMOVED], 0, app->id, action_name); - - if (application_update_draws_attention(app)) - im_application_list_update_root_action (app->list); + im_application_list_source_removed_action (app, action_name); g_free (action_name); } @@ -389,7 +396,7 @@ im_application_list_source_activated (GSimpleAction *action, app->cancellable, NULL, NULL); } - im_application_list_source_removed (app, action_name); + im_application_list_source_removed_action (app, action_name); g_free (source_id); } @@ -505,7 +512,7 @@ im_application_list_remove_all (GSimpleAction *action, source_actions = g_action_group_list_actions (G_ACTION_GROUP (app->source_actions)); for (it = source_actions; *it; it++) - im_application_list_source_removed (app, *it); + im_application_list_source_removed_action (app, *it); message_actions = g_action_group_list_actions (G_ACTION_GROUP (app->message_actions)); for (it = message_actions; *it; it++) |