Hello to all I am making a mapping extension for inkscape. I would like to make a menu that allows to open directly a specific palette in the "palettes" window on the right. I managed to find out how to open the palette window, but it always opens the last opened palette. My menu only opens the palette window...
It looks like you are editing Inkscape .xml config files.
These are read when Inkscape loads.
Editing them when Inkscape is running - does not have the same effect.
Also there is no way in the extension system to affect elements of the GUI.
There is no way to know what palette is currently being used from the extension system at the moment - or to set it.
It is possible to use the new dbus commands to change some elements - such as swap tool, but not for palette.
The best I was able to do was to allow the loading of external gimp palettes.
It is possible in Gtk3 extensions to read and make swatch widgets with the palette of your choice, but this is totally different to controlling the Inkscape palette.
You could put in a request for example for a dbus action ref palettes or possibly to allow the extension system to send back info to change palettes, but I don't think it will happen soon
Hello to all
I am making a mapping extension for inkscape. I would like to make a menu that allows to open directly a specific palette in the "palettes" window on the right. I managed to find out how to open the palette window, but it always opens the last opened palette.
My menu only opens the palette window...
<item>
<attribute name='label' translatable="yes">Palettes cartographiques</attribute>
<attribute name='action'>win.dialog-open</attribute>
<attribute name='target'>Swatches</attribute>
<attribute name='icon'>swatches</attribute>
</item>
Thanks for your help
Laurent
It looks like you are editing Inkscape .xml config files.
These are read when Inkscape loads.
Editing them when Inkscape is running - does not have the same effect.
Also there is no way in the extension system to affect elements of the GUI.
There is no way to know what palette is currently being used from the extension system at the moment - or to set it.
It is possible to use the new dbus commands to change some elements - such as swap tool, but not for palette.
The best I was able to do was to allow the loading of external gimp palettes.
It is possible in Gtk3 extensions to read and make swatch widgets with the palette of your choice, but this is totally different to controlling the Inkscape palette.
You could put in a request for example for a dbus action ref palettes or possibly to allow the extension system to send back info to change palettes, but I don't think it will happen soon
Hello
Thanks for your answer. Is it possible to open from inx menu the box of the list of palettes in the rightwindow, without clic on the button ?
Laurent
No. Not possible to open the palette or get current selected palette.
The way I worked around it is to load gimp palettes, but again this would require a dynamic gui ( gtk3 ) and cannot be done with .inx