| Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
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
|
|
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
|
|
This improves the fix for
https://bugs.launchpad.net/inkscape/+bug/1307554
Also fixes a potential crashing issue when an .inx includes
invalid XML.
|
|
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.
|
|
|
|
- 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.
|
|
(std::ostream is not properly portable unfortunately)
|
|
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).
|
|
|
|
|
|
|
|
For this take a first step towards properly tracking children
of each parameter and provide functions to look up all widgets.
|
|
Also rename overloaded string() functions, so it's clear what they
actually do, as it's not the same thing at all...
|
|
|
|
|
|
|
|
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
|
|
We used to fail silently, crashing later-on.
|
|
Many fixes, improvements and simplifications to existing code.
Implements the first part of the changes discussed in
https://gitlab.com/inkscape/inkscape/issues/333
|
|
See also https://gitlab.com/inkscape/inkscape/merge_requests/698
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- add license headers to everything
- convert a few files from public domain or LGPL2.1+ to GPL2+
- some archaeology to clarify which files are from which library
|
|
|
|
The former is guaranteed to be set for any compiler targeting win32,
the latter is implementation dependent (but works for gcc)
See also
http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system
|
|
|
|
This replaces all NULL or 0 with nullptr when assigned to or returned as
a pointer.
|
|
This reverts commit bba4ff6672494fab59286b50f6c645ad62a47e60.
|
|
|
|
Found via `codespell`
|
|
This turned out to be a bit of a mess due to the interplay between
the classes Script / ExecutionEnv / Effect / PrefDialog.
(Basically they don't talk to each other much but all want to
contribute to the GUI)
Likely "Script" (and possibly "ExecutionEnv") should be refactored
to let the other classes handle UI exclusively and throw errors
where suitable.
|
|
Found using `codespell -q 3 -w --skip="*.svg,*.po,*.ts,./share/tutorials,./src/libavoid,./packaging/win32/languages,./man,./src/2geom" -I ../inkscape-whitelist.txt`
whereby whitelist file contained:
```
dum
iff
glight
substract
te
upto
```
|
|
|
|
|
|
get_filename methods
|
|
along the lines of r14955
- "gui-description" was always translated (as opposed to only "_gui-description")
- Added possibility to specify "msgctxt" for "_gui-description"
(bzr r15635)
|
|
(notably "gui_hidden" -> hidden", "guitext" -> "text", "desc" -> "description")
(bzr r15633.1.3)
|
|
(bzr r15547)
|
|
(bzr r15509)
|
|
that behaves more consistent and predictable than before.
- Every "Parameter" now has an "_indent" member variable (specifying the indentation level; set in "Parameter::make()", see parameter.cpp)
- Indentation is achieved by using "set_margin_left()" on the parameter's widget. This fixes bug #1662035 (comment #4 contains some more details about this patch).
- Specifying "indent" on a parameter will now work consistently for all parameters. Previously the "indent" attribute often had no effect at all, e.g. for notebooks but also for parameters with 'appearance="full"' which was reasonable in most cases but made the outcome of using this attribute often unpredictable and is unnecessarily restrictive.
- Most visible change: "description"s always used an indentation level of at least one (even if no indentation was specified). For the sake of consistency this discrepancy was dropped. Previous appearance can easily be restored by setting 'indent="1"'.
Fixed bugs:
- https://launchpad.net/bugs/1662035
(bzr r15508)
|
|
(bzr r15034)
|
|
(bzr r15027)
|
|
(bzr r15023.2.5)
|
|
(bzr r15025)
|