Add "button" type to INX UI parameters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
In a .inx file, it's possible to define various UI widget types like text, boolean, color... I suggest to add "button" to this list. This would create a button, which executes the script the same as the "apply" button does, but giving an additional parameter so the script can tell which button was pressed; e.g.:
<param name="find" type="string" _gui-text=
<param name="replace" type="string" _gui-text="Replace with"></param>
<param name="action" type="button" value="
<param name="action" type="button" value="
<param name="action" type="button" value="
If one of the buttons is used, the script would receive a parameter like --action=
An attribute on the param could also specify to keep the dialog open after clicking it, for actions that you might use multiple times; e.g. you might have buttons to move objects up/down/left/right in some manner.
It might also be good to have a way to disable the "apply" button when using these, so that users aren't confused by it.
Changed in inkscape: | |
importance: | Undecided → Wishlist |
description: | updated |
Changed in inkscape: | |
status: | New → Confirmed |
I'm reviewing some old bugs as I'm in the process of updating the .inx format a bit for 1.0 [1].
While this feature would be nice, it's kind of orthogonal to what the current extension system is designed for. An implementation would therefore complicate the code and I feel the gain would not outweigh the effort involved.
The intended feature can already be implemented today with an <enum>/ <optiongroup> that has the values of the buttons, so one item can be chosen before clicking "apply". It's not exactly the same as clicking a labeled button, but it should be close enough to cover most bases.
[1] https:/ /gitlab. com/inkscape/ inkscape/ issues/ 333