summaryrefslogtreecommitdiffstats
path: root/src/extension/prefdialog (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-10-19Extensions: catch parameters and translatable values with empty namePatrick Storz1-2/+4
A parameter with empty name (or name consisting of whitespace only) can cause undefined behavior and should be avoided at all cost. Empty translatable values like "gui-text"/"gui-description", while not encouraged, might be acceptable. However they must not be translated as gettext would return the full metadata of the .po file in this case.
2019-09-25Extensions: add a few missing calls to Gtk::manage()Patrick Storz4-6/+6
2019-09-25Extensions: Warn for duplicate page names and option names/valuesPatrick Storz3-4/+31
This is easy to miss and causes confusing behavior (e.g. wrong page/option selected)
2019-09-07Extensions: Handle optiongroup options without valuePatrick Storz3-6/+12
We use the user visible GUI text as value in this case, which may or may not be translated. For backwards-compatibility with enum items use the untranslated value instead, if one of the deprecated tag-names is found. Fixes https://gitlab.com/inkscape/inkscape/issues/399
2019-09-01Update internal extensions for latest .inx format changesPatrick Storz1-1/+1
2019-09-01Add appearance="multiline" to parameters of type stringPatrick Storz4-12/+100
Renders a Gtk::TextView that automatically fills the available space in the extension's preferences dialog and can be used to accept longer multi-line strings. Newlines in the string value will be passed as "\\n" to the extension script (i.e. literal '\n' with the backspace escaped).
2019-09-01Add appearance="colorbutton" to parameters of type colorPatrick Storz3-14/+69
Renders a simple Gtk::ColorButton with label instead of the full ColorNotebook which is too large for many applications. Should likely be re-implemented bringing up a new Dialog that wraps an Inkscape::UI::Widget::ColorNotebook eventually, instead of relying on the Gtk::ColorButton's picker implementation which is inconsistent to existing pickers.
2019-08-31Add new parameter of type "path"Patrick Storz3-0/+360
* Similar to parameter's of type "string": Has a text entry and stores a string preference * Additionally offers a button to show a file chooser dialog * The node's content is the initial (default) file path. * Relative paths will be considered relative to the extension's .inx file. This allows to reference files/folders shipped with the extension in a portable way. The stored value as well as the parameter value passed to the script interpreter will always be absolute, though. * The attribute "mode" controls what type(s) of paths the file chooser allows to select. Valid values: - 'file', 'files', 'folder', 'folder' (pick existing items) - 'file_new', 'folder_new' (create a new file/folder) * Note that manually entered values will be passed as-is without checking for existence.
2019-08-31Make 'gui-text' required for visible parametersPatrick Storz4-30/+41
We were actually crashing for visible parameters without 'gui-text' otherwise. Also make sure we actually *do* bail out if we have parameters missing required fields and throw/catch an exception instead of producing broken instances.
2019-08-31Add new widget "image" which allows to display an image filePatrick Storz3-1/+153
* The node's content is the file path. Absolute paths should work, the preferred way is to specify a relative path, though, which will be interpreted relatively to the .inx file's location * The attributes "width/height" allows to override the native size of the image.
2019-08-31Add new widget "spacer" which adds an empty space between widgetsPatrick Storz5-1/+136
The attribute "size" allows to define the spacing in px. The special value "expand" can be used to make the spacer consume all available space in the parent.
2019-08-31Add new widget "separator" which draws a line between widgetsPatrick Storz3-1/+99
2019-08-31Add new widgets "hbox" and "vbox" for layouting purposesPatrick Storz5-8/+186
2019-08-31Simplify pref_name() functionPatrick Storz9-57/+23
2019-08-31Make sure we have get_widget()Patrick Storz2-2/+5
2019-08-31Remove completely unused "doc" and "node" parametersPatrick Storz21-205/+152
2019-08-31Re-implement get_param() locally using get_widgets()Patrick Storz6-50/+3
2019-08-31Inherit destructor and recursively delete all widgetsPatrick Storz4-18/+5
let's hope this works as expected...
2019-08-31Complete conversion of ParamNotebook to use _childrenPatrick Storz2-14/+26
2019-08-31Make parameter string generation a job of Inkscape::ExtensionPatrick Storz6-92/+58
For this take a first step towards properly tracking children of each parameter and provide functions to look up all widgets.
2019-08-31Accept parameter type "bool"Patrick Storz1-1/+1
Seems more consistent with "int" and "float" types and should likely be preferred over the old "boolean"
2019-08-31Parameter float: add note regarding rounding issuePatrick Storz1-0/+3
2019-08-31Optimize parameter string generationPatrick Storz16-75/+65
Also rename overloaded string() functions, so it's clear what they actually do, as it's not the same thing at all...
2019-08-31InxParameter::string(): remove useless overridesPatrick Storz8-26/+7
2019-08-31More cleanupPatrick Storz15-68/+83
2019-08-31Switch Inkscape::Extension to use InxWidgets instead of InxParametersPatrick Storz3-1/+34
2019-08-31Translatable enum can be protectedPatrick Storz1-5/+4
2019-08-31Add WidgetLabel replacing the former ParamDescriptionPatrick Storz4-20/+62
This improves consistency, as "description" parameter were not actually parameters with a value that could be modified or saved. The old syntax is deprecated but still supported for now.
2019-08-31Rename Parameter -> InxParameter for consistencyPatrick Storz20-65/+65
2019-08-31Create new InxWidget base class for extension widgets.Patrick Storz13-135/+257
2019-08-31Implement "translationdomain" attribute for extensionsPatrick Storz2-9/+3
Will allow extensions to ship their own message catalog used for translation of the extension#s strings. Needs to be set on the root <inkscape-extension> element of the .inx Currently supported values: - unset: use default textdomain (which happens to be 'inkscape') - 'inkscape': use Inkscape's message catalog - 'none': disable translation for the extension's strings
2019-08-31Derive optiongroup options from ParameterPatrick Storz2-46/+52
A bit hackish for now as <option>s are not really parameters and don't have a name, pending creation of a better base-class for non-parameter .inx elements.
2019-08-31cleanup includes in parametersPatrick Storz6-24/+23
2019-08-31Add function to get proper translation within context of ParameterPatrick Storz7-34/+33
2019-08-31Parameter: remove unused constructorsPatrick Storz2-56/+0
2019-08-31Refactor a lot of the parameter handling codePatrick Storz24-1647/+1083
Many fixes, improvements and simplifications to existing code. Implements the first part of the changes discussed in https://gitlab.com/inkscape/inkscape/issues/333
2019-08-31Move error classes to Parameter where they belongPatrick Storz2-15/+27
2019-08-31Remove unused and disabled "help" feature for extensionsPatrick Storz2-38/+1
2019-08-31Remove unused define ESCAPE_DOLLAR_COMMANDLINEPatrick Storz2-8/+0
2019-08-31Rename parameter source files to avoid name conflictsPatrick Storz21-21/+34
2019-08-31Remove unused functionsPatrick Storz2-51/+0
2019-08-31Move prefdialog to own directoryPatrick Storz22-0/+3867