[evince] Focus the findbar when it's requested to be shown and it's already visible



commit 4e2bf3ff212aa0948a6bec4c25dd94a43ea6363b
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Fri Jun 28 11:14:35 2013 +0200

    Focus the findbar when it's requested to be shown and it's already visible

 shell/ev-window.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 172a30e..c97dd7a 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -5452,8 +5452,10 @@ update_toggle_find_action (EvWindow *ev_window,
 static void
 ev_window_show_find_bar (EvWindow *ev_window)
 {
-       if (gtk_widget_get_visible (ev_window->priv->find_bar))
+       if (gtk_widget_get_visible (ev_window->priv->find_bar)) {
+               gtk_widget_grab_focus (ev_window->priv->find_bar);
                return;
+       }
 
        if (ev_window->priv->document == NULL || !EV_IS_DOCUMENT_FIND (ev_window->priv->document)) {
                g_error ("Find action should be insensitive since document doesn't support find");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]