app, libgimp, pdb: all gimp_*_popup() PDB calls now take a resource object as…

… argument (not a resource name).
This commit is contained in:
Jehan 2023-08-17 01:30:59 +02:00
parent b578fd8cf1
commit d84c4d763b
24 changed files with 99 additions and 122 deletions

View file

@ -407,7 +407,7 @@ gimp_pdb_dialog_new (Gimp *gimp,
GBytes *parent_handle,
const gchar *title,
const gchar *callback_name,
const gchar *object_name,
GimpObject *object,
...)
{
gboolean retval = FALSE;
@ -423,12 +423,11 @@ gimp_pdb_dialog_new (Gimp *gimp,
{
va_list args;
va_start (args, object_name);
va_start (args, object);
retval = gimp->gui.pdb_dialog_new (gimp, context, progress,
container, parent_handle, title,
callback_name, object_name,
args);
callback_name, object, args);
va_end (args);
}

View file

@ -77,7 +77,7 @@ struct _GimpGui
GBytes *parent_handle,
const gchar *title,
const gchar *callback_name,
const gchar *object_name,
GimpObject *object,
va_list args);
gboolean (* pdb_dialog_set) (Gimp *gimp,
GimpContainer *container,
@ -176,7 +176,7 @@ gboolean gimp_pdb_dialog_new (Gimp *gimp,
GBytes *parent_handle,
const gchar *title,
const gchar *callback_name,
const gchar *object_name,
GimpObject *object,
...) G_GNUC_NULL_TERMINATED;
gboolean gimp_pdb_dialog_set (Gimp *gimp,
GimpContainer *container,

View file

@ -156,7 +156,7 @@ static gboolean gui_pdb_dialog_new (Gimp *gimp,
GBytes *parent_handle,
const gchar *title,
const gchar *callback_name,
const gchar *object_name,
GimpObject *object,
va_list args);
static gboolean gui_pdb_dialog_set (Gimp *gimp,
GimpContainer *container,
@ -615,7 +615,7 @@ gui_pdb_dialog_new (Gimp *gimp,
GBytes *parent_handle,
const gchar *title,
const gchar *callback_name,
const gchar *object_name,
GimpObject *object,
va_list args)
{
GType dialog_type = G_TYPE_NONE;
@ -657,9 +657,6 @@ gui_pdb_dialog_new (Gimp *gimp,
{
GimpObject *object = NULL;
if (object_name && strlen (object_name))
object = gimp_container_get_child_by_name (container, object_name);
if (! object)
object = gimp_context_get_by_type (context,
gimp_container_get_children_type (container));

View file

@ -50,12 +50,12 @@ brushes_popup_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
const gchar *brush_callback;
const gchar *popup_title;
const gchar *initial_brush_name;
GimpBrush *initial_brush;
GBytes *parent_window;
brush_callback = g_value_get_string (gimp_value_array_index (args, 0));
popup_title = g_value_get_string (gimp_value_array_index (args, 1));
initial_brush_name = g_value_get_string (gimp_value_array_index (args, 2));
initial_brush = g_value_get_object (gimp_value_array_index (args, 2));
parent_window = g_value_get_boxed (gimp_value_array_index (args, 3));
if (success)
@ -64,9 +64,8 @@ brushes_popup_invoker (GimpProcedure *procedure,
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
gimp_data_factory_get_container (gimp->brush_factory),
parent_window,
popup_title, brush_callback, initial_brush_name,
NULL))
parent_window, popup_title, brush_callback,
GIMP_OBJECT (initial_brush), NULL))
success = FALSE;
}
@ -162,11 +161,10 @@ register_brush_select_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("initial-brush-name",
"initial brush name",
"The name of the brush to set as the initial choice",
FALSE, TRUE, FALSE,
NULL,
gimp_param_spec_brush ("initial-brush",
"initial brush",
"The brush to set as the initial choice",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boxed ("parent-window",

View file

@ -50,12 +50,12 @@ fonts_popup_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
const gchar *font_callback;
const gchar *popup_title;
const gchar *initial_font_name;
GimpFont *initial_font;
GBytes *parent_window;
font_callback = g_value_get_string (gimp_value_array_index (args, 0));
popup_title = g_value_get_string (gimp_value_array_index (args, 1));
initial_font_name = g_value_get_string (gimp_value_array_index (args, 2));
initial_font = g_value_get_object (gimp_value_array_index (args, 2));
parent_window = g_value_get_boxed (gimp_value_array_index (args, 3));
if (success)
@ -65,9 +65,8 @@ fonts_popup_invoker (GimpProcedure *procedure,
! gimp_data_factory_data_wait (gimp->font_factory) ||
! gimp_pdb_dialog_new (gimp, context, progress,
gimp_data_factory_get_container (gimp->font_factory),
parent_window,
popup_title, font_callback, initial_font_name,
NULL))
parent_window, popup_title, font_callback,
GIMP_OBJECT (initial_font), NULL))
success = FALSE;
}
@ -165,11 +164,10 @@ register_font_select_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("initial-font-name",
"initial font name",
gimp_param_spec_font ("initial-font",
"initial font",
"The name of the initial font choice.",
FALSE, TRUE, FALSE,
NULL,
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boxed ("parent-window",

View file

@ -50,12 +50,12 @@ gradients_popup_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
const gchar *gradient_callback;
const gchar *popup_title;
const gchar *initial_gradient_name;
GimpGradient *initial_gradient;
GBytes *parent_window;
gradient_callback = g_value_get_string (gimp_value_array_index (args, 0));
popup_title = g_value_get_string (gimp_value_array_index (args, 1));
initial_gradient_name = g_value_get_string (gimp_value_array_index (args, 2));
initial_gradient = g_value_get_object (gimp_value_array_index (args, 2));
parent_window = g_value_get_boxed (gimp_value_array_index (args, 3));
if (success)
@ -70,9 +70,8 @@ gradients_popup_invoker (GimpProcedure *procedure,
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
gimp_data_factory_get_container (gimp->gradient_factory),
parent_window,
popup_title, gradient_callback, initial_gradient_name,
NULL))
parent_window, popup_title, gradient_callback,
GIMP_OBJECT (initial_gradient), NULL))
success = FALSE;
}
@ -168,11 +167,10 @@ register_gradient_select_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("initial-gradient-name",
"initial gradient name",
"The name of the initial gradient choice",
FALSE, TRUE, FALSE,
NULL,
gimp_param_spec_gradient ("initial-gradient",
"initial gradient",
"The initial gradient choice",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boxed ("parent-window",

View file

@ -50,12 +50,12 @@ palettes_popup_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
const gchar *palette_callback;
const gchar *popup_title;
const gchar *initial_palette_name;
GimpPalette *initial_palette;
GBytes *parent_window;
palette_callback = g_value_get_string (gimp_value_array_index (args, 0));
popup_title = g_value_get_string (gimp_value_array_index (args, 1));
initial_palette_name = g_value_get_string (gimp_value_array_index (args, 2));
initial_palette = g_value_get_object (gimp_value_array_index (args, 2));
parent_window = g_value_get_boxed (gimp_value_array_index (args, 3));
if (success)
@ -64,9 +64,8 @@ palettes_popup_invoker (GimpProcedure *procedure,
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
gimp_data_factory_get_container (gimp->palette_factory),
parent_window,
popup_title, palette_callback, initial_palette_name,
NULL))
parent_window, popup_title, palette_callback,
GIMP_OBJECT (initial_palette), NULL))
success = FALSE;
}
@ -162,11 +161,10 @@ register_palette_select_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("initial-palette-name",
"initial palette name",
"The name of the palette to set as the initial choice.",
FALSE, TRUE, FALSE,
NULL,
gimp_param_spec_palette ("initial-palette",
"initial palette",
"The palette to set as the initial choice.",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boxed ("parent-window",

View file

@ -50,12 +50,12 @@ patterns_popup_invoker (GimpProcedure *procedure,
gboolean success = TRUE;
const gchar *pattern_callback;
const gchar *popup_title;
const gchar *initial_pattern_name;
GimpPattern *initial_pattern;
GBytes *parent_window;
pattern_callback = g_value_get_string (gimp_value_array_index (args, 0));
popup_title = g_value_get_string (gimp_value_array_index (args, 1));
initial_pattern_name = g_value_get_string (gimp_value_array_index (args, 2));
initial_pattern = g_value_get_object (gimp_value_array_index (args, 2));
parent_window = g_value_get_boxed (gimp_value_array_index (args, 3));
if (success)
@ -64,9 +64,8 @@ patterns_popup_invoker (GimpProcedure *procedure,
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
gimp_data_factory_get_container (gimp->pattern_factory),
parent_window,
popup_title, pattern_callback, initial_pattern_name,
NULL))
parent_window, popup_title, pattern_callback,
GIMP_OBJECT (initial_pattern), NULL))
success = FALSE;
}
@ -162,11 +161,10 @@ register_pattern_select_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("initial-pattern-name",
"initial pattern name",
"The name of the pattern to set as the initial choice",
FALSE, TRUE, FALSE,
NULL,
gimp_param_spec_pattern ("initial-pattern",
"initial pattern",
"The pattern to set as the initial choice",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boxed ("parent-window",

View file

@ -41,7 +41,7 @@
* gimp_brushes_popup:
* @brush_callback: The callback PDB proc to call when user chooses a brush.
* @popup_title: Title of the brush selection dialog.
* @initial_brush_name: The name of the brush to set as the initial choice.
* @initial_brush: The brush to set as the initial choice.
* @parent_window: An optional parent window handle for the popup to be set transient to.
*
* Invokes the GIMP brush selection dialog.
@ -53,7 +53,7 @@
gboolean
gimp_brushes_popup (const gchar *brush_callback,
const gchar *popup_title,
const gchar *initial_brush_name,
GimpBrush *initial_brush,
GBytes *parent_window)
{
GimpValueArray *args;
@ -63,7 +63,7 @@ gimp_brushes_popup (const gchar *brush_callback,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, brush_callback,
G_TYPE_STRING, popup_title,
G_TYPE_STRING, initial_brush_name,
GIMP_TYPE_BRUSH, initial_brush,
G_TYPE_BYTES, parent_window,
G_TYPE_NONE);

View file

@ -34,7 +34,7 @@ G_BEGIN_DECLS
gboolean gimp_brushes_popup (const gchar *brush_callback,
const gchar *popup_title,
const gchar *initial_brush_name,
GimpBrush *initial_brush,
GBytes *parent_window);
gboolean gimp_brushes_close_popup (const gchar *brush_callback);
gboolean gimp_brushes_set_popup (const gchar *brush_callback,

View file

@ -49,7 +49,7 @@
* gimp_fonts_popup:
* @font_callback: The callback PDB proc to call when user chooses a font.
* @popup_title: Title of the font selection dialog.
* @initial_font_name: The name of the initial font choice.
* @initial_font: The name of the initial font choice.
* @parent_window: An optional parent window handle for the popup to be set transient to.
*
* Invokes the Gimp font selection dialog.
@ -61,7 +61,7 @@
gboolean
gimp_fonts_popup (const gchar *font_callback,
const gchar *popup_title,
const gchar *initial_font_name,
GimpFont *initial_font,
GBytes *parent_window)
{
GimpValueArray *args;
@ -71,7 +71,7 @@ gimp_fonts_popup (const gchar *font_callback,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, font_callback,
G_TYPE_STRING, popup_title,
G_TYPE_STRING, initial_font_name,
GIMP_TYPE_FONT, initial_font,
G_TYPE_BYTES, parent_window,
G_TYPE_NONE);

View file

@ -34,7 +34,7 @@ G_BEGIN_DECLS
gboolean gimp_fonts_popup (const gchar *font_callback,
const gchar *popup_title,
const gchar *initial_font_name,
GimpFont *initial_font,
GBytes *parent_window);
gboolean gimp_fonts_close_popup (const gchar *font_callback);
gboolean gimp_fonts_set_popup (const gchar *font_callback,

View file

@ -41,7 +41,7 @@
* gimp_gradients_popup:
* @gradient_callback: The callback PDB proc to call when user chooses a gradient.
* @popup_title: Title of the gradient selection dialog.
* @initial_gradient_name: The name of the initial gradient choice.
* @initial_gradient: The initial gradient choice.
* @parent_window: An optional parent window handle for the popup to be set transient to.
*
* Invokes the Gimp gradients selection dialog.
@ -53,7 +53,7 @@
gboolean
gimp_gradients_popup (const gchar *gradient_callback,
const gchar *popup_title,
const gchar *initial_gradient_name,
GimpGradient *initial_gradient,
GBytes *parent_window)
{
GimpValueArray *args;
@ -63,7 +63,7 @@ gimp_gradients_popup (const gchar *gradient_callback,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, gradient_callback,
G_TYPE_STRING, popup_title,
G_TYPE_STRING, initial_gradient_name,
GIMP_TYPE_GRADIENT, initial_gradient,
G_TYPE_BYTES, parent_window,
G_TYPE_NONE);

View file

@ -34,7 +34,7 @@ G_BEGIN_DECLS
gboolean gimp_gradients_popup (const gchar *gradient_callback,
const gchar *popup_title,
const gchar *initial_gradient_name,
GimpGradient *initial_gradient,
GBytes *parent_window);
gboolean gimp_gradients_close_popup (const gchar *gradient_callback);
gboolean gimp_gradients_set_popup (const gchar *gradient_callback,

View file

@ -41,7 +41,7 @@
* gimp_palettes_popup:
* @palette_callback: The callback PDB proc to call when user chooses a palette.
* @popup_title: Title of the palette selection dialog.
* @initial_palette_name: The name of the palette to set as the initial choice.
* @initial_palette: The palette to set as the initial choice.
* @parent_window: An optional parent window handle for the popup to be set transient to.
*
* Invokes the Gimp palette selection dialog.
@ -53,7 +53,7 @@
gboolean
gimp_palettes_popup (const gchar *palette_callback,
const gchar *popup_title,
const gchar *initial_palette_name,
GimpPalette *initial_palette,
GBytes *parent_window)
{
GimpValueArray *args;
@ -63,7 +63,7 @@ gimp_palettes_popup (const gchar *palette_callback,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, palette_callback,
G_TYPE_STRING, popup_title,
G_TYPE_STRING, initial_palette_name,
GIMP_TYPE_PALETTE, initial_palette,
G_TYPE_BYTES, parent_window,
G_TYPE_NONE);

View file

@ -34,7 +34,7 @@ G_BEGIN_DECLS
gboolean gimp_palettes_popup (const gchar *palette_callback,
const gchar *popup_title,
const gchar *initial_palette_name,
GimpPalette *initial_palette,
GBytes *parent_window);
gboolean gimp_palettes_close_popup (const gchar *palette_callback);
gboolean gimp_palettes_set_popup (const gchar *palette_callback,

View file

@ -41,7 +41,7 @@
* gimp_patterns_popup:
* @pattern_callback: The callback PDB proc to call when the user chooses a pattern.
* @popup_title: Title of the pattern selection dialog.
* @initial_pattern_name: The name of the pattern to set as the initial choice.
* @initial_pattern: The pattern to set as the initial choice.
* @parent_window: An optional parent window handle for the popup to be set transient to.
*
* Invokes the Gimp pattern selection.
@ -53,7 +53,7 @@
gboolean
gimp_patterns_popup (const gchar *pattern_callback,
const gchar *popup_title,
const gchar *initial_pattern_name,
GimpPattern *initial_pattern,
GBytes *parent_window)
{
GimpValueArray *args;
@ -63,7 +63,7 @@ gimp_patterns_popup (const gchar *pattern_callback,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, pattern_callback,
G_TYPE_STRING, popup_title,
G_TYPE_STRING, initial_pattern_name,
GIMP_TYPE_PATTERN, initial_pattern,
G_TYPE_BYTES, parent_window,
G_TYPE_NONE);

View file

@ -34,7 +34,7 @@ G_BEGIN_DECLS
gboolean gimp_patterns_popup (const gchar *pattern_callback,
const gchar *popup_title,
const gchar *initial_pattern_name,
GimpPattern *initial_pattern,
GBytes *parent_window);
gboolean gimp_patterns_close_popup (const gchar *pattern_callback);
gboolean gimp_patterns_set_popup (const gchar *pattern_callback,

View file

@ -232,30 +232,26 @@ popup_remote_chooser (const gchar *title,
GType resource_type)
{
gboolean result = FALSE;
gchar *resource_name;
/* The PDB procedure still takes a name */
resource_name = gimp_resource_get_name (resource);
if (g_type_is_a (resource_type, GIMP_TYPE_BRUSH))
{
result = gimp_brushes_popup (temp_PDB_callback_name, title, resource_name, parent_handle);
result = gimp_brushes_popup (temp_PDB_callback_name, title, GIMP_BRUSH (resource), parent_handle);
}
else if (g_type_is_a (resource_type, GIMP_TYPE_FONT))
{
result = gimp_fonts_popup (temp_PDB_callback_name, title, resource_name, parent_handle);
result = gimp_fonts_popup (temp_PDB_callback_name, title, GIMP_FONT (resource), parent_handle);
}
else if (g_type_is_a (resource_type, GIMP_TYPE_GRADIENT))
{
result = gimp_gradients_popup (temp_PDB_callback_name, title, resource_name, parent_handle);
result = gimp_gradients_popup (temp_PDB_callback_name, title, GIMP_GRADIENT (resource), parent_handle);
}
else if (g_type_is_a (resource_type, GIMP_TYPE_PALETTE))
{
result = gimp_palettes_popup (temp_PDB_callback_name, title, resource_name, parent_handle);
result = gimp_palettes_popup (temp_PDB_callback_name, title, GIMP_PALETTE (resource), parent_handle);
}
else if (g_type_is_a (resource_type, GIMP_TYPE_PATTERN))
{
result = gimp_patterns_popup (temp_PDB_callback_name, title, resource_name, parent_handle);
result = gimp_patterns_popup (temp_PDB_callback_name, title, GIMP_PATTERN (resource), parent_handle);
}
else
{

View file

@ -27,8 +27,8 @@ sub brushes_popup {
desc => 'The callback PDB proc to call when user chooses a brush' },
{ name => 'popup_title', type => 'string',
desc => 'Title of the brush selection dialog' },
{ name => 'initial_brush_name', type => 'string', null_ok => 1,
desc => 'The name of the brush to set as the initial choice' },
{ name => 'initial_brush', type => 'brush', null_ok => 1,
desc => 'The brush to set as the initial choice' },
{ name => 'parent_window', type => 'bytes', null_ok => 1,
desc => 'An optional parent window handle for the popup to be set transient to' }
);
@ -40,9 +40,8 @@ sub brushes_popup {
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
gimp_data_factory_get_container (gimp->brush_factory),
parent_window,
popup_title, brush_callback, initial_brush_name,
NULL))
parent_window, popup_title, brush_callback,
GIMP_OBJECT (initial_brush), NULL))
success = FALSE;
}
CODE

View file

@ -28,7 +28,7 @@ sub fonts_popup {
desc => 'The callback PDB proc to call when user chooses a font' },
{ name => 'popup_title', type => 'string',
desc => 'Title of the font selection dialog' },
{ name => 'initial_font_name', type => 'string', null_ok => 1,
{ name => 'initial_font', type => 'font', null_ok => 1,
desc => 'The name of the initial font choice.' },
{ name => 'parent_window', type => 'bytes', null_ok => 1,
desc => 'An optional parent window handle for the popup to be set transient to' }
@ -42,9 +42,8 @@ sub fonts_popup {
! gimp_data_factory_data_wait (gimp->font_factory) ||
! gimp_pdb_dialog_new (gimp, context, progress,
gimp_data_factory_get_container (gimp->font_factory),
parent_window,
popup_title, font_callback, initial_font_name,
NULL))
parent_window, popup_title, font_callback,
GIMP_OBJECT (initial_font), NULL))
success = FALSE;
}
CODE

View file

@ -28,8 +28,8 @@ sub gradients_popup {
desc => 'The callback PDB proc to call when user chooses a gradient' },
{ name => 'popup_title', type => 'string',
desc => 'Title of the gradient selection dialog' },
{ name => 'initial_gradient_name', type => 'string', null_ok => 1,
desc => 'The name of the initial gradient choice' },
{ name => 'initial_gradient', type => 'gradient', null_ok => 1,
desc => 'The initial gradient choice' },
{ name => 'parent_window', type => 'bytes', null_ok => 1,
desc => 'An optional parent window handle for the popup to be set transient to' }
);
@ -47,9 +47,8 @@ sub gradients_popup {
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
gimp_data_factory_get_container (gimp->gradient_factory),
parent_window,
popup_title, gradient_callback, initial_gradient_name,
NULL))
parent_window, popup_title, gradient_callback,
GIMP_OBJECT (initial_gradient), NULL))
success = FALSE;
}
CODE

View file

@ -27,8 +27,8 @@ sub palettes_popup {
desc => 'The callback PDB proc to call when user chooses a palette' },
{ name => 'popup_title', type => 'string',
desc => 'Title of the palette selection dialog' },
{ name => 'initial_palette_name', type => 'string', null_ok => 1,
desc => 'The name of the palette to set as the initial choice.' },
{ name => 'initial_palette', type => 'palette', null_ok => 1,
desc => 'The palette to set as the initial choice.' },
{ name => 'parent_window', type => 'bytes', null_ok => 1,
desc => 'An optional parent window handle for the popup to be set transient to' }
);
@ -40,9 +40,8 @@ sub palettes_popup {
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
gimp_data_factory_get_container (gimp->palette_factory),
parent_window,
popup_title, palette_callback, initial_palette_name,
NULL))
parent_window, popup_title, palette_callback,
GIMP_OBJECT (initial_palette), NULL))
success = FALSE;
}
CODE

View file

@ -27,8 +27,8 @@ sub patterns_popup {
desc => 'The callback PDB proc to call when the user chooses a pattern' },
{ name => 'popup_title', type => 'string',
desc => 'Title of the pattern selection dialog' },
{ name => 'initial_pattern_name', type => 'string', null_ok => 1,
desc => 'The name of the pattern to set as the initial choice' },
{ name => 'initial_pattern', type => 'pattern', null_ok => 1,
desc => 'The pattern to set as the initial choice' },
{ name => 'parent_window', type => 'bytes', null_ok => 1,
desc => 'An optional parent window handle for the popup to be set transient to' }
);
@ -40,9 +40,8 @@ sub patterns_popup {
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
gimp_data_factory_get_container (gimp->pattern_factory),
parent_window,
popup_title, pattern_callback, initial_pattern_name,
NULL))
parent_window, popup_title, pattern_callback,
GIMP_OBJECT (initial_pattern), NULL))
success = FALSE;
}
CODE