diff options
author | monsta <[email protected]> | 2015-08-26 16:08:20 +0300 |
---|---|---|
committer | infirit <[email protected]> | 2015-08-31 14:51:17 +0200 |
commit | 46100f0deb15e2acf100ac7b4f5e2cd27b27e33d (patch) | |
tree | 0e869ce3db7128ae3b92b6be947557a5b175b30c /shell | |
parent | ded8f8ac9dc2aaaa24e40a8b9b55907ecf87b105 (diff) | |
download | atril-46100f0deb15e2acf100ac7b4f5e2cd27b27e33d.tar.bz2 atril-46100f0deb15e2acf100ac7b4f5e2cd27b27e33d.tar.xz |
don't show findbar in presentation mode (search doesn't work there)
from
https://git.gnome.org/browse/evince/commit/?id=79b9e1e0d6efa05a875e0db5407c9b760f3939d4
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-window.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c index 09e370b6..b52c32ba 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -1749,7 +1749,8 @@ ev_window_load_job_cb (EvJob *job, break; } - if (ev_window->priv->search_string && EV_IS_DOCUMENT_FIND (document)) { + if (ev_window->priv->search_string && EV_IS_DOCUMENT_FIND (document) && + ev_window->priv->window_mode != EV_WINDOW_MODE_PRESENTATION) { ev_window_cmd_edit_find (NULL, ev_window); egg_find_bar_set_search_string (EGG_FIND_BAR (ev_window->priv->find_bar), ev_window->priv->search_string); @@ -2285,7 +2286,8 @@ ev_window_open_document (EvWindow *ev_window, break; } - if (search_string && EV_IS_DOCUMENT_FIND (document)) { + if (search_string && EV_IS_DOCUMENT_FIND (document) && + mode != EV_WINDOW_MODE_PRESENTATION) { ev_window_cmd_edit_find (NULL, ev_window); egg_find_bar_set_search_string (EGG_FIND_BAR (ev_window->priv->find_bar), search_string); @@ -3873,12 +3875,13 @@ ev_window_cmd_edit_select_all (GtkAction *action, EvWindow *ev_window) static void ev_window_cmd_edit_find (GtkAction *action, EvWindow *ev_window) { - g_return_if_fail (EV_IS_WINDOW (ev_window)); - if (ev_window->priv->document == NULL || !EV_IS_DOCUMENT_FIND (ev_window->priv->document)) { g_error ("Find action should be insensitive since document doesn't support find"); return; - } + } + + if (EV_WINDOW_IS_PRESENTATION (ev_window)) + return; update_chrome_flag (ev_window, EV_CHROME_FINDBAR, TRUE); update_chrome_visibility (ev_window); @@ -3888,7 +3891,8 @@ ev_window_cmd_edit_find (GtkAction *action, EvWindow *ev_window) static void ev_window_cmd_edit_find_next (GtkAction *action, EvWindow *ev_window) { - g_return_if_fail (EV_IS_WINDOW (ev_window)); + if (EV_WINDOW_IS_PRESENTATION (ev_window)) + return; update_chrome_flag (ev_window, EV_CHROME_FINDBAR, TRUE); update_chrome_visibility (ev_window); @@ -3906,7 +3910,8 @@ ev_window_cmd_edit_find_next (GtkAction *action, EvWindow *ev_window) static void ev_window_cmd_edit_find_previous (GtkAction *action, EvWindow *ev_window) { - g_return_if_fail (EV_IS_WINDOW (ev_window)); + if (EV_WINDOW_IS_PRESENTATION (ev_window)) + return; update_chrome_flag (ev_window, EV_CHROME_FINDBAR, TRUE); update_chrome_visibility (ev_window); |