Commit Graph

24 Commits

Author SHA1 Message Date
Stanislav Grinkov 31b4e8122b
libgimp: new gimp_procedure_dialog_get_preview_from_drawable() function.
This allows plug-in developers to create GimpPreviewDrawable widgets
with the procedure dialog API.
2024-02-03 21:02:40 +06:00
Jehan 5cc1c898d7 libgimp, plug-ins: enhance gimp_procedure_dialog_get_label() with markup and…
… mnemonic abilities.
2023-10-01 20:52:01 +02:00
Jehan 2f1c569249 libgimp: new gimp_procedure_dialog_fill_paned() function. 2023-10-01 20:52:01 +02:00
Jehan 334febdebb libgimp: new gimp_procedure_dialog_fill_notebook*() functions. 2023-10-01 20:52:01 +02:00
Jehan 60aeff5623 libgimp: new gimp_procedure_dialog_set_ok_label() function.
This allows to set a custom label for the OK button.
2023-10-01 20:52:01 +02:00
Jehan 59edcde06f libgimp: new function gimp_procedure_dialog_set_sensitive_if_in().
This function allows to change the sensitivity of a widget depending on the
value of another property.
We already had gimp_procedure_dialog_set_sensitive() except it was only syncing
with a boolean property, whereas the new function can compare with any property
type.
2023-10-01 20:52:01 +02:00
Alx Sa 6be4549e46 libgimp: new gimp_procedure_get_size_entry ()
This allows plug-in developers to create GimpSizeEntry
widgets with the procedure dialog API.
2023-06-21 14:05:19 +00:00
Jehan ddb572bcae libgimp: fix GIR creation warning.
The warning was:

> Warning: GimpUi: gimp_procedure_dialog_fill_scrolled_window: unknown parameter 'contents_id' in documentation comment, should be 'property'
2023-04-06 17:55:23 +02:00
Alx Sa f15b144a81 libgimp: new gimp_procedure_dialog_fill_scrolled_window()
This allows plug-in developers to create GTKScrolledWindow with the
procedure dialog API.
2023-03-31 20:26:53 +00:00
Jehan 42143881d8 libgimp, libgimpwidgets: supporting GFile properties in…
… GimpProcedureDialog.

- gimp_prop_file_chooser_button_new() now works also with properties
  G_PARAM_SPEC_OBJECT having a value_type == G_TYPE_FILE (additionally
  to GIMP_PARAM_SPEC_CONFIG_PATH properties).
- gimp_procedure_dialog_get_widget() will now create a
  GtkFileChooserButton in open mode for such a GFile property.
- New gimp_procedure_dialog_get_file_chooser() API to create
  GtkFileChooserButton for GFile properties in other modes.

Current limitation: GtkFileChooserButton doesn't have a label. This
should be fixed, probably by creating another custom widget with would
be a labelized file chooser button.
2022-06-17 17:18:12 +02:00
Jehan ed16fb9c9e libgimp: new gimp_procedure_dialog_get_int_radio().
This allows to create a GimpIntRadioFrame from an int property.
2022-06-15 21:18:37 +02:00
Jehan 7ca4d0ca45 libgimp: new gimp_procedure_dialog_get_spin_scale() and support of…
… %GIMP_TYPE_SPIN_SCALE in gimp_procedure_dialog_get_widget().

The dedicated function is for when a plug-in wants to use a scale range
multiplied by a factor. Otherwise using the generic function is fine.
2022-02-19 02:26:11 +01:00
Mayank Suman d8062d1d77 plug-in, libgimp: Fixes #6753: redesign of WebP Export dialog
Added an option for exporting thumbnail in WebP Export dialogbox.

Additionally, introduced a function gimp_procedure_dialog_fill_expander.
The function is similar to gimp_procedure_dialog_fill_frame but allows
adding GtkExpander instead of GtkFrame.
2021-06-18 16:42:08 +05:30
Jehan ca72c41fcd libgimp, libgimpwidgets: support of GimpRGB properties in…
… GimpProcedureDialog.

Technically I added:
- New gimp_prop_color_select_new() property widget to create a
  GimpColorButton for a given GimpRGB property.
- gimp_procedure_dialog_get_widget() now supports a GimpRGB property and
  will create a GimpColorArea by default.
- When the default doesn't suit you, a new function
  gimp_procedure_dialog_get_color_widget() allows to create either a
  GimpColorArea or a GimpColorButton (editable = TRUE), as well as
  choose the area type (small or large checks, as well as flat area,
  i.e. no alpha support).
