]> www.fi.muni.cz Git - evince.git/commitdiff
Cancel the find operation when the find bar is closed. Fixes bug #508845.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Tue, 18 Mar 2008 19:51:17 +0000 (19:51 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Tue, 18 Mar 2008 19:51:17 +0000 (19:51 +0000)
2008-03-18  Carlos Garcia Campos  <carlosgc@gnome.org>

* shell/ev-view.[ch]: (ev_view_find_cancel):
* shell/ev-window.c: (find_bar_close_cb):

Cancel the find operation when the find bar is closed. Fixes bug
#508845.

svn path=/trunk/; revision=2971

ChangeLog
shell/ev-view.c
shell/ev-view.h
shell/ev-window.c

index d08dd1e4f9295e92cceaca27d4852580aa825c2a..7628ac216924e591d99e63eedeb4760b16f1be78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-03-18  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-view.[ch]: (ev_view_find_cancel):
+       * shell/ev-window.c: (find_bar_close_cb):
+
+       Cancel the find operation when the find bar is closed. Fixes bug
+       #508845.
+       
 2008-03-18  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * backend/ps/psdocument.evince-backend.in:
index 129d87c334928e2599ec1c020d5457f3704cad82..1a76442a910fb19c53c59407d084f80f6596d372 100644 (file)
@@ -5333,18 +5333,30 @@ ev_view_find_previous (EvView *view)
        }
 }
 
-void ev_view_search_changed (EvView *view)
+void
+ev_view_search_changed (EvView *view)
 {
        /* search string has changed, focus on new search result */
        view->jump_to_find_result = TRUE;
 }
 
-void ev_view_set_highlight_search (EvView *view, gboolean value)
+void
+ev_view_set_highlight_search (EvView *view, gboolean value)
 {
        view->highlight_find_results = value;
        gtk_widget_queue_draw (GTK_WIDGET (view));
 }
 
+void
+ev_view_find_cancel (EvView *view)
+{
+       if (EV_IS_DOCUMENT_FIND (view->document)) {
+               EvDocumentFind *find = EV_DOCUMENT_FIND (view->document);
+
+               ev_document_find_cancel (find);
+       }
+}
+
 /*** Selections ***/
 
 /* compute_new_selection_rect/text calculates the area currently selected by
index d6dd40e063d40e0312847cd22c943e588581e6bc..dd8d1df141f8909913da2ea15c1461b01724df63 100644 (file)
@@ -124,6 +124,8 @@ void            ev_view_find_previous        (EvView         *view);
 void            ev_view_search_changed       (EvView         *view);
 void           ev_view_set_highlight_search (EvView         *view,
                                              gboolean        value);
+void            ev_view_find_cancel          (EvView         *view);
+
 /* Status */
 const char     *ev_view_get_status        (EvView         *view);
 const char     *ev_view_get_find_status   (EvView         *view);
index 917ebcfd9fd2dd955a1f0fc1275bd5b8a45dbed3..3431fad5cd0b3528f0a172d87bc243f29bcccff3 100644 (file)
@@ -3810,6 +3810,7 @@ static void
 find_bar_close_cb (EggFindBar *find_bar,
                   EvWindow   *ev_window)
 {
+       ev_view_find_cancel (EV_VIEW (ev_window->priv->view));
        update_chrome_flag (ev_window, EV_CHROME_FINDBAR, FALSE);
        update_chrome_visibility (ev_window);
 }