Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!resq!Uucp From: Uucp@resq.fidonet.org (Uucp) Newsgroups: comp.windows.x.motif Subject: Re: Accelerator Message-ID: <35.27EF987D@resq.fidonet.org> Date: 26 Mar 91 13:18:01 GMT Organization: RES-Q, Paterson NJ (201) 881-7421 Lines: 68 From uunet!osf.org!motif-talk-request From: uunet!esacs!ferrara To: motif-talk@osf.org (Motif Talk) Date: Wed, 20 Mar 91 17:45:50 ITA Forwarded message: From ferrara Wed Mar 20 16:42:37 1991 Subject: Re: Accelerator To: i2unix.uucp!osf.org!motif-talk-request (Susan Murdock Thompson) Date: Wed, 20 Mar 91 16:42:37 ITA In-Reply-To: <9103191430.AA08583@osf.osf.org>; from "Susan Murdock Thompson" at Mar 19, 91 9:30 am X-Mailer: ELM [version 2.3 PL0] susan@osf.osf.org says: > Good question - it's a difficult feature to implement, but we are > considering this for the future. To assign an accelerator on a PushButton > not in a menu system, refer to the Xt Instrinsics documentation on > accelerators and translations. Thanks. It seems that it does not violate Style Guide. The only problem is that we use Xt to install accelerators but on Label widget Initialize method OSF puts this code: ... some stuff deleted ... /* Accelerators are currently only supported in menus */ if ((lw->label._acc_text != NULL) && ((lw->label.menu_type == XmMENU_POPUP) || (lw->label.menu_type == XmMENU_PULLDOWN))) { ... stuff that set the accelerator text ... } else lw->label._acc_text = NULL; ... same stuff for accelerator ... ... other stuff deleted ... if ((XtClass(lw) == xmLabelWidgetClass) && ((lw->label.menu_type == XmMENU_POPUP) || (lw->label.menu_type == XmMENU_PULLDOWN) || (lw->label.menu_type == XmMENU_OPTION))) { lw->primitive.traversal_on = FALSE; lw->primitive.highlight_on_enter = FALSE; XtOverrideTranslations(lw, ((XmLabelClassRec *)XtClass(lw))->label_class.translations); } that makes a little hard to make accelerators working. I suppose that FORCING to NULL string is a constrain to respect the Style guide. If you want to permit to install acc "not in a menu" you must remove the 'else' part. Giancarlo FERRARA uunet!i2unix!esacs!ferrara -- Uucp - via FidoNet node 1:269/133 UUCP: uunet!resq!Uucp