Skip to content

Extension updates for 1.0

Patrick Storz requested to merge ede123/inkscape:prefdialog into master

This implements the changes discussed in #333 (closed).

This has a lot of improvements, fixes and code simplifications, as well as a few new features.

Summary of most important user-visible changes:

  • Change how translatable strings in .inx files are marked and how those are handled internally (see #333 (closed) for details)
    At this point this should be fully backwards-compatible to the 0.92.x .inx-format specification.
  • Parameters:
    • Support parameters of type "bool" as an alias to "boolean".
      This is more in line with the names of parameters representing other basic types (like "int" and "float"). I tend to make this the recommended version.
    • Parameters of type "optiongroup":
      • Two new supported values for the attribute "appearance": "radio" and "combo" (e.g. <param type="optiongroup" appearance="radio" />).
        "radio" will render a radio button for each of the <option>s, "combo" will render a combobox containing the choices instead.
      • Deprecate the appearance value "minimal"
    • Deprecate parameters of type "enum" (<param type="enum" />)
      Replaced by parameters of type "optiongroup" with appearance "combo" (<param type="optiongroup" appearance="combo"/>)
    • New parameter of type "path". Implements a Gtk::Entry like "string" parameters and extends it with a Gtk::Button that brings up a Gtk::FileChooserNative.
    • Add appearance="colorbutton" for parameters of type "color", which renders a Gtk::ColorButton instead of adding a whole ColorNotebook.
    • Add appearance="multiline" for parameters of type "string", to allow for multiline strings.
  • Introduce a new concept of "extension widgets".
    Like parameters these are widgets that can be included into the GUI which is defined in the extension's .inx file. The difference is that only parameters store values. Widgets are static and purely for display.
    • New widget "label" (<label>Some text</label>) which replaces parameters of type "description" (which never really were parameters in the actual sense)
    • New widgets "hbox"/"vbox" for lay-outing purposes (allow to pack child widgets into horizontally/vertically oriented boxes)
    • New widgets "spacer"/"separator" which add a variable space or separating line between child widgets.
    • New widget "image" which allows to display an image in the extension UI

For reference: http://wiki.inkscape.org/wiki/index.php/INX_Parameters (state as of 0.92.x)

Some examples showing the new functionality:

image

image

image

Edited by Patrick Storz

Merge request reports