X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=shell%2Fev-window.c;h=f1d3bd905cb534b88a12eb8a5efb257b456885be;hb=b78ca7547945cef51c8224672d4a46cb2e74b2dc;hp=fac2a119748f8ff37bdb3c298e410863d32f31bd;hpb=1ecd95c77d53b2921e555549b4fd53308a49572b;p=evince.git diff --git a/shell/ev-window.c b/shell/ev-window.c index fac2a119..f1d3bd90 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -4858,17 +4858,23 @@ ev_window_update_find_status_message (EvWindow *ev_window) return; if (ev_job_is_finished (ev_window->priv->find_job)) { - gint n_results; - - n_results = ev_job_find_get_n_results (EV_JOB_FIND (ev_window->priv->find_job), - ev_document_model_get_page (ev_window->priv->model)); - /* TRANS: Sometimes this could be better translated as - "%d hit(s) on this page". Therefore this string - contains plural cases. */ - message = g_strdup_printf (ngettext ("%d found on this page", - "%d found on this page", - n_results), - n_results); + EvJobFind *job_find = EV_JOB_FIND (ev_window->priv->find_job); + + if (ev_job_find_has_results (job_find)) { + gint n_results; + + n_results = ev_job_find_get_n_results (job_find, + ev_document_model_get_page (ev_window->priv->model)); + /* TRANS: Sometimes this could be better translated as + "%d hit(s) on this page". Therefore this string + contains plural cases. */ + message = g_strdup_printf (ngettext ("%d found on this page", + "%d found on this page", + n_results), + n_results); + } else { + message = g_strdup (_("Not found")); + } } else { gdouble percent;