RE: [gtk-list] Re: Accelerators



With Windoze, you pass in a string with an ampersand preceding the character
that should be "accelerated" as the name of the menu ... so, if you name
your menu "&File", the F will be underlined, and the accelerator is Alt-F.
"F&ile" would be accessed with Alt-I, etc.

Timothy M. Shead
tshead@k-3d.com

> -----Original Message-----
> From: hp@icon.labs.redhat.com [mailto:hp@icon.labs.redhat.com]On Behalf
> Of Havoc Pennington
> Sent: Saturday, February 19, 2000 1:39 PM
> To: gtk-list@redhat.com
> Subject: [gtk-list] Re: Accelerators
>
>
> Jens Askengren <ebo000441@ktv.eboab.se> writes:
> > Imagine a typical Yes-No dialog. Pressing enter will have the
> same effect
> > as clicking on yes. Pressing escape will equal no.
> >
>
> Note that GnomeDialog already does these two for you...
>
>
> > gtk_widget_add_accelerator (dialog, "delete-event",
> > 			    accel_group, GDK_Escape, 0, 0);
> >
> > Why can't I do that?
> >
>
> Because delete-event requires an argument (the event), and there is no
> argument available when the user presses escape.
>
> > Should these accelerator require a modifier (ie GDK_MOD1_MASK) like
> > menus do?
> >
>
> GTK imposes no standard, and since few apps do this there's no
> convention either. What does Windows do?
>
> Havoc
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
> /dev/null
>
>



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