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 (fwd) Message-ID: <39.27EF9884@resq.fidonet.org> Date: 26 Mar 91 13:18:34 GMT Organization: RES-Q, Paterson NJ (201) 881-7421 Lines: 64 From uunet!osf.org!motif-talk-request From: uunet!esacs!ferrara To: motif-talk@osf.org (Motif Talk) Date: Mon, 25 Mar 91 18:16:19 ITA Sorry if you receive twice, but for 5 days our connection to italian backbone was broken..... RESEND - FOLLOW --- > 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