Add Ctrl+Q as an alias for Ctrl+W

This patch is simply meant to help users who have Ctrl+Q
hardwired into their fingers to mean "Quit the program",
regardless of whether the program has one or more windows
open.

The patch doesn't implement the "Quit closes all windows"
semantics - it just adds Ctrl+Q as an alias of Ctrl+W,
improving usability slightly until a real Quit functionality
is included (or not).

This also means that Quit isn't added to the menu and the
shortcut isn't advertised anywhere.

Signed-off-by: Adam Sjøgren <asjo@koldfront.dk>
---
 data/evince-ui.xml |    1 +
 shell/ev-window.c  |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/data/evince-ui.xml b/data/evince-ui.xml
index d5ca9c4..8acd9e9 100644
--- a/data/evince-ui.xml
+++ b/data/evince-ui.xml
@@ -120,6 +120,7 @@
   <accelerator name="CtrlKpPlusAccel" action="CtrlKpPlus"/>
   <accelerator name="CtrlKpMinusAccel" action="CtrlKpMinus"/>
   <accelerator name="CtrlInsertAccel" action="CtrlInsert" />
+  <accelerator name="QuitAccel" action="Quit" />
 
   <toolbar name="FullscreenToolbar">
      <toolitem name="GoPreviousPage" action="GoPreviousPage"/>
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 11e3c12..7d1ee07 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -5212,6 +5212,9 @@ static const GtkActionEntry entries[] = {
           G_CALLBACK (ev_window_cmd_view_zoom_out) },
 	{ "CtrlInsert", GTK_STOCK_COPY, NULL, "<control>Insert", NULL,
 	  G_CALLBACK (ev_window_cmd_edit_copy) },
+	/* Provide Ctrl+Q as an alias for Close Window: */
+	{ "Quit", GTK_STOCK_QUIT, NULL, "<control>Q", NULL,
+	  G_CALLBACK (ev_window_cmd_file_close_window) },
 };
 
 /* Toggle items */
-- 
1.6.5.7

