summaryrefslogtreecommitdiffstats
path: root/src/extension (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix alignment error for inline-size SVG 1.1 fallback text.Tavmjong Bah2019-11-131-3/+44
| | | | | Puts white space at end of line into separate tspan when 'text-anchor' is not start.
* Fix SVG 1.1 fallback for SVG 2 text in a shape with 'text-align' not equal ↵Tavmjong Bah2019-11-091-4/+13
| | | | to 'start'.
* refactor: Eliminate SPIString::value_defaultThomas Holder2019-11-032-4/+4
| | | | | | - eliminate value_default - make value private (-> _value) - add value() method
* PDF+LaTeX export: escape ampersandsPatrick Storz2019-10-301-1/+7
| | | | Fixes https://gitlab.com/inkscape/inbox/issues/1104
* refactor: clean up SPI constructorsThomas Holder2019-10-282-4/+4
|
* refactor SPIEnum: more type safetyThomas Holder2019-10-284-60/+64
| | | | | | fixes ungrouping of "font-weight:bolder" fixes "titling-caps" parsing fixes a casting error in CairoRenderContext::renderGlyphtext
* fix poppler 0.82.0 buildThomas Holder2019-10-264-3/+9
|
* Extensions: catch parameters and translatable values with empty namePatrick Storz2019-10-192-2/+9
| | | | | | | | | | 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: Implement translationdomain functionalityPatrick Storz2019-10-193-12/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | Inkscape will read the "translationdomain" attribute from the <inkscape-extension> root element in the .inx file. It will then attempt to lookup a message catalog that matches this domain, register it with gettext, and use it for translations. Message catalogs may be located in either - the .inx file's location - the root of the "extensions" directory containing the .inx - the system location Inkscape's own catalog is loaded from To make this functionality available to script extensions, Inkscape will set the environment variables INKEX_GETTEXT_DOMAIN and INKEX_GETTEXT_DIRECTORY so extension scripts can then use something like bindtextdomain(INKEX_GETTEXT_DOMAIN, INKEX_GETTEXT_DIRECTORY) textdomain(INKEX_GETTEXT_DOMAIN) to enable the feature. See also https://gitlab.com/inkscape/inkscape/issues/333 https://gitlab.com/inkscape/extensions/issues/117
* Add export/import PDF blend modes and add isolation modifierJabier Arraiza2019-10-193-17/+66
|
* fix heap-use-after-freeThomas Holder2019-10-171-1/+1
| | | | | | | Verb::set_tip takes a borrowed string pointer. This line in Effect::check() is invalid if getErrorReason() returns a temporary: _verb.set_tip(Extension::getErrorReason().c_str());
* Inkscape::XML::Node::addChildAtPosThomas Holder2019-10-161-3/+5
|
* Extensions: only check existence for interpreted scripts.Patrick Storz2019-10-161-8/+17
| | | | | | | | | | | This is for backwards-compatibility with older .inx files that used to redundantly request a dependency on their own interpreted script and did so with type="executable". However, in practice script files often *don't* have the x-bit set, which fortunately did not cause problems in the past, though, as the check for the x-bit was broken, see 3da7f71e45eb986aef67771b5af3c1e308971cff
* Extensions: Disable effects that failed to loadPatrick Storz2019-10-153-12/+10
| | | | | | | | | | | | Instead of removing them from the menu, they're now shown as inactive (greyed out), so users have a chance to know they even exists, without having to know about extension-errors.log Unfortunately tooltips seem to be hidden for insensitive menuitems as well, so we currently have no way of informing the user directly in the UI about the problem. Fixes https://gitlab.com/inkscape/inkscape/issues/470
* Extensions: Do not even attempt to register incompatible extensionsPatrick Storz2019-10-154-33/+50
| | | | | | | | This improves the fix for https://bugs.launchpad.net/inkscape/+bug/1307554 Also fixes a potential crashing issue when an .inx includes invalid XML.
* Extensions: Fix file test when checking dependencies by typePatrick Storz2019-10-153-36/+64
| | | | | | | | | | | | | | For "executable" files only existence was checked. (Glib::file_test needs a single FileTest) Apply this properly when checking script <command>s and xslt <file>s - interpreted scripts and xslt files -> only check existence - un-interpreted scripts -> check for executable file For Windows workarounds are implemented to yield desirable behavior: - as there is no executable bit, only check existence - as executables usually come with an extensions, scan for those as well.
* Extensions: Switch .xslt file look-up to dependency logic as wellPatrick Storz2019-10-143-22/+12
|
* Extensions: Improve logic to lookup script extensionsPatrick Storz2019-10-147-188/+148
| | | | | | | | | | | | | | | - Use identical logic for looking up <dependency>s and <command>s. - Remove duplicate (but inconsistent and incomplete) logic from script.cpp that was used to search for the <command> again - Remove <check> element from .inx format It seems unused (at the very least by core extensions) and redundant to <dependency> checking - Deprecate the <command>-specific "reldir" attribute. Consistently use the functionally identical "location" attribute that was only used for <dependency>s before - Introduce the new relative location value location="inx", which looks up <dependencies> and <command>s relative to the .inx file's location.
* Revert "Remove unused "nopref" variant of effects"Patrick Storz2019-10-122-0/+10
| | | | This reverts commit ef84b6a06b8fe5be8c15384cd95a35bc6d0c95a7.
* Fix various minor code problemsMarc Jeanmougin2019-10-051-1/+2
|
* Fix some memory leaks found by scan-buildMarc Jeanmougin2019-10-051-1/+1
|
* Extensions: Fix filename encoding issues in error loggingPatrick Storz2019-09-264-31/+37
| | | | (std::ostream is not properly portable unfortunately)
* 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)
* Try to improve match of image-rendering values to cairo filtersPatrick Storz2019-09-221-8/+13
| | | | | | | | Specifically image-rendering="crisp-edges" should use a scaling algorithm that does *not* blur edges. Unfortunately this only leaves CAIRO_FILTER_NEAREST, but seems to be the most suitable choice.
* Extensions/grid2: fix header file locationPatrick Storz2019-09-191-1/+2
|
* Fix bugs appliing in fallback elementsJabier Arraiza2019-09-071-1/+1
|
* Prepared for beta. Fixed blocking bugJabiertxof2019-09-071-1/+1
|
* 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-0155-750/+750
|
* Add appearance="multiline" to parameters of type stringPatrick Storz2019-09-015-13/+102
| | | | | | | | | 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-314-0/+362
| | | | | | | | | | | | | | | | | | * 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.
* Adjust <print> extensions for previous commit.Patrick Storz2019-08-313-48/+48
| | | | | (No idea what they do tbh, but I've never seen any of those parameters, so they likely *are* hidden in some way or another)
* 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-314-1/+155
| | | | | | | | | * 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 base_directory for extensions loaded from a file.Patrick Storz2019-08-3113-44/+57
|
* Add new widget "spacer" which adds an empty space between widgetsPatrick Storz2019-08-316-1/+138
| | | | | | | 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-314-1/+101
|
* Add new widgets "hbox" and "vbox" for layouting purposesPatrick Storz2019-08-316-8/+188
|
* 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-3123-315/+195
|
* Re-implement get_param() locally using get_widgets()Patrick Storz2019-08-318-116/+59
|
* 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-317-94/+77
| | | | | 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-3117-76/+66
| | | | | Also rename overloaded string() functions, so it's clear what they actually do, as it's not the same thing at all...