evince r2971 - in trunk: . shell



Author: carlosgc
Date: Tue Mar 18 19:51:17 2008
New Revision: 2971
URL: http://svn.gnome.org/viewvc/evince?rev=2971&view=rev

Log:
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.


Modified:
   trunk/ChangeLog
   trunk/shell/ev-view.c
   trunk/shell/ev-view.h
   trunk/shell/ev-window.c

Modified: trunk/shell/ev-view.c
==============================================================================
--- trunk/shell/ev-view.c	(original)
+++ trunk/shell/ev-view.c	Tue Mar 18 19:51:17 2008
@@ -5333,18 +5333,30 @@
 	}
 }
 
-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

Modified: trunk/shell/ev-view.h
==============================================================================
--- trunk/shell/ev-view.h	(original)
+++ trunk/shell/ev-view.h	Tue Mar 18 19:51:17 2008
@@ -124,6 +124,8 @@
 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);

Modified: trunk/shell/ev-window.c
==============================================================================
--- trunk/shell/ev-window.c	(original)
+++ trunk/shell/ev-window.c	Tue Mar 18 19:51:17 2008
@@ -3810,6 +3810,7 @@
 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);
 }



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