Merge lp:~mhr3/unity/no-double-activate into lp:unity

Proposed by Michal Hruby
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 3363
Proposed branch: lp:~mhr3/unity/no-double-activate
Merge into: lp:unity
Diff against target: 23 lines (+8/-5)
1 file modified
dash/DashView.cpp (+8/-5)
To merge this branch: bzr merge lp:~mhr3/unity/no-double-activate
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Brandon Schaefer (community) Approve
Review via email: mp+167788@code.launchpad.net

Commit message

Don't activate a result twice after pressing Enter.

Description of the change

Don't activate a result twice after pressing Enter.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

After talking with Michal a test for this would be very hard, and not very safe. As it would lead to timing issue. This is a simple fix, and everything looks good... soo approved :)

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/DashView.cpp'
2--- dash/DashView.cpp 2013-05-24 16:16:40 +0000
3+++ dash/DashView.cpp 2013-06-06 15:37:34 +0000
4@@ -1356,11 +1356,14 @@
5 // delay the activation until we get the SearchFinished signal
6 activate_on_finish_ = search_in_progress_;
7
8- activate_timeout_.reset(new glib::Timeout(MAX_ENTRY_ACTIVATE_WAIT_TIMEOUT, [this] {
9- activate_on_finish_ = false;
10- active_scope_view_->ActivateFirst();
11- return FALSE;
12- }));
13+ if (activate_on_finish_)
14+ {
15+ activate_timeout_.reset(new glib::Timeout(MAX_ENTRY_ACTIVATE_WAIT_TIMEOUT, [this] {
16+ activate_on_finish_ = false;
17+ active_scope_view_->ActivateFirst();
18+ return FALSE;
19+ }));
20+ }
21 }
22
23 // Keyboard navigation