* shell/ev-view-private.h:
* shell/ev-view.c: (ev_view_scroll), (ev_view_scroll_event),
(ev_view_init), (find_changed_cb), (ev_view_find_previous),
(ev_view_search_changed):
* shell/ev-view.h:
* shell/ev-window.c: (find_bar_search_changed_cb):
Dont't jump to find result if window was scrolled during search.
Fix for the bug #313266.
+2006-02-24 Stanislav Slusny <slusnys@gmail.com>
+
+ * shell/ev-view-private.h:
+ * shell/ev-view.c: (ev_view_scroll), (ev_view_scroll_event),
+ (ev_view_init), (find_changed_cb), (ev_view_find_previous),
+ (ev_view_search_changed):
+ * shell/ev-view.h:
+ * shell/ev-window.c: (find_bar_search_changed_cb):
+
+ Dont't jump to find result if window was scrolled during search.
+ Fix for the bug #313266.
+
2006-02-21 Stanislav Slusny <slusnys@gmail.com>
* shell/eggfindbar.c: (egg_find_bar_class_init):
2006-02-21 Stanislav Slusny <slusnys@gmail.com>
* shell/eggfindbar.c: (egg_find_bar_class_init):
char *status;
char *find_status;
int find_result;
char *status;
char *find_status;
int find_result;
+ gboolean jump_to_find_result;
EvPageCache *page_cache;
EvPixbufCache *pixbuf_cache;
EvPageCache *page_cache;
EvPixbufCache *pixbuf_cache;
gboolean first_page = FALSE;
gboolean last_page = FALSE;
gboolean first_page = FALSE;
gboolean last_page = FALSE;
+ view->jump_to_find_result = FALSE;
+
if (view->presentation) {
switch (scroll) {
case EV_SCROLL_STEP_BACKWARD:
if (view->presentation) {
switch (scroll) {
case EV_SCROLL_STEP_BACKWARD:
+ view->jump_to_find_result = FALSE;
/* Shift+Wheel scrolls the in the perpendicular direction */
if (state & GDK_SHIFT_MASK) {
if (event->direction == GDK_SCROLL_UP)
/* Shift+Wheel scrolls the in the perpendicular direction */
if (state & GDK_SHIFT_MASK) {
if (event->direction == GDK_SCROLL_UP)
view->fullscreen = FALSE;
view->sizing_mode = EV_SIZING_FIT_WIDTH;
view->pending_scroll = SCROLL_TO_KEEP_POSITION;
view->fullscreen = FALSE;
view->sizing_mode = EV_SIZING_FIT_WIDTH;
view->pending_scroll = SCROLL_TO_KEEP_POSITION;
+ view->jump_to_find_result = TRUE;
percent = ev_document_find_get_progress
(EV_DOCUMENT_FIND (view->document));
n_pages = ev_page_cache_get_n_pages (view->page_cache);
percent = ev_document_find_get_progress
(EV_DOCUMENT_FIND (view->document));
n_pages = ev_page_cache_get_n_pages (view->page_cache);
- jump_to_find_page (view, EV_VIEW_FIND_NEXT, 0);
- jump_to_find_result (view);
+
+ if (view->jump_to_find_result == TRUE) {
+ jump_to_find_page (view, EV_VIEW_FIND_NEXT, 0);
+ jump_to_find_result (view);
+ }
update_find_status_message (view, percent * n_pages >= n_pages - 1 );
if (view->current_page == page)
gtk_widget_queue_draw (GTK_WIDGET (view));
update_find_status_message (view, percent * n_pages >= n_pages - 1 );
if (view->current_page == page)
gtk_widget_queue_draw (GTK_WIDGET (view));
+void ev_view_search_changed (EvView *view)
+{
+ /* search string has changed, focus on new search result */
+ view->jump_to_find_result = TRUE;
+}
+
/*** Selections ***/
/* compute_new_selection_rect/text calculates the area currently selected by
/*** Selections ***/
/* compute_new_selection_rect/text calculates the area currently selected by
gboolean ev_view_can_find_next (EvView *view);
void ev_view_find_next (EvView *view);
void ev_view_find_previous (EvView *view);
gboolean ev_view_can_find_next (EvView *view);
void ev_view_find_next (EvView *view);
void ev_view_find_previous (EvView *view);
+void ev_view_search_changed (EvView *view);
/* Status */
const char *ev_view_get_status (EvView *view);
/* Status */
const char *ev_view_get_status (EvView *view);
#if 0
g_printerr ("search for '%s'\n", search_string ? search_string : "(nil)");
#endif
#if 0
g_printerr ("search for '%s'\n", search_string ? search_string : "(nil)");
#endif
+ ev_view_search_changed (EV_VIEW(ev_window->priv->view));
if (ev_window->priv->document &&
EV_IS_DOCUMENT_FIND (ev_window->priv->document)) {
if (ev_window->priv->document &&
EV_IS_DOCUMENT_FIND (ev_window->priv->document)) {