--- np2/x11/gtk/Attic/gtk_main.c 2004/07/28 13:53:00 1.8 +++ np2/x11/gtk/Attic/gtk_main.c 2005/03/12 12:36:40 1.10 @@ -10,8 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -264,6 +262,9 @@ gui_gtk_widget_create(void) { GtkWidget *main_vbox; GtkWidget *menubar; +#if (GTK_MAJOR_VERSION == 2) + gchar *accel = NULL; +#endif main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_policy(GTK_WINDOW(main_window), FALSE, FALSE, TRUE); @@ -284,6 +285,16 @@ gui_gtk_widget_create(void) gtk_box_pack_start(GTK_BOX(main_vbox), drawarea, FALSE, TRUE, 0); gtk_widget_show(drawarea); +#if (GTK_MAJOR_VERSION == 2) + g_object_get(gtk_widget_get_settings(main_window), + "gtk-menu-bar-accel", &accel, NULL); + if (accel) { + g_object_set(gtk_widget_get_settings(main_window), + "gtk-menu-bar-accel", "Menu", NULL); + g_free(accel); + } +#endif + gtk_widget_realize(main_window); set_icon_bitmap(main_window);