Re: gtk_window_get_accel_group()



On Tue, Jun 27, 2000 at 04:15:31PM -0400, Havoc Pennington wrote:
> Why not add an "accel_group" field to GtkWindow and then provide:
> 
> GtkAccelGroup*
> gtk_window_get_accel_group (GtkWindow *window)

I'd buy that for a dollar - it'd slightly simplify the stuff I did in
Ethereal to use accelerators as (to use the term Windows and, I think,
Motif use) mnemonics, i.e. to let the user activate buttons from the
keyboard with <Alt>+<underlined letter from the button label>.

>   /* Lazily create it */
>   if (window->accel_group == NULL)
>     {
>       window->accel_group = gtk_accel_group_new ();
>       gtk_window_add_accel_group (window->accel_group);
>     }

Just out of curiosity, when is it useful for a window to have more than
one accelerator group?  It appears that "gtk_window_add_accel_group()"
allows this.




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