Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions shell/ev-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,9 @@ update_chrome_visibility (EvWindow *window)
fullscreen_mode = fullscreen || presentation;

menubar = (priv->chrome & EV_CHROME_MENUBAR) != 0 && !fullscreen_mode;
toolbar = ((priv->chrome & EV_CHROME_TOOLBAR) != 0 ||
(priv->chrome & EV_CHROME_RAISE_TOOLBAR) != 0) && !presentation && !fullscreen;
toolbar = !presentation && (fullscreen
? (priv->chrome & (EV_CHROME_RAISE_TOOLBAR | EV_CHROME_FULLSCREEN_TOOLBAR)) != 0
: (priv->chrome & (EV_CHROME_TOOLBAR | EV_CHROME_RAISE_TOOLBAR)) != 0);
fullscreen_toolbar = ((priv->chrome & EV_CHROME_FULLSCREEN_TOOLBAR) != 0 ||
(priv->chrome & EV_CHROME_RAISE_TOOLBAR) != 0) && fullscreen;
findbar = (priv->chrome & EV_CHROME_FINDBAR) != 0;
Expand Down Expand Up @@ -3785,6 +3786,25 @@ ev_window_cmd_file_close_all_windows (GtkAction *action,
}
}

static void
focus_page_selector_revealed_cb (GtkRevealer *revealer,
GParamSpec *pspec,
EvWindow *window)
{
GtkAction *action;

if (!gtk_revealer_get_child_revealed (revealer))
return;

action = gtk_action_group_get_action (window->priv->action_group,
PAGE_SELECTOR_ACTION);
ev_page_action_grab_focus (EV_PAGE_ACTION (action));

g_signal_handlers_disconnect_by_func (revealer,
focus_page_selector_revealed_cb,
window);
}

static void
ev_window_cmd_focus_page_selector (GtkAction *act,
EvWindow *window)
Expand All @@ -3797,7 +3817,11 @@ ev_window_cmd_focus_page_selector (GtkAction *act,

action = gtk_action_group_get_action (window->priv->action_group,
PAGE_SELECTOR_ACTION);
ev_page_action_grab_focus (EV_PAGE_ACTION (action));
if (gtk_revealer_get_child_revealed (GTK_REVEALER (window->priv->toolbar_revealer)))
ev_page_action_grab_focus (EV_PAGE_ACTION (action));
else
g_signal_connect (window->priv->toolbar_revealer, "notify::child-revealed",
G_CALLBACK (focus_page_selector_revealed_cb), window);
}

static void
Expand Down