]> www.fi.muni.cz Git - evince.git/commitdiff
Work around the Escape conflict (find bar and unfullscreen)
authorMarco Pesenti Gritti <mpg@redhat.com>
Tue, 12 Apr 2005 12:27:17 +0000 (12:27 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Tue, 12 Apr 2005 12:27:17 +0000 (12:27 +0000)
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)

ChangeLog
data/evince-ui.xml
shell/ev-window.c

index fbd7672d6df475c9322d9b8f53003ba712467fa7..4fc983a75df858ac5f0fd8fa69bc8e31c7cb4b8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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)
+
 2005-04-12  Nikolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * backend/ev-page-cache.c: (ev_page_cache_next_page):
index 274075c021e5d6e8ed245ce0c45fe65e80e8fa95..738ac4e4f5c6c0bc58a5149385ecabf1a497c1a3 100644 (file)
@@ -78,5 +78,5 @@
     <toolitem action="ViewPageWidth"/>
   </toolbar>
 
-  <accelerator name="LeaveFullscreenAccel" action="LeaveFullscreen"/>
+  <accelerator name="EscapeAccel" action="Escape"/>
 </ui>
index 8dd0d6f927d24bebdb77a51dd9cec041befcc705..734846ffc8aace25c5d620be9ac8530b08e04844 100644 (file)
@@ -1658,6 +1658,19 @@ ev_window_cmd_leave_fullscreen (GtkAction *action, EvWindow *window)
        gtk_window_unfullscreen (GTK_WINDOW (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)
 {
@@ -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 */