Add "button" type to INX UI parameters

Bug #1070192 reported by Rena Kunisaki
8
This bug affects 1 person
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="Find"></param>
<param name="replace" type="string" _gui-text="Replace with"></param>
<param name="action" type="button" value="find_next">Find next</param>
<param name="action" type="button" value="replace_next">Replace next</param>
<param name="action" type="button" value="replace_all">Replace all</param>

If one of the buttons is used, the script would receive a parameter like --action=replace_next on the comand line. If no --action parameter is given, it can assume the Apply button was clicked (or live preview is enabled).

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.

su_v (suv-lp)
Changed in inkscape:
importance: Undecided → Wishlist
description: updated
su_v (suv-lp)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
Patrick Storz (ede123) wrote :

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

Changed in inkscape:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.