changeset 49419:6562bb5f04aa

gtkutil.c (xg_initialize): Initialize id_to_widget here instead of static initializer
author Jan Djärv <jan.h.d@swipnet.se>
date Fri, 24 Jan 2003 17:10:07 +0000
parents 9ab0a4464ac9
children 07a876ca33f0
files src/ChangeLog src/gtkutil.c
diffstat 2 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Jan 24 13:28:24 2003 +0000
+++ b/src/ChangeLog	Fri Jan 24 17:10:07 2003 +0000
@@ -1,3 +1,8 @@
+2003-01-24  Jan D.  <jan.h.d@swipnet.se>
+
+	* gtkutil.c (xg_initialize): Initialize id_to_widget here instead
+	of static initializer.
+
 2003-01-24  Dave Love  <fx@gnu.org>
 
 	* s/gnu-linux.h (GC_SETJMP_WORKS, GC_MARK_STACK): Define for more
--- a/src/gtkutil.c	Fri Jan 24 13:28:24 2003 +0000
+++ b/src/gtkutil.c	Fri Jan 24 17:10:07 2003 +0000
@@ -2214,7 +2214,7 @@
   GtkWidget **widgets;
   int max_size;
   int used;
-} id_to_widget = { 0, 0, 0 };
+} id_to_widget;
 
 /* Grow this much every time we need to allocate more  */
 #define ID_TO_WIDGET_INCR  32
@@ -2883,6 +2883,9 @@
   xg_menu_cb_list.prev = xg_menu_cb_list.next =
     xg_menu_item_cb_list.prev = xg_menu_item_cb_list.next = 0;
 
+  id_to_widget.max_size = id_to_widget.used = 0;
+  id_to_widget.widgets = 0;
+
   /* Remove F10 as a menu accelerator, it does not mix well with Emacs key
      bindings.  It doesn't seem to be any way to remove properties,
      so we set it to VoidSymbol which in X means "no key".  */
@@ -2890,6 +2893,13 @@
                                     "gtk-menu-bar-accel",
                                     "VoidSymbol",
                                     EMACS_CLASS);
+
+  /* Make GTK text input widgets use Emacs style keybindings.  This is
+     Emacs after all.  */
+  gtk_settings_set_string_property (gtk_settings_get_default (),
+                                    "gtk-key-theme-name",
+                                    "Emacs",
+                                    EMACS_CLASS);
 }
 
 #endif /* USE_GTK */