Issue #12096: fix Windows build.

Commit 5b981adc7f was not taking into account that on Windows, the
gimp_resource_select_*() functions were made invisible and still needed
to be in the def file.

So this makes the 2 functions technically still exposed in the binary
even though the functions stay officially private (they are not in
header) and people are not supposed to use them directly in plug-ins.
This commit is contained in:
Jehan 2024-09-30 17:08:44 +02:00
parent 741dc20bca
commit f75569c9dd
4 changed files with 36 additions and 28 deletions

View File

@ -955,6 +955,8 @@ EXPORTS
gimp_resource_is_pattern
gimp_resource_is_valid
gimp_resource_rename
gimp_resource_select_new
gimp_resource_select_set
gimp_selection_all
gimp_selection_border
gimp_selection_bounds

View File

@ -461,7 +461,7 @@ gimp_resource_chooser_set_remote_dialog (GimpResourceChooser *self,
g_return_if_fail (klass->resource_type != G_TYPE_INVALID);
g_return_if_fail (klass->resource_type == G_TYPE_FROM_INSTANCE (resource));
_gimp_resource_select_set (priv->callback, resource);
gimp_resource_select_set (priv->callback, resource);
}
static void
@ -569,13 +569,13 @@ gimp_resource_chooser_clicked (GimpResourceChooser *self)
if (GIMP_IS_DIALOG (toplevel))
handle = gimp_dialog_get_native_handle (GIMP_DIALOG (toplevel));
priv->callback = g_strdup (_gimp_resource_select_new (priv->title,
handle,
priv->resource,
klass->resource_type,
gimp_resource_chooser_callback,
self,
NULL));
priv->callback = g_strdup (gimp_resource_select_new (priv->title,
handle,
priv->resource,
klass->resource_type,
gimp_resource_chooser_callback,
self,
NULL));
gimp_resource_chooser_set_remote_dialog (self, priv->resource);
}
}

View File

@ -37,16 +37,16 @@ typedef void (* GimpResourceChoosedCallback) (GimpResource *resource,
gboolean is_dialog_closing,
gpointer owner_data);
const gchar * _gimp_resource_select_new (const gchar *title,
GBytes *parent_handle,
GimpResource *resource,
GType resource_type,
GimpResourceChoosedCallback callback,
gpointer owner_data,
GDestroyNotify data_destroy);
const gchar * gimp_resource_select_new (const gchar *title,
GBytes *parent_handle,
GimpResource *resource,
GType resource_type,
GimpResourceChoosedCallback callback,
gpointer owner_data,
GDestroyNotify data_destroy);
void _gimp_resource_select_set (const gchar *callback_name,
GimpResource *resource);
void gimp_resource_select_set (const gchar *callback_name,
GimpResource *resource);
G_END_DECLS

View File

@ -245,7 +245,7 @@ popup_remote_chooser (const gchar *title,
}
/**
* _gimp_resource_select_new:
* gimp_resource_select_new:
* @title: Title of the resource selection dialog.
* @resource: The resource to set as the initial choice.
* @resource_type: The type of the subclass of [class@Resource].
@ -258,18 +258,21 @@ popup_remote_chooser (const gchar *title,
*
* A proxy to a remote dialog in core, which knows the installed resources.
*
* Note: this function is private and must not be used in plug-ins or
* considered part of the API.
*
* Returns: (transfer none): the name of a temporary PDB procedure. The
* string belongs to the resource selection dialog and will be
* freed automatically when the dialog is closed.
**/
const gchar *
_gimp_resource_select_new (const gchar *title,
GBytes *parent_handle,
GimpResource *resource,
GType resource_type,
GimpResourceChoosedCallback callback,
gpointer owner_data,
GDestroyNotify data_destroy)
gimp_resource_select_new (const gchar *title,
GBytes *parent_handle,
GimpResource *resource,
GType resource_type,
GimpResourceChoosedCallback callback,
gpointer owner_data,
GDestroyNotify data_destroy)
{
GimpPlugIn *plug_in = gimp_get_plug_in ();
GimpProcedure *procedure;
@ -318,15 +321,18 @@ _gimp_resource_select_new (const gchar *title,
}
/* _gimp_resource_select_set:
/* gimp_resource_select_set:
* @callback_name: a callback name as returned by [func@resource_select_new].
* @resource: a [class@Resource] of type @resource_type.
*
* Set currently selected resource in remote chooser.
*
* Note: this function is private and must not be used in plug-ins or
* considered part of the API.
*/
void
_gimp_resource_select_set (const gchar *callback_name,
GimpResource *resource)
gimp_resource_select_set (const gchar *callback_name,
GimpResource *resource)
{
GType resource_type;