From 3a4e876c54d10a5b72dc0a95f0284218654a9f21 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Mon, 3 Sep 2007 16:03:43 +0000 Subject: [PATCH] Restart the search when reloading a document with the find bar visible. 2007-09-03 Carlos Garcia Campos * 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 | 7 +++++++ shell/ev-window.c | 28 +++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 83079f68..5c51c9f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-09-03 Carlos Garcia Campos + + * 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 * shell/ev-window.c: (setup_document_from_metadata), diff --git a/shell/ev-window.c b/shell/ev-window.c index 25ee9c9d..7ef19c55 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -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; -- 2.43.5