Merge lp:~voldyman/slingshot/fixes-1261017 into lp:~elementary-pantheon/slingshot/trunk

Proposed by Akshay Shekher
Status: Merged
Approved by: Danielle Foré
Approved revision: 418
Merged at revision: 418
Proposed branch: lp:~voldyman/slingshot/fixes-1261017
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 28 lines (+11/-0)
1 file modified
src/SlingshotView.vala (+11/-0)
To merge this branch: bzr merge lp:~voldyman/slingshot/fixes-1261017
Reviewer Review Type Date Requested Status
Avi Romanoff (community) Approve
Review via email: mp+220855@code.launchpad.net

Commit message

fix bug 1261017, Once the search bar gets focus, Super + Space does not close the window.

Description of the change

fix bug 1261017, Once the search bar gets focus, Super + Space does not close the window.

check the key press events for the search_entry, if super+space is detected, hide.

To post a comment you must log in.
Revision history for this message
Avi Romanoff (aroman) wrote :

Looks good, works for me!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/SlingshotView.vala'
--- src/SlingshotView.vala 2014-03-01 15:19:12 +0000
+++ src/SlingshotView.vala 2014-05-24 10:27:51 +0000
@@ -267,6 +267,8 @@
267 });267 });
268268
269 event_box.key_press_event.connect (on_key_press);269 event_box.key_press_event.connect (on_key_press);
270 search_entry.key_press_event.connect (search_entry_key_press);
271
270 search_entry.search_changed.connect (() => this.search.begin (search_entry.text));272 search_entry.search_changed.connect (() => this.search.begin (search_entry.text));
271 search_entry.grab_focus ();273 search_entry.grab_focus ();
272274
@@ -354,6 +356,15 @@
354 }356 }
355 }357 }
356358
359 // Handle super+space when the user is typing in the search entry
360 private bool search_entry_key_press (Gdk.EventKey event) {
361 if ((event.keyval == Gdk.Key.space) && ((event.state & Gdk.ModifierType.SUPER_MASK) != 0)) {
362 hide ();
363 return true;
364 }
365 return false;
366 }
367
357 /*368 /*
358 Overriding the default handler results in infinite loop of error messages369 Overriding the default handler results in infinite loop of error messages
359 when an input method is in use (Gtk3 bug?). Key press events are370 when an input method is in use (Gtk3 bug?). Key press events are

Subscribers

People subscribed via source and target branches