Issue #11326: Use combobox for "output-format" parameter in histogram-export
This is an attempt to resolve issue #11326 (closed).
Ideally, we should use GimpChoice
as a parameter type when we want a combobox widget in the GUI dialogue. However, due to an issue with PyGObject we can not yet create Gimp.Choice in Python.
histogram-export.py has a parameter "output-format" which was a RadioButton widget in 2.10. In 2.99, it became a text field since its datatype is String. We could change it to be an int so we could easily make a radio or combobox with GimpProcedureDialog. However, that would prevent us from switching back to a string-based parameter once Gimp.Choice is available (without making a new parameter).
My thought was to manually create a GimpStringComboBox in the GUI instead, and sync it with the "output-format" parameter once the dialogue is run. Since it's still using a string as a parameter, we should be able to eventually switch the parameter type without impacting third-party plug-in developers. The downside is the code is uglier at the moment.
@Jehan Hi! When you have time, do you have a preference? Either doing something like this, or going ahead and converting it to an int so we can use GimpProcedureDialog widgets (and just making a new parameter in the future when we get GimpChoice working)? Or something else entirely?