diff options
author | Lars Uebernickel <lars@uebernic.de> | 2015-05-04 19:31:52 +0200 |
---|---|---|
committer | Lars Uebernickel <lars@uebernic.de> | 2015-05-04 19:31:52 +0200 |
commit | eccb7dcb8c72a0ff68325684c4f2e28f7cad2b3f (patch) | |
tree | 8b181492332be7113d5aa0be51eecb70a6bd64cd /src/im-application-list.c | |
parent | 6a466d23f9424f095801b2d1ba608cf06b0a86a7 (diff) | |
download | ayatana-indicator-messages-eccb7dcb8c72a0ff68325684c4f2e28f7cad2b3f.tar.gz ayatana-indicator-messages-eccb7dcb8c72a0ff68325684c4f2e28f7cad2b3f.tar.bz2 ayatana-indicator-messages-eccb7dcb8c72a0ff68325684c4f2e28f7cad2b3f.zip |
application list: update root action unconditionally
Until now, the _update_root_action() was only called when the
draws_attention was set. That function now also sets the sensitive state
of some other actions, which might change independently of the attention
flag.
Simply call the function unconditionally. It's not doing a lot of work
anyway and it only gets called when something in the source or message
lists changes.
Diffstat (limited to 'src/im-application-list.c')
-rw-r--r-- | src/im-application-list.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c index 36b2ff3..51b8c02 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -352,8 +352,8 @@ im_application_list_source_removed_action (Application *app, 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); + 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 @@ -410,8 +410,8 @@ im_application_list_message_removed_action (Application *app, g_action_map_remove_action (G_ACTION_MAP(app->message_actions), action_name); g_action_muxer_remove (app->message_sub_actions, action_name); - if (application_update_draws_attention(app)) - im_application_list_update_root_action (app->list); + application_update_draws_attention (app); + im_application_list_update_root_action (app->list); g_signal_emit (app->list, signals[MESSAGE_REMOVED], 0, app->id, action_name); } @@ -912,10 +912,9 @@ im_application_list_source_added (Application *app, g_signal_emit (app->list, signals[SOURCE_ADDED], 0, app->id, action_name, label, serialized_icon, visible); if (visible && draws_attention && app->draws_attention == FALSE) - { - app->draws_attention = TRUE; - im_application_list_update_root_action (app->list); - } + app->draws_attention = TRUE; + + im_application_list_update_root_action (app->list); g_free (action_name); g_object_unref (action); @@ -954,8 +953,8 @@ im_application_list_source_changed (Application *app, g_signal_emit (app->list, signals[SOURCE_CHANGED], 0, app->id, action_name, label, serialized_icon, visible); - if (application_update_draws_attention (app)) - im_application_list_update_root_action (app->list); + application_update_draws_attention (app); + im_application_list_update_root_action (app->list); if (serialized_icon) g_variant_unref (serialized_icon); |