summaryrefslogtreecommitdiffstats
path: root/src/extension/prefdialog (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Extensions: catch parameters and translatable values with empty namePatrick Storz2019-10-191-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.
* Extensions: add a few missing calls to Gtk::manage()Patrick Storz2019-09-254-6/+6
|
* Extensions: Warn for duplicate page names and option names/valuesPatrick Storz2019-09-253-4/+31
| | | | | This is easy to miss and causes confusing behavior (e.g. wrong page/option selected)
* Extensions: Handle optiongroup options without valuePatrick Storz2019-09-073-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
* Update internal extensions for latest .inx format changesPatrick Storz2019-09-011-1/+1
|
* Add appearance="multiline" to parameters of type stringPatrick Storz2019-09-014-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).
* Add appearance="colorbutton" to parameters of type colorPatrick Storz2019-09-013-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.
* Add new parameter of type "path"Patrick Storz2019-08-313-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.
* Make 'gui-text' required for visible parametersPatrick Storz2019-08-314-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.
* Add new widget "image" which allows to display an image filePatrick Storz2019-08-313-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.
* Add new widget "spacer" which adds an empty space between widgetsPatrick Storz2019-08-315-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.
* Add new widget "separator" which draws a line between widgetsPatrick Storz2019-08-313-1/+99
|
* Add new widgets "hbox" and "vbox" for layouting purposesPatrick Storz2019-08-315-8/+186
|
* Simplify pref_name() functionPatrick Storz2019-08-319-57/+23
|
* Make sure we have get_widget()Patrick Storz2019-08-312-2/+5
|
* Remove completely unused "doc" and "node" parametersPatrick Storz2019-08-3121-205/+152
|
* Re-implement get_param() locally using get_widgets()Patrick Storz2019-08-316-50/+3
|
* Inherit destructor and recursively delete all widgetsPatrick Storz2019-08-314-18/+5
| | | | let's hope this works as expected...
* Complete conversion of ParamNotebook to use _childrenPatrick Storz2019-08-312-14/+26
|
* Make parameter string generation a job of Inkscape::ExtensionPatrick Storz2019-08-316-92/+58
| | | | | For this take a first step towards properly tracking children of each parameter and provide functions to look up all widgets.
* Accept parameter type "bool"Patrick Storz2019-08-311-1/+1
| | | | | Seems more consistent with "int" and "float" types and should likely be preferred over the old "boolean"
* Parameter float: add note regarding rounding issuePatrick Storz2019-08-311-0/+3
|
* Optimize parameter string generationPatrick Storz2019-08-3116-75/+65
| | | | | Also rename overloaded string() functions, so it's clear what they actually do, as it's not the same thing at all...
* InxParameter::string(): remove useless overridesPatrick Storz2019-08-318-26/+7
|
* More cleanupPatrick Storz2019-08-3115-68/+83
|
* Switch Inkscape::Extension to use InxWidgets instead of InxParametersPatrick Storz2019-08-313-1/+34
|
* Translatable enum can be protectedPatrick Storz2019-08-311-5/+4
|
* Add WidgetLabel replacing the former ParamDescriptionPatrick Storz2019-08-314-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.
* Rename Parameter -> InxParameter for consistencyPatrick Storz2019-08-3120-65/+65
|
* Create new InxWidget base class for extension widgets.Patrick Storz2019-08-3113-135/+257
|
* Implement "translationdomain" attribute for extensionsPatrick Storz2019-08-312-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
* Derive optiongroup options from ParameterPatrick Storz2019-08-312-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.
* cleanup includes in parametersPatrick Storz2019-08-316-24/+23
|
* Add function to get proper translation within context of ParameterPatrick Storz2019-08-317-34/+33
|
* Parameter: remove unused constructorsPatrick Storz2019-08-312-56/+0
|
* Refactor a lot of the parameter handling codePatrick Storz2019-08-3124-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
* Move error classes to Parameter where they belongPatrick Storz2019-08-312-15/+27
|
* Remove unused and disabled "help" feature for extensionsPatrick Storz2019-08-312-38/+1
|
* Remove unused define ESCAPE_DOLLAR_COMMANDLINEPatrick Storz2019-08-312-8/+0
|
* Rename parameter source files to avoid name conflictsPatrick Storz2019-08-3121-21/+34
|
* Remove unused functionsPatrick Storz2019-08-312-51/+0
|
* Move prefdialog to own directoryPatrick Storz2019-08-3122-0/+3867