[gnome-music/gnome-3-10] Enables search on keypress
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/gnome-3-10] Enables search on keypress
- Date: Sat, 8 Feb 2014 13:07:01 +0000 (UTC)
commit adfcde33d9ea428aa585c22ff51f795411b733d6
Author: Julian Bayardo <julian bayardo com ar>
Date: Sat Feb 8 13:57:33 2014 +0100
Enables search on keypress
https://bugzilla.gnome.org/show_bug.cgi?id=721595
gnomemusic/searchbar.py | 1 +
gnomemusic/window.py | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/searchbar.py b/gnomemusic/searchbar.py
index 27d8648..d30fed0 100644
--- a/gnomemusic/searchbar.py
+++ b/gnomemusic/searchbar.py
@@ -19,6 +19,7 @@ class Searchbar(Gd.Revealer):
self._search_entry.show()
item.add(self._search_entry)
self.connect("notify::child-revealed", self.prepare_search_filter)
+ self.view = None
def set_view_filter(self, model, itr, user_data):
if self._search_entry.get_property("visible"):
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index daa27f0..16e1cb6 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -189,6 +189,8 @@ class Window(Gtk.ApplicationWindow):
self._show_searchbar(False)
if self.toolbar._selectionMode:
self.toolbar.set_selection_mode(False)
+ elif (event.state & modifiers) == 0 and not self.toolbar.searchbar.get_reveal_child():
+ self._show_searchbar(True)
def _notify_mode_disconnect(self, data=None):
self._stack.disconnect(self._on_notify_model_id)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]