Kohei Yoshida schrieb:
Hi there,
I'm working on a feature that requires a new command, and a new toolbar
icon in the toolbar for that command. I was able to add a new command
by adding it in officecfg, and to add a new button in the toolbar for
it. But I haven't been able to figure out how to assign a default icon
image for it. So my question is two-fold:
Hi Kohei,
1) How do I associate a default icon for a command?
There are two location where you have to change/add files to associate
an image to a command. One file is the corresponding Commands.xcu file
(officecfg/registry/data/org/openoffice/Office/UI/*Commands.xcu), where
you added the label for your command. The node defining the command must
have a property called "Properties" with the value 1. That means the
command has an associated image (see Commands.xcs for more information).
The other location contains the real icon image. It must be copied to
"default_images/res/commandimagelist". The image must have the name of
the command (without the schema), e.g. ".uno:Open" => "sc_open.png". The
prefix is used to determine which icon set is used (sc=small color,
lc=large color, sch=small color hicontrast, lch=large color hicontrast).
2) In case I want to use an existing icon until a new one is ready for
use, how do I "borrow" an existing icon for a new command? Is that
possible?
Yes, you can copy an existing image file. You have to use the naming
convention I described above.
Regards,
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]