]> www.fi.muni.cz Git - evince.git/commitdiff
Return 0 results when search is not in progress.
authorMarco Pesenti Gritti <mpg@redhat.com>
Mon, 19 Sep 2005 13:25:17 +0000 (13:25 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Mon, 19 Sep 2005 13:25:17 +0000 (13:25 +0000)
2005-09-19  Marco Pesenti Gritti  <mpg@redhat.com>

        * 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

ChangeLog
pdf/ev-poppler.cc
shell/ev-window.c

index 8208ec9e7908185dc58745b07e32dbf669354274..1316b8d3c234f7fcbfe0115e3c668c79ece1b044 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-09-19  Marco Pesenti Gritti  <mpg@redhat.com>
+
+       * 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  <mpg@redhat.com>
 
        * shell/ev-view.c: (ev_view_can_find_next):
index 1dcc7a5e98ac2f726a7b30da4385de692e220e18..03a27a69648dee17070c00d90ae601d12b76cf40 100644 (file)
@@ -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
index fa4c87735c5c0517b4b08a18288dbb39c124c2cf..47ee1e89aca27f4132e7173e4cb3eb90f6efee60 100644 (file)
@@ -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));