Re: patch #59456 (GtkMenu shouldn't let empty menu items have focus)
- From: Owen Taylor <otaylor redhat com>
- To: Kristian Rietveld <kristian planet nl>
- Cc: GTK Development list <gtk-devel-list gnome org>
- Subject: Re: patch #59456 (GtkMenu shouldn't let empty menu items have focus)
- Date: 23 Nov 2001 19:49:14 -0500
Kristian Rietveld <kristian planet nl> writes:
> Hello,
>
> The appended patch fixes bug #59456 (GtkMenu shouldn't let empty menu
> items have focus). ChangeLog:
>
> Fri Nov 23 18:11:13 Kristian Rietveld <kristian planet nl>
>
> * gtk/gtkmenushell.c (gtk_menu_shell_move_selected): don't quit the
> loop if the item is empty (#59456).
>
>
> Ok to commit?
Hmmm, it looks like the item still will be mouse selectable,
just not keyboard selectable. I think you probably need
to handle all the GTK_WIDGET_IS_SENSITIVE cases in
gtkmenushell.c.
You might want to remove the quark_type_separate_item test in:
"sensitive", (type_id != quark_type_separator_item &&
type_id != quark_type_title),
"parent", parent,
In gtkitemfactory.c; that should make it obvious whether it is
working correctly or not.
Regards,
Owen
> Index: gtkmenushell.c
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gtk/gtkmenushell.c,v
> retrieving revision 1.48
> diff -u -r1.48 gtkmenushell.c
> --- gtkmenushell.c 2001/11/17 23:28:50 1.48
> +++ gtkmenushell.c 2001/11/23 17:03:22
> @@ -874,7 +874,8 @@
> while (node != start_node &&
> (!node ||
> !GTK_WIDGET_IS_SENSITIVE (node->data) ||
> - !GTK_WIDGET_VISIBLE (node->data) ))
> + !GTK_WIDGET_VISIBLE (node->data) ||
> + !GTK_BIN (node->data)->child))
> {
> if (!node)
> node = menu_shell->children;
> @@ -888,7 +889,8 @@
> while (node != start_node &&
> (!node ||
> !GTK_WIDGET_IS_SENSITIVE (node->data) ||
> - !GTK_WIDGET_VISIBLE (node->data) ))
> + !GTK_WIDGET_VISIBLE (node->data) ||
> + !GTK_BIN (node->data)->child))
> {
> if (!node)
> node = g_list_last (menu_shell->children);
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]