]> www.fi.muni.cz Git - evince.git/commitdiff
Restart the search when reloading a document with the find bar visible.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 3 Sep 2007 16:03:43 +0000 (16:03 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 3 Sep 2007 16:03:43 +0000 (16:03 +0000)
2007-09-03  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-window.c: (ev_window_load_job_cb):
Restart the search when reloading a document with the find bar
visible. Fixes bug #461962.

svn path=/trunk/; revision=2659

ChangeLog
shell/ev-window.c

index 83079f68f2f6f21100c4cd638d40f458f9cc0d5f..5c51c9f7f5c223a9093968ceb94f9923d87133f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-09-03  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-window.c: (ev_window_load_job_cb):
+
+       Restart the search when reloading a document with the find bar
+       visible. Fixes bug #461962.
+       
 2007-09-03  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-window.c: (setup_document_from_metadata),
index 25ee9c9dfe85eb199437134aad1b360593953a2c..7ef19c55ceb87f37f3d208a681282dd536060cdb 100644 (file)
@@ -221,7 +221,7 @@ struct _EvWindowPrivate {
 #define THUMBNAILS_SIDEBAR_ID "thumbnails"
 #define ATTACHMENTS_SIDEBAR_ID "attachments"
 
-static void    ev_window_update_actions                (EvWindow *ev_window);
+static void    ev_window_update_actions                (EvWindow         *ev_window);
 static void     ev_window_sidebar_visibility_changed_cb (EvSidebar        *ev_sidebar,
                                                         GParamSpec       *pspec,
                                                         EvWindow         *ev_window);
@@ -263,16 +263,19 @@ static void     ev_view_popup_cmd_save_image_as         (GtkAction        *actio
 static void     ev_view_popup_cmd_copy_image            (GtkAction        *action,
                                                         EvWindow         *window);
 static void    ev_attachment_popup_cmd_open_attachment (GtkAction        *action,
-                                                        EvWindow *window);
-static void    ev_attachment_popup_cmd_save_attachment_as (GtkAction *action, 
-                                                        EvWindow *window);
+                                                        EvWindow         *window);
+static void    ev_attachment_popup_cmd_save_attachment_as (GtkAction     *action, 
+                                                        EvWindow         *window);
 static void    ev_window_cmd_view_best_fit             (GtkAction        *action, 
                                                         EvWindow         *ev_window);
 static void    ev_window_cmd_view_page_width           (GtkAction        *action, 
                                                         EvWindow         *ev_window);
-static void    view_handle_link_cb                     (EvView *view, 
-                                                        EvLink *link, 
-                                                        EvWindow *window);
+static void    view_handle_link_cb                     (EvView           *view, 
+                                                        EvLink           *link, 
+                                                        EvWindow         *window);
+static void     find_bar_search_changed_cb              (EggFindBar       *find_bar,
+                                                        GParamSpec       *param,
+                                                        EvWindow         *ev_window);
 
 G_DEFINE_TYPE (EvWindow, ev_window, GTK_TYPE_WINDOW)
 
@@ -1325,6 +1328,17 @@ ev_window_load_job_cb  (EvJobLoad *job,
                                break;
                }
 
+               /* Restart the search after reloading */
+               if (ev_window->priv->in_reload) {
+                       GtkWidget *widget;
+                       
+                       widget = gtk_window_get_focus (GTK_WINDOW (ev_window));
+                       if (widget && gtk_widget_get_ancestor (widget, EGG_TYPE_FIND_BAR)) {
+                               find_bar_search_changed_cb (EGG_FIND_BAR (ev_window->priv->find_bar),
+                                                           NULL, ev_window);
+                       }
+               }
+
                ev_window_clear_load_job (ev_window);
                ev_window->priv->in_reload = FALSE;
                return;