[patch] Little fix for menu separators
- From: Marcelo Malheiros <malheiro dca fee unicamp br>
- To: gtk-list redhat com
- Subject: [patch] Little fix for menu separators
- Date: Wed, 6 Aug 1997 23:24:49 -0300
Hi!
Here goes a tiny patch to prevent menu separators from getting
keyboard accelerators:
--- gimp-0.99.10/gtk+/gtk/gtkmenu.c.old Wed Aug 6 03:14:42 1997
+++ gimp-0.99.10/gtk+/gtk/gtkmenu.c Wed Aug 6 03:36:07 1997
@@ -622,7 +622,7 @@
menu_shell = GTK_MENU_SHELL (widget);
menu_item = GTK_MENU_ITEM (menu_shell->active_menu_item);
- if (menu_item)
+ if (menu_item && GTK_BIN (menu_item)->child)
{
/* block resizes */
gtk_container_block_resize (GTK_CONTAINER (widget));
Here is also another patch, now for gimp. It prevents gimp from
installing bogus signal handlers on those separators:
--- gimp-0.99.10/app/menus.c.old Wed Aug 6 00:13:23 1997
+++ gimp-0.99.10/app/menus.c Wed Aug 6 02:52:40 1997
@@ -283,7 +283,7 @@
gtk_menu_factory_add_entries (factory, entries, nmenu_entries);
for (i = 0; i < nmenu_entries; i++)
- if (entries[i].widget)
+ if (entries[i].widget && GTK_BIN (entries[i].widget)->child)
{
gtk_signal_connect (GTK_OBJECT (entries[i].widget), "install_accelerator",
(GtkSignalFunc) menus_install_accel,
These were made from a patched 0.99.10 gimp tree, using all of the
Scott Goehring's patches.
Keep the good work, pals!
Marcelo
--
Marcelo de Gomensoro Malheiros -- malheiro@dca.fee.unicamp.br
---- THE LINUX FILES - The Source Is Out There ----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]