[evince] [previewer] Close with control + w
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] [previewer] Close with control + w
- Date: Wed, 31 Mar 2010 14:36:26 +0000 (UTC)
commit 615629a95ba70c7c750c3472b36cb4440f2ead84
Author: Diego Escalante Urrelo <descalante igalia com>
Date: Wed Mar 31 16:28:54 2010 +0200
[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(+), 0 deletions(-)
---
diff --git a/data/evince-previewer-ui.xml b/data/evince-previewer-ui.xml
index 32c75af..896b472 100644
--- a/data/evince-previewer-ui.xml
+++ b/data/evince-previewer-ui.xml
@@ -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"/>
diff --git a/previewer/ev-previewer-window.c b/previewer/ev-previewer-window.c
index 91e25a8..9e9fc51 100644
--- a/previewer/ev-previewer-window.c
+++ b/previewer/ev-previewer-window.c
@@ -97,6 +97,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) },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]