diff options
author | Simon Schampijer <simon@laptop.org> | 2012-09-26 07:23:57 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2012-09-26 11:48:31 (GMT) |
commit | 1570f7742e606d09e9fb9079711dd6a43346784d (patch) | |
tree | e974e684c2b93ef9b63cd5b9b4ec26fe279fa2be /src/jarabe/desktop/activitieslist.py | |
parent | aec34420b46de8e337545171494a547cfc75a658 (diff) |
Views: defocus the search entry by default
This patch does implement the following behavior:
- the search entry in all the views (Home (Favorites and Activity list),
Group and Neighborhood) is unfocused by default
- the search entry can be focused by clicking in the entry or by
starting to type
- the search entry contains a hint when unfocused and no search has been
entered, the hint is dependent on the View you are in and matches the
labels in the View Palettes (Frame), the existing translations have
been reused
- the learner can defocus the entry by clicking outside somewhere in
the view (toolbar or canvas), if no search has been entered the hint
will be displayed again if there is a search entered it will remain
in effect and the entry will only be unfocused, the latter will help
to hide the OSK and see the matches for a particular search
- clicking on the clear icon in the entry ('x') the entry will be
unfocused again
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel QuiƱones <manuq@laptop.org>
Diffstat (limited to 'src/jarabe/desktop/activitieslist.py')
-rw-r--r-- | src/jarabe/desktop/activitieslist.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py index b830526..1b5ddd7 100644 --- a/src/jarabe/desktop/activitieslist.py +++ b/src/jarabe/desktop/activitieslist.py @@ -375,6 +375,10 @@ class ActivitiesList(Gtk.VBox): self._alert = None self._clear_message_box = None + def grab_focus(self): + # overwrite grab focus in order to grab focus from the parent + self._tree_view.grab_focus() + def set_filter(self, query): matches = self._tree_view.set_filter(query) if matches == 0: |