]> www.fi.muni.cz Git - evince.git/commitdiff
[previewer] Close with control + w
authorDiego Escalante Urrelo <descalante@igalia.com>
Wed, 31 Mar 2010 14:28:54 +0000 (16:28 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Wed, 31 Mar 2010 14:35:16 +0000 (16:35 +0200)
Fixes bug #612972.

data/evince-previewer-ui.xml
previewer/ev-previewer-window.c

index 32c75afdf3436e224f9cc24f99397090c6908db8..896b472ed2770a69f1e811fcd3f2a508f8b15ed8 100644 (file)
@@ -13,6 +13,7 @@
     <toolitem name="PreviewPrint" action="PreviewPrint"/>
   </toolbar>
 
+  <accelerator name="FileCloseWindowAccel" action="FileCloseWindow"/>
   <accelerator name="SpaceAccel" action="Space"/>
   <accelerator name="ReturnAccel" action="Return"/>
   <accelerator name="BackSpaceAccel" action="BackSpace"/>
index 91e25a8a16800efa70a913d354b221874ddc9d9d..9e9fc5102c392ef73fa2d888dd238b4e675f075c 100644 (file)
@@ -96,6 +96,13 @@ ev_previewer_window_error_dialog_run (EvPreviewerWindow *window,
 }
 #endif
 
+static void
+ev_previewer_window_close (GtkAction         *action,
+                          EvPreviewerWindow *window)
+{
+       gtk_widget_destroy (GTK_WIDGET (window));
+}
+
 static void
 ev_previewer_window_previous_page (GtkAction         *action,
                                   EvPreviewerWindow *window)
@@ -271,6 +278,9 @@ ev_previewer_window_print (GtkAction         *action,
 #endif
 
 static const GtkActionEntry action_entries[] = {
+       { "FileCloseWindow", GTK_STOCK_CLOSE, NULL, "<control>W",
+         NULL,
+         G_CALLBACK (ev_previewer_window_close) },
        { "GoPreviousPage", GTK_STOCK_GO_UP, N_("_Previous Page"), "<control>Page_Up",
           N_("Go to the previous page"),
           G_CALLBACK (ev_previewer_window_previous_page) },