In the absence of a proper framework for preferences, I'm considering
adding yet another environment variable to control this (the keystroke
used to quit).  If I implement the simple configuration mechanism I
suggested previously for Debian, this wouldn't be too awkward to use.

The change would be quite simple:

--- gtk.c       (revision 318)
+++ gtk.c       (working copy)
@@ -1612,7 +1605,8 @@
        gtk_widget_show(menuitem);
     }
     add_menu_separator(GTK_CONTAINER(menu));
-    add_menu_item_with_key(fe, GTK_CONTAINER(menu), "Exit", 'q');
+    add_menu_item_with_key(fe, GTK_CONTAINER(menu), "Exit",
+                          getenv("PUZZLES_QUIT_CONTROL") ? '\x11' : 'q');
 
     menuitem = gtk_menu_item_new_with_label("Help");
     gtk_container_add(GTK_CONTAINER(menubar), menuitem);
--- midend.c    (revision 314)
+++ midend.c    (working copy)
@@ -529,7 +531,9 @@
            midend_stop_anim(me);
            if (!midend_redo(me))
                goto done;
-       } else if (button == 'q' || button == 'Q' || button == '\x11') {
+       } else if (((button == 'q' || button == 'Q')
+                   && !getenv("PUZZLES_QUIT_CONTROL"))
+                  || button == '\x11') {
            ret = 0;
            goto done;
        } else
-- END --

I'm not sure I like that variable name, though, and it's a bit
unpleasant to be checking it in two different places.

Ben.

-- 
Ben Hutchings -- [EMAIL PROTECTED] shortened to [EMAIL PROTECTED]
If you've signed my GPG key, please send a signature on and to the new uid.
Editing code like this is akin to sticking plasters on the bleeding stump
of a severed limb. - me, 29 June 1999

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to