python, libgimp: rename gimp_palette_entry_[gs]et_*()

Followup to 151cb9c40c
to make the palette offset and sort scripts work again.
This commit is contained in:
Anders Jonsson 2025-01-29 21:02:22 +01:00
parent 29c9747222
commit 255e942087
3 changed files with 17 additions and 17 deletions

View file

@ -110,16 +110,16 @@ class PaletteOffset (Gimp.PlugIn):
num_colors = palette.get_color_count()
tmp_entry_array = []
for i in range (num_colors):
tmp_entry_array.append ((palette.entry_get_name(i)[1],
palette.entry_get_color(i)))
tmp_entry_array.append ((palette.get_entry_name(i)[1],
palette.get_entry_color(i)))
for i in range (num_colors):
target_index = i + amount
if target_index >= num_colors:
target_index -= num_colors
elif target_index < 0:
target_index += num_colors
palette.entry_set_name(target_index, tmp_entry_array[i][0])
palette.entry_set_color(target_index, tmp_entry_array[i][1])
palette.set_entry_name(target_index, tmp_entry_array[i][0])
palette.set_entry_color(target_index, tmp_entry_array[i][1])
retval = procedure.new_return_values(Gimp.PDBStatusType.SUCCESS, GLib.Error())
value = GObject.Value(Gimp.Palette, palette)