Merge lp:~donadigo/switchboard/fix-1627225 into lp:~elementary-pantheon/switchboard/switchboard

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Danielle Foré
Approved revision: 694
Merged at revision: 693
Proposed branch: lp:~donadigo/switchboard/fix-1627225
Merge into: lp:~elementary-pantheon/switchboard/switchboard
Diff against target: 26 lines (+11/-4)
1 file modified
src/Switchboard.vala (+11/-4)
To merge this branch: bzr merge lp:~donadigo/switchboard/fix-1627225
Reviewer Review Type Date Requested Status
elementary Pantheon team Pending
Review via email: mp+310009@code.launchpad.net

Commit message

Pressing escape now clears search

Description of the change

Fix bug #1627225: "Pressing esc should clear search".

Does what it says on the tin.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Switchboard.vala'
2--- src/Switchboard.vala 2016-11-02 00:24:55 +0000
3+++ src/Switchboard.vala 2016-11-03 21:29:23 +0000
4@@ -476,12 +476,19 @@
5 search_box.changed.connect(() => {
6 category_view.filter_plugs(search_box.get_text ());
7 });
8+
9 search_box.key_press_event.connect ((event) => {
10- if (event.keyval == Gdk.Key.Return) {
11- category_view.activate_first_item ();
12- return true;
13+ switch (event.keyval) {
14+ case Gdk.Key.Return:
15+ category_view.activate_first_item ();
16+ return true;
17+ case Gdk.Key.Escape:
18+ search_box.text = "";
19+ return true;
20+ default:
21+ break;
22 }
23-
24+
25 return false;
26 });
27

Subscribers

People subscribed via source and target branches

to all changes: