added a message explaining that GIMP cannot convert to a palette with more

2004-03-08  Sven Neumann  <sven@gimp.org>

	* app/gui/convert-dialog.c (indexed_palette_select_palette): added
	a message explaining that GIMP cannot convert to a palette with
	more than 256 colors. Should actually not list palettes that don't
	match this criteria, but we'll leave that change for later (see
	bug #136574).
This commit is contained in:
Sven Neumann 2004-03-08 19:23:05 +00:00 committed by Sven Neumann
parent 1209e76f16
commit 1ba8d152f0
3 changed files with 26 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2004-03-08 Sven Neumann <sven@gimp.org>
* app/gui/convert-dialog.c (indexed_palette_select_palette): added
a message explaining that GIMP cannot convert to a palette with
more than 256 colors. Should actually not list palettes that don't
match this criteria, but we'll leave that change for later (see
bug #136574).
2004-03-08 Manish Singh <yosh@gimp.org>
* app/plug-in/plug-in.h: Use GPid with newer glib so that we work

View File

@ -490,12 +490,19 @@ indexed_palette_select_palette (GimpContext *context,
GimpPalette *palette,
IndexedDialog *dialog)
{
if (palette && palette->n_colors <= 256)
if (! palette)
return;
if (palette->n_colors > 256)
{
g_message (_("Cannot convert to a palette with more than 256 colors."));
}
else
{
theCustomPalette = palette;
gtk_label_set_text (GTK_LABEL (GTK_BIN (dialog->custom_palette_button)->child),
GIMP_OBJECT (theCustomPalette)->name);
gimp_object_get_name (GIMP_OBJECT (palette)));
}
}

View File

@ -490,12 +490,19 @@ indexed_palette_select_palette (GimpContext *context,
GimpPalette *palette,
IndexedDialog *dialog)
{
if (palette && palette->n_colors <= 256)
if (! palette)
return;
if (palette->n_colors > 256)
{
g_message (_("Cannot convert to a palette with more than 256 colors."));
}
else
{
theCustomPalette = palette;
gtk_label_set_text (GTK_LABEL (GTK_BIN (dialog->custom_palette_button)->child),
GIMP_OBJECT (theCustomPalette)->name);
gimp_object_get_name (GIMP_OBJECT (palette)));
}
}