Re: Mnemonics patch



Alexander Larsson <alla lysator liu se> writes:
> +
> +  guint mnemonic_modifier;

Remember the odd convention of using GdkModifierType not guint here.

> +gboolean gtk_window_activate_mnemonic     (GtkWindow *window,
> +					   guint      keyval,
> +					   guint      modifier);

GdkModifierType for modifier.

> +void     gtk_window_set_mnemonic_modifier (GtkWindow *window,
> +					   guint      modifier);

Here too.

> 
> Index: gtklabel.h
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gtk/gtklabel.h,v
> retrieving revision 1.26
> diff -u -p -r1.26 gtklabel.h
> --- gtklabel.h	2001/03/07 21:10:44	1.26
> +++ gtklabel.h	2001/03/21 11:32:34
> @@ -29,6 +29,8 @@
> 
>  #include <gdk/gdk.h>
>  #include <gtk/gtkmisc.h>
> +#include <gtk/gtkmnemonicactivator.h>

Small typo.

> +  parent = widget->parent;
> +  while (parent)
> +    {
> +      if (GTK_WIDGET_CAN_FOCUS (parent) ||
> +	  (!group_cycling && GTK_WIDGET_GET_CLASS (parent)->activate_signal) ||
> +	  (parent->parent && GTK_IS_NOTEBOOK (parent->parent)) ||
> +	  (GTK_IS_MENU_ITEM (parent)))
> +	return gtk_widget_activate_mnemonic (parent, group_cycling);
> +      parent = parent->parent;
> +    }

What a horrible hack this is. ;-) 

Should probably fix it somehow eventually.


Wow, I'm really excited about this patch - finally we have a nice
simple mnemonic API that works right and makes sense!

Havoc






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