Merge lp:~larsu/indicator-messages/update-root-action into lp:indicator-messages/15.10

Proposed by Ted Gould
Status: Merged
Approved by: Ted Gould
Approved revision: 445
Merged at revision: 446
Proposed branch: lp:~larsu/indicator-messages/update-root-action
Merge into: lp:indicator-messages/15.10
Diff against target: 50 lines (+9/-10)
1 file modified
src/im-application-list.c (+9/-10)
To merge this branch: bzr merge lp:~larsu/indicator-messages/update-root-action
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+258262@code.launchpad.net

Commit message

application list: update root action unconditionally

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Approve for 15.10 as well.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/im-application-list.c'
--- src/im-application-list.c 2015-04-03 14:51:51 +0000
+++ src/im-application-list.c 2015-05-05 14:37:33 +0000
@@ -352,8 +352,8 @@
352 g_action_map_remove_action (G_ACTION_MAP(app->source_actions), action_name);352 g_action_map_remove_action (G_ACTION_MAP(app->source_actions), action_name);
353 g_signal_emit (app->list, signals[SOURCE_REMOVED], 0, app->id, action_name);353 g_signal_emit (app->list, signals[SOURCE_REMOVED], 0, app->id, action_name);
354354
355 if (application_update_draws_attention(app))355 application_update_draws_attention (app);
356 im_application_list_update_root_action (app->list);356 im_application_list_update_root_action (app->list);
357}357}
358358
359/* Remove a source from an application, signal up and update the status359/* Remove a source from an application, signal up and update the status
@@ -410,8 +410,8 @@
410 g_action_map_remove_action (G_ACTION_MAP(app->message_actions), action_name);410 g_action_map_remove_action (G_ACTION_MAP(app->message_actions), action_name);
411 g_action_muxer_remove (app->message_sub_actions, action_name);411 g_action_muxer_remove (app->message_sub_actions, action_name);
412412
413 if (application_update_draws_attention(app))413 application_update_draws_attention (app);
414 im_application_list_update_root_action (app->list);414 im_application_list_update_root_action (app->list);
415415
416 g_signal_emit (app->list, signals[MESSAGE_REMOVED], 0, app->id, action_name);416 g_signal_emit (app->list, signals[MESSAGE_REMOVED], 0, app->id, action_name);
417}417}
@@ -912,10 +912,9 @@
912 g_signal_emit (app->list, signals[SOURCE_ADDED], 0, app->id, action_name, label, serialized_icon, visible);912 g_signal_emit (app->list, signals[SOURCE_ADDED], 0, app->id, action_name, label, serialized_icon, visible);
913913
914 if (visible && draws_attention && app->draws_attention == FALSE)914 if (visible && draws_attention && app->draws_attention == FALSE)
915 {915 app->draws_attention = TRUE;
916 app->draws_attention = TRUE;916
917 im_application_list_update_root_action (app->list);917 im_application_list_update_root_action (app->list);
918 }
919918
920 g_free (action_name);919 g_free (action_name);
921 g_object_unref (action);920 g_object_unref (action);
@@ -954,8 +953,8 @@
954953
955 g_signal_emit (app->list, signals[SOURCE_CHANGED], 0, app->id, action_name, label, serialized_icon, visible);954 g_signal_emit (app->list, signals[SOURCE_CHANGED], 0, app->id, action_name, label, serialized_icon, visible);
956955
957 if (application_update_draws_attention (app))956 application_update_draws_attention (app);
958 im_application_list_update_root_action (app->list);957 im_application_list_update_root_action (app->list);
959958
960 if (serialized_icon)959 if (serialized_icon)
961 g_variant_unref (serialized_icon);960 g_variant_unref (serialized_icon);

Subscribers

People subscribed via source and target branches