From: Marco Pesenti Gritti Date: Mon, 19 Sep 2005 13:25:17 +0000 (+0000) Subject: Return 0 results when search is not in progress. X-Git-Tag: EVINCE_0_5_0~147 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=8469ab1bef22b59caa4c69293d8c42e2dd7ad6c6;p=evince.git Return 0 results when search is not in progress. 2005-09-19 Marco Pesenti Gritti * pdf/ev-poppler.cc: Return 0 results when search is not in progress. * shell/ev-window.c: (ev_window_cmd_go_previous_page), (ev_window_cmd_go_next_page), (find_bar_search_changed_cb): Update menu sensitivity when cancelling search --- diff --git a/ChangeLog b/ChangeLog index 8208ec9e..1316b8d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-09-19 Marco Pesenti Gritti + + * pdf/ev-poppler.cc: + + Return 0 results when search is not in progress. + + * shell/ev-window.c: (ev_window_cmd_go_previous_page), + (ev_window_cmd_go_next_page), (find_bar_search_changed_cb): + + Update menu sensitivity when cancelling search + 2005-09-19 Marco Pesenti Gritti * shell/ev-view.c: (ev_view_can_find_next): diff --git a/pdf/ev-poppler.cc b/pdf/ev-poppler.cc index 1dcc7a5e..03a27a69 100644 --- a/pdf/ev-poppler.cc +++ b/pdf/ev-poppler.cc @@ -1139,9 +1139,7 @@ pdf_document_find_page_has_results (EvDocumentFind *document_find, { PdfDocumentSearch *search = PDF_DOCUMENT (document_find)->search; - g_return_val_if_fail (search != NULL, FALSE); - - return search->pages[page] != NULL; + return search && search->pages[page] != NULL; } double diff --git a/shell/ev-window.c b/shell/ev-window.c index fa4c8773..47ee1e89 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -2130,7 +2130,7 @@ ev_window_cmd_go_previous_page (GtkAction *action, EvWindow *ev_window) { g_return_if_fail (EV_IS_WINDOW (ev_window)); - ev_view_previous_page (ev_window->priv->view); + ev_view_previous_page (EV_VIEW (ev_window->priv->view)); } static void @@ -2138,7 +2138,7 @@ ev_window_cmd_go_next_page (GtkAction *action, EvWindow *ev_window) { g_return_if_fail (EV_IS_WINDOW (ev_window)); - ev_view_next_page (ev_window->priv->view); + ev_view_next_page (EV_VIEW (ev_window->priv->view)); } static void @@ -2656,6 +2656,7 @@ find_bar_search_changed_cb (EggFindBar *find_bar, ev_document_find_cancel (EV_DOCUMENT_FIND (ev_window->priv->document)); ev_document_doc_mutex_unlock (); + update_action_sensitivity (ev_window); egg_find_bar_set_status_text (EGG_FIND_BAR (ev_window->priv->find_bar), NULL); gtk_widget_queue_draw (GTK_WIDGET (ev_window->priv->view));