[Glade-users] Accelerators for Pulldown menus



On Tue, 2004-11-16 at 15:11, Joel Wheeler wrote:



Hello-

I am having trouble using accelerator keys to activate pulldown menus in
Glade built GUI's. Is there a solution for this? I dug through the email
list archives, and saw the following response for one person using glade
0.5.9:

"There is a known problem when using menubars in normal GtkWindow widgets
in a Gnome project."

Has this been fixed since 0.5.9? I am using 0.6.4, and still experiencing
problems.
Is there any type of workaround for this?
Is this a problem with the code that Glade outputs, or a shortcoming of the
libraries that get used by the resulting GUI application that is built
(gnome, or maybe gtk?)

It was fixed in the latest 2.0.2 and 2.6.5 release.
Glade 0.6.4 is based on the very old GTK+ 1.x versions and isn't really
supported now.

You could fix it yourself if you really need it.
In glade/gbwidgets/gbmenubar.c in gb_menu_bar_write_source(),
I think you just need to change this:

 source_add (data,
             "  gnome_app_fill_menu (GTK_MENU_SHELL (%s), %s_uiinfo,\n"
             "                       NULL, FALSE, 0);\n",
             data->wname, data->real_wname);


to this:

 data->need_accel_group = TRUE;
 source_add (data,
             "  gnome_app_fill_menu (GTK_MENU_SHELL (%s), %s_uiinfo,\n"
             "                       accel_group, FALSE, 0);\n",
             data->wname, data->real_wname);

Damon






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]