From: Diego Escalante Urrelo Date: Wed, 31 Mar 2010 14:28:54 +0000 (+0200) Subject: [previewer] Close with control + w X-Git-Tag: EVINCE_2_30_1~17 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=615629a95ba70c7c750c3472b36cb4440f2ead84;p=evince.git [previewer] Close with control + w Fixes bug #612972. --- 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) },