From d859b9507095c28f4c4c97ce697dc07f346ae88f Mon Sep 17 00:00:00 2001 From: Reinier Heeres Date: Tue, 20 Nov 2007 14:06:18 +0100 Subject: [PATCH] Mesh search field should autofocus, #4777 --- shell/view/home/HomeWindow.py | 1 + shell/view/home/MeshBox.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/shell/view/home/HomeWindow.py b/shell/view/home/HomeWindow.py index 2f7040ec..f1f46e95 100644 --- a/shell/view/home/HomeWindow.py +++ b/shell/view/home/HomeWindow.py @@ -135,6 +135,7 @@ class HomeWindow(gtk.Window): self._canvas.set_root(self._friends_box) elif self._level == ShellModel.ZOOM_MESH: self._canvas.set_root(self._mesh_box) + self._mesh_box.focus_search_entry() def get_home_box(self): return self._home_box diff --git a/shell/view/home/MeshBox.py b/shell/view/home/MeshBox.py index f475bb66..bb58c052 100644 --- a/shell/view/home/MeshBox.py +++ b/shell/view/home/MeshBox.py @@ -563,3 +563,5 @@ class MeshBox(hippo.CanvasBox): if hasattr(icon, 'set_filter'): icon.set_filter(self._query) + def focus_search_entry(self): + self._toolbar._search_entry.grab_focus()