Merge lp:~azzar1/unity/fix-862849 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Merged at revision: 1705
Proposed branch: lp:~azzar1/unity/fix-862849
Merge into: lp:unity
Diff against target: 16 lines (+5/-0)
1 file modified
plugins/unityshell/src/PanelIndicatorsView.cpp (+5/-0)
To merge this branch: bzr merge lp:~azzar1/unity/fix-862849
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+78640@code.launchpad.net

Description of the change

On alt+f10 open the first menu using the priority value.

IMHO it could be better but using this method it's enough fast too. To be sure that this patch doesn't slow down the execution i've used for debug the unity::utils::Timer class. I got this values... :)

4.3e-05
4.5e-05
3.7e-05
7.2e-05
3.4e-05
2.9e-05
4.7e-05
3e-05
4.2e-05
4.3e-05

To post a comment you must log in.
Revision history for this message
Neil J. Patel (njpatel) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/PanelIndicatorsView.cpp'
2--- plugins/unityshell/src/PanelIndicatorsView.cpp 2011-09-27 12:17:04 +0000
3+++ plugins/unityshell/src/PanelIndicatorsView.cpp 2011-10-07 17:13:32 +0000
4@@ -149,7 +149,12 @@
5 bool
6 PanelIndicatorsView::ActivateIfSensitive()
7 {
8+ std::map<int, PanelIndicatorEntryView*> sorted_entries;
9+
10 for (auto entry : entries_)
11+ sorted_entries[entry.second->GetEntryPriority()] = entry.second;
12+
13+ for (auto entry : sorted_entries)
14 {
15 PanelIndicatorEntryView* view = entry.second;
16 if (view->IsSensitive())