mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
libgimp, pdb, plug-ins: don't skip gimp_*get_*() API from GObject Introspection anymore.
The original reason to skip these was because the new _list_ API were
introspected basically to a similar function signature, except with a
useless return value, at least in pygobject binding where the list size
was also returned.
Though it seems that in fact, only the docstring was wrong. The real
signature was apparently already the same.
See: https://gitlab.gnome.org/GNOME/pygobject/-/issues/352
Therefore since the _get_ naming is more consistent compared to other
existing function, let's re-integrate the _get_ functions for array of
items or images.
This basically reverts commit 15ec254148
.
This commit is contained in:
parent
38946716f2
commit
8b6d90700a
9 changed files with 17 additions and 33 deletions
|
@ -75,7 +75,7 @@ gimp_image_id_is_valid (gint image_id)
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_get_images: (skip)
|
||||
* gimp_get_images:
|
||||
* @num_images: (out): The number of images currently open.
|
||||
*
|
||||
* Returns the list of images currently open.
|
||||
|
@ -463,7 +463,7 @@ gimp_image_get_height (GimpImage *image)
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_image_get_layers: (skip)
|
||||
* gimp_image_get_layers:
|
||||
* @image: The image.
|
||||
* @num_layers: (out): The number of root layers contained in the image.
|
||||
*
|
||||
|
@ -513,7 +513,7 @@ gimp_image_get_layers (GimpImage *image,
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_image_get_channels: (skip)
|
||||
* gimp_image_get_channels:
|
||||
* @image: The image.
|
||||
* @num_channels: (out): The number of channels contained in the image.
|
||||
*
|
||||
|
@ -560,7 +560,7 @@ gimp_image_get_channels (GimpImage *image,
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_image_get_vectors: (skip)
|
||||
* gimp_image_get_vectors:
|
||||
* @image: The image.
|
||||
* @num_vectors: (out): The number of vectors contained in the image.
|
||||
*
|
||||
|
@ -2070,7 +2070,7 @@ _gimp_image_thumbnail (GimpImage *image,
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_image_get_selected_layers: (skip)
|
||||
* gimp_image_get_selected_layers:
|
||||
* @image: The image.
|
||||
* @num_layers: (out): The number of selected layers in the image.
|
||||
*
|
||||
|
@ -2161,7 +2161,7 @@ gimp_image_set_selected_layers (GimpImage *image,
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_image_get_selected_channels: (skip)
|
||||
* gimp_image_get_selected_channels:
|
||||
* @image: The image.
|
||||
* @num_channels: (out): The number of selected channels in the image.
|
||||
*
|
||||
|
@ -2252,7 +2252,7 @@ gimp_image_set_selected_channels (GimpImage *image,
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_image_get_selected_vectors: (skip)
|
||||
* gimp_image_get_selected_vectors:
|
||||
* @image: The image.
|
||||
* @num_vectors: (out): The number of selected vectors in the image.
|
||||
*
|
||||
|
|
|
@ -476,7 +476,7 @@ gimp_item_get_parent (GimpItem *item)
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_item_get_children: (skip)
|
||||
* gimp_item_get_children:
|
||||
* @item: The item.
|
||||
* @num_children: (out): The item's number of children.
|
||||
*
|
||||
|
|
|
@ -54,8 +54,6 @@ HELP
|
|||
|
||||
&std_pdb_misc;
|
||||
|
||||
$skip_gi = 1;
|
||||
|
||||
@outargs = (
|
||||
{ name => 'images', type => 'imagearray',
|
||||
desc => 'The list of images currently open.',
|
||||
|
@ -256,8 +254,6 @@ HELP
|
|||
|
||||
&std_pdb_misc;
|
||||
|
||||
$skip_gi = 1;
|
||||
|
||||
@inargs = (
|
||||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' }
|
||||
|
@ -303,8 +299,6 @@ HELP
|
|||
|
||||
&std_pdb_misc;
|
||||
|
||||
$skip_gi = 1;
|
||||
|
||||
@inargs = (
|
||||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' }
|
||||
|
@ -347,8 +341,6 @@ HELP
|
|||
|
||||
&simon_pdb_misc('2005', '2.4');
|
||||
|
||||
$skip_gi = 1;
|
||||
|
||||
@inargs = (
|
||||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' }
|
||||
|
@ -1842,8 +1834,6 @@ HELP
|
|||
|
||||
&jehan_pdb_misc('2020', '3.0.0');
|
||||
|
||||
$skip_gi = 1;
|
||||
|
||||
@inargs = (
|
||||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' }
|
||||
|
@ -1926,8 +1916,6 @@ HELP
|
|||
|
||||
&jehan_pdb_misc('2022', '3.0.0');
|
||||
|
||||
$skip_gi = 1;
|
||||
|
||||
@inargs = (
|
||||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' }
|
||||
|
@ -2010,8 +1998,6 @@ HELP
|
|||
|
||||
&jehan_pdb_misc('2022', '3.0.0');
|
||||
|
||||
$skip_gi = 1;
|
||||
|
||||
@inargs = (
|
||||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' }
|
||||
|
|
|
@ -400,8 +400,6 @@ HELP
|
|||
|
||||
&mitch_pdb_misc('2010', '2.8');
|
||||
|
||||
$skip_gi = 1;
|
||||
|
||||
@inargs = (
|
||||
{ name => 'item', type => 'item',
|
||||
desc => 'The item' }
|
||||
|
|
|
@ -97,7 +97,7 @@ def export_colorxhtml(procedure, run_mode, image, file, metadata, config, data):
|
|||
characters = aux_file.get_path()
|
||||
|
||||
#For now, work with a single layer
|
||||
layer = image.list_layers()[0]
|
||||
layer = image.get_layers()[0]
|
||||
|
||||
width = layer.get_width()
|
||||
height = layer.get_height()
|
||||
|
|
|
@ -277,7 +277,7 @@ def export_ora(procedure, run_mode, image, file, metadata, config, data):
|
|||
yield layer
|
||||
else:
|
||||
yield layer
|
||||
for sublayer in enumerate_layers(layer.list_children()):
|
||||
for sublayer in enumerate_layers(layer.get_children()):
|
||||
yield sublayer
|
||||
yield NESTED_STACK_END
|
||||
|
||||
|
@ -285,7 +285,7 @@ def export_ora(procedure, run_mode, image, file, metadata, config, data):
|
|||
parent_groups = []
|
||||
i = 0
|
||||
|
||||
layer_stack = image.list_layers()
|
||||
layer_stack = image.get_layers()
|
||||
# Number of top level layers for tracking progress
|
||||
lay_cnt = len(layer_stack)
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ class StringEnum:
|
|||
|
||||
def histogram_export(procedure, img, layers, gio_file,
|
||||
bucket_size, sample_average, output_format):
|
||||
layers = img.list_selected_layers()
|
||||
layers = img.get_selected_layers()
|
||||
layer = layers[0]
|
||||
if sample_average:
|
||||
new_img = img.duplicate()
|
||||
|
|
|
@ -383,7 +383,7 @@ class SelectionToPath:
|
|||
config.set_property('image', self.image)
|
||||
result = proc.run(config)
|
||||
|
||||
self.path = self.image.list_vectors()[0]
|
||||
self.path = self.image.get_vectors()[0]
|
||||
self.stroke_ids = self.path.get_strokes()
|
||||
|
||||
# A path may contain several strokes. If so lets throw away a stroke that
|
||||
|
@ -1871,7 +1871,7 @@ class SpyroWindow():
|
|||
shelf_parameters(self.p)
|
||||
|
||||
if self.p.save_option == SAVE_AS_NEW_LAYER:
|
||||
if self.spyro_layer in self.img.list_layers():
|
||||
if self.spyro_layer in self.img.get_layers():
|
||||
self.img.active_layer = self.spyro_layer
|
||||
|
||||
# If we are in the middle of incremental draw, we want to complete it, and only then to exit.
|
||||
|
@ -1892,7 +1892,7 @@ class SpyroWindow():
|
|||
# If there is an incremental drawing taking place, lets stop it.
|
||||
self.clear_idle_task()
|
||||
|
||||
if self.spyro_layer in self.img.list_layers():
|
||||
if self.spyro_layer in self.img.get_layers():
|
||||
self.img.remove_layer(self.spyro_layer)
|
||||
self.img.active_layer = self.active_layer
|
||||
|
||||
|
@ -1926,7 +1926,7 @@ class SpyroWindow():
|
|||
|
||||
# We want to delete the temporary layer, but as a precaution, lets ask first,
|
||||
# maybe it was already deleted by the user.
|
||||
if self.spyro_layer in self.img.list_layers():
|
||||
if self.spyro_layer in self.img.get_layers():
|
||||
self.img.remove_layer(self.spyro_layer)
|
||||
Gimp.displays_flush()
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class BmpExportTests(GimpExportTest):
|
|||
return None
|
||||
|
||||
def export_bmp(self, img, bmp_exp_name, rle, space, rgb):
|
||||
drw = img.list_layers()
|
||||
drw = img.get_layers()
|
||||
export_file_path = self.output_path + bmp_exp_name
|
||||
|
||||
pdb_proc = Gimp.get_pdb().lookup_procedure(self.file_export)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue