diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2005-04-12 12:27:17 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2005-04-12 12:27:17 (GMT) |
commit | c40d134508973388c175eaaf42cebacc98ae9888 (patch) | |
tree | 990436a49f9d3d50b12fdd81d73dc37f072e2370 /shell/ev-window.c | |
parent | 8b317416d7d84725db8f634cf4e9e7c18f1f6691 (diff) |
Work around the Escape conflict (find bar and unfullscreen)
2005-04-12 Marco Pesenti Gritti <mpg@redhat.com>
* data/evince-ui.xml:
* shell/ev-window.c: (ev_window_cmd_escape):
Work around the Escape conflict (find bar and unfullscreen)
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r-- | shell/ev-window.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c index 8dd0d6f..734846f 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -1659,6 +1659,19 @@ ev_window_cmd_leave_fullscreen (GtkAction *action, EvWindow *window) } static void +ev_window_cmd_escape (GtkAction *action, EvWindow *window) +{ + GtkWidget *widget; + + widget = gtk_window_get_focus (GTK_WINDOW (window)); + if (widget && gtk_widget_get_ancestor (widget, EGG_TYPE_FIND_BAR)) { + update_chrome_flag (window, EV_CHROME_FINDBAR, NULL, FALSE); + } else { + gtk_window_unfullscreen (GTK_WINDOW (window)); + } +} + +static void update_view_size (EvWindow *window) { int width, height; @@ -2152,9 +2165,12 @@ static GtkActionEntry entries[] = { G_CALLBACK (ev_window_cmd_help_about) }, /* Toolbar-only */ - { "LeaveFullscreen", EV_STOCK_LEAVE_FULLSCREEN, N_("Leave Fullscreen"), "Escape", + { "LeaveFullscreen", EV_STOCK_LEAVE_FULLSCREEN, N_("Leave Fullscreen"), NULL, N_("Leave fullscreen mode"), - G_CALLBACK (ev_window_cmd_leave_fullscreen) } + G_CALLBACK (ev_window_cmd_leave_fullscreen) }, + + { "Escape", NULL, N_("Selection Caret"), "Escape", "", + G_CALLBACK (ev_window_cmd_escape) } }; /* Toggle items */ |