app: remove the int return value from gimp_palette_mru_add()

It's not needed any longer and was confusing anyway.
This commit is contained in:
Michael Natterer 2014-11-29 13:38:12 +01:00
parent c0365c04e7
commit bf6e396f28
2 changed files with 5 additions and 14 deletions

View File

@ -185,22 +185,19 @@ gimp_palette_mru_save (GimpPaletteMru *mru,
gimp_config_writer_finish (writer, "end of colorrc", NULL); gimp_config_writer_finish (writer, "end of colorrc", NULL);
} }
gint void
gimp_palette_mru_add (GimpPaletteMru *mru, gimp_palette_mru_add (GimpPaletteMru *mru,
const GimpRGB *color) const GimpRGB *color)
{ {
GimpPalette *palette; GimpPalette *palette;
GimpPaletteEntry *found = NULL; GimpPaletteEntry *found = NULL;
GList *list; GList *list;
gint max_changed;
g_return_val_if_fail (GIMP_IS_PALETTE_MRU (mru), 0); g_return_if_fail (GIMP_IS_PALETTE_MRU (mru));
g_return_val_if_fail (color != NULL, 0); g_return_if_fail (color != NULL);
palette = GIMP_PALETTE (mru); palette = GIMP_PALETTE (mru);
max_changed = gimp_palette_get_n_colors (palette);
/* is the added color already there? */ /* is the added color already there? */
for (list = gimp_palette_get_colors (palette); for (list = gimp_palette_get_colors (palette);
list; list;
@ -244,13 +241,7 @@ gimp_palette_mru_add (GimpPaletteMru *mru,
doit: doit:
if (found) if (found)
{ gimp_palette_delete_entry (palette, found);
max_changed = found->position;
gimp_palette_delete_entry (palette, found);
}
found = gimp_palette_add_entry (palette, 0, _("History Color"), color); found = gimp_palette_add_entry (palette, 0, _("History Color"), color);
return max_changed;
} }

View File

@ -55,7 +55,7 @@ void gimp_palette_mru_load (GimpPaletteMru *mru,
void gimp_palette_mru_save (GimpPaletteMru *mru, void gimp_palette_mru_save (GimpPaletteMru *mru,
GFile *file); GFile *file);
gint gimp_palette_mru_add (GimpPaletteMru *mru, void gimp_palette_mru_add (GimpPaletteMru *mru,
const GimpRGB *color); const GimpRGB *color);