From 615629a95ba70c7c750c3472b36cb4440f2ead84 Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Wed, 31 Mar 2010 16:28:54 +0200 Subject: [PATCH] [previewer] Close with control + w Fixes bug #612972. --- data/evince-previewer-ui.xml | 1 + previewer/ev-previewer-window.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/data/evince-previewer-ui.xml b/data/evince-previewer-ui.xml index 32c75afd..896b472e 100644 --- a/data/evince-previewer-ui.xml +++ b/data/evince-previewer-ui.xml @@ -13,6 +13,7 @@ + diff --git a/previewer/ev-previewer-window.c b/previewer/ev-previewer-window.c index 91e25a8a..9e9fc510 100644 --- a/previewer/ev-previewer-window.c +++ b/previewer/ev-previewer-window.c @@ -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, "W", + NULL, + G_CALLBACK (ev_previewer_window_close) }, { "GoPreviousPage", GTK_STOCK_GO_UP, N_("_Previous Page"), "Page_Up", N_("Go to the previous page"), G_CALLBACK (ev_previewer_window_previous_page) }, -- 2.43.5