Re: Win32 &'s --> GTK underlines

Stephen Hack (shack@uiuc.edu)
Fri, 15 Oct 1999 13:54:15 -0500


I have most of the code implemented to add the accelerator code to the window
group. All that I have left to do in create a new accel_group for each
notebook page and added the approprate calls on a page switch to add/remove
the accelerator groups.

This works fine for any class derived from GtkButton. Changing pages will
take a little bit of work, but isn't undo able. The trick will be when there
is a label and control (like a label/combo box pair) where the label is not a
child of the combo box. I think for that we will have to be hard coded the
linkage between labels and the controls. May be I should look into added some
user_data to the combo boxes? Does anybody have experience adding data to
gtkobjects?

-shack

On Fri, Oct 15, 1999 at 12:39:39AM -0500, Shaw Terwilliger wrote:
> Stephen Hack wrote:
> > I have written a function to be called on the GTK window created by
> > AP_UnixDialog_*::_constructWindow. It will turn all the &'s into underlines
> > for all the controls on the page.
> >
> > The code and snapshots are available at
> > http://argus.itg.uiuc.edu/~shack/abisource/Oct14
> >
> > As far as integrating this into abiword, where should this function be added?
> > XAP_UnixApp or XAP_UnixDialogFactory? There's no base class for all
> > the unix dialogs that I could find, just the xp ones.
>
> The problem isn't really the underlines (it's pretty easy to draw them),
> but are all the characters connected as accelerators to the dialog's
> keyboard handler (or in some other manner so that they're useful)?
>
> If so, that's great. If not, you could take a look at the
> XAP_UnixDialog_MessageBox for a quick implementation of the idea
> in a very limited context.
>
> The reason this never got added before is (as you noticed) there is
> no base Unix dialog class. All GTK dialogs derive from either
> AP_Dialog_[generic] or XAP_Dialog_[generic], so doing these
> keybindings either needed to be done through a globally-accessable
> function (like in ut_dialogHelper.cpp), or through some other
> cool solution.
>
> --
> Shaw Terwilliger



This archive was generated by hypermail 1.03b2.