2021-04-20 16:54:40 +02:00
Jehan 3f09030b03 libgimp: new gimp_procedure_dialog_set_sensitive().
New function to set some procedure dialog's widget sensitive, either
with a constant value, or by binding it to a boolean property (or its
inverse) of a config object.
2021-04-06 21:47:10 +02:00
Jehan 891097ba2f libgimp: gimp_procedure_dialog_fill() allows no properties listed.
As the docs says, this was always allowed and would just imply we want a
dialog with all properties in order of declaration.

Yet this usage would output this warning:

> plug-ins/file-fli/fli-gimp.c:976:3: warning: not enough variable arguments to fit a sentinel [-Wformat=]

This commit take care of this warning.
2021-04-05 18:52:52 +02:00
Niels De Graef de161a1bba libgimp: Add compiler hints to gimpproceduredialog
Add `G_GNUC_NULL_TERMINATED` to help the compiler point out if someone
forgets to add a `NULL` at the end of their varargs when calling this
function.
2021-01-08 14:33:50 +01:00
Jehan 87062e22ec libgimp: new gimp_procedure_dialog_get_scale_entry() function.
Though a GimpScaleEntry could already be created with
gimp_procedure_dialog_get_widget(), this specific function allows to add
a factor to the property range.
2020-11-25 12:25:59 +01:00
Jehan 3fb2ff1b9d libgimp: improvements to GimpProcedureDialog API.
- New gimp_procedure_dialog_fill_box(_list)() functions to create a
  GtkBox in the layout.
- Generating widgets for parameters of type double (and computing
  appropriate "ok defaults" digits for these, depending on the min-max
  range of the property).
2020-11-24 20:55:03 +01:00
Jehan 3918a0a04c libgimp: new metadata support concept in GimpSaveProcedure and new…
… class GimpSaveProcedureDialog.
The idea is that we have basically the same code in most file format
plug-ins to handle various generic metadata, yet usually with slight
differences here and there. Even behavior is sometimes a bit different
even though there is no reason for the logics to be different from one
format to another.

So I move the metadata support logics into GimpSaveProcedure (and
GimpProcedureConfig still keeps the main export logics). The GUI logics
is now in a new GimpSaveProcedureDialog. So export plug-ins will now get
the creation of generic metadata nearly for free. All they have to do is
to tell what kind of metadata the GimpSaveProcedure supports with the
gimp_save_procedure_set_support_*() functions.

Then consistency will apply:
- If a format supports a given metadata, they will always have an
  auxiliary argument with the same name across plug-ins.
- The label and tooltips will also be always the same in the GUI.
- Order of metadata widgets will also stay consistent.
- The widgets will work the same (no more "Comment" text view missing in
  one plug-in but present in another, or with an entry here, and a text
  view there, and so on).

Also adding gimp_save_procedure_dialog_add_metadata() to allow plug-ins
to "declare" one of their options as a metadata option, and therefore
have it packed within the "Metadata" block which is now created (for
instance for PNG/TIFF/JPEG specific metadata). This allows a nicer
organization of dialogs.
2020-11-23 02:15:13 +01:00
Jehan e6e2e11ff6 libgimp: some more functions to GimpProcedureDialog.
gimp_procedure_dialog_fill_frame() allows creating a GtkFrame, in
particular with a boolean widget which can therefore control
sensitivity of the frame contents.
gimp_procedure_dialog_get_label() creates a simple text label.
2020-11-14 00:21:46 +01:00
Jehan 7b6f2e5c2b libgimp, libgimpwidgets, plug-ins: improved GimpProcedureDialog API.
- New GimpLabelIntWidget which is a label associated to any widget with
  an integer "value" property.
- New gimp_procedure_dialog_get_int_combo() which creates a labeled
  combo box from an integer property of the GimpProcedureConfig.
- Renamed gimp_procedure_dialog_populate*() with
  gimp_procedure_dialog_fill*(). Naming is hard! I hesitated using
  _pack() as well (similarly to GtkBox API).
- New gimp_procedure_dialog_fill_flowbox*() functions to create a
  GtkFlowBox filled with property widgets (or other container widgets as
  we can pack them one in another). This is an alternative way to build
  your GUI with sane defaults, with list of property names.
2020-11-13 21:27:56 +01:00
Jehan c1a32e5763 libgimp: add some first API to populate a GimpProcedureDialog.
This is still a very early baseline for a more extended API. This first
version is not able to capture the complexity of most existing plug-in
dialogs.
2020-11-03 11:06:02 +01:00
Michael Natterer bfb7f43dbc libgimp: add GimpProcedureDialog, the new dialog class for plug-ins
It knows about the procedure and its config, and so far implements the
entire construction boilerplate and "Reset" on its own.
2019-09-20 19:24:40 +02:00