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

Re: Storing accelerators in a rc file



mk@daveg.com writes:
> A while back there was an inspiring discussion on this list about the
> use(fulness) of user-changeable menu accelerators. What i did not understand
> from this exchange (or from the documentation at gtk.org) is how one stores
> (and retrieves ) these accelerators in a .rc file ? 

I think the relevant function is gtk_item_factory_dump_rc(), but don't
ask me how it all works. ;-) The item factory stuff has never had any
docs.

> And a related question - surely there must be some way to add 
> language-specific accelerators without hardcoding them for a set of known 
> locales ? 
> Translating the labels themselves is easy with the gettext system, but one
> soon ends up with accelerator characters that were intuitive in the original
> language but do not even appear in the text of the translated label.
> 

Remember that accelerators are not the thing underlined in the label.

If you derive your label shortcuts (called "mnemonics" in GTK 2) from 
the label text by parsing a string such as "_Save" with
gtk_label_parse_uline(), then translators can simply place the _ in
their translation.

Havoc




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