summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authormonsta <[email protected]>2015-08-26 16:08:20 +0300
committerinfirit <[email protected]>2015-08-31 15:02:03 +0200
commit279a156e3c8f27233ceb6dd9a70ecd88c31cb024 (patch)
tree40e881bfb39f6fa269fb2fdf0319b07595db74ea /shell
parentdc65c10a213e8adc7d128225979dfc4e01418a69 (diff)
downloadatril-279a156e3c8f27233ceb6dd9a70ecd88c31cb024.tar.bz2
atril-279a156e3c8f27233ceb6dd9a70ecd88c31cb024.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.c19
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);