Commit 1d591e95 authored by GMT 1998 Andy Thomas's avatar GMT 1998 Andy Thomas Committed by Andy Thomas

Changed the palette dialog. New functionality. Better previews. Can


Fri Dec 18 23:46:11 GMT 1998 Andy Thomas <alt@picnic.demon.co.uk>

	Changed the palette dialog. New functionality. Better previews.
	Can display larger palettes. Can import palettes from images and from
	gradients. Fixed colour selection so that the hightlighted
	square says in sync on redraws.

	* app/convert.h
	* app/palette.h
	* app/palette.c
	* app/gradient.c
	* app/gradient_select.c
	* app/gimage.c
	* app/gimpimage.c
	* app/gimpimage.h

	New file:-

	* app/palette_entries.h
parent c848afaf
Fri Dec 18 23:46:11 GMT 1998 Andy Thomas <alt@picnic.demon.co.uk>
Changed the palette dialog. New functionality. Better previews.
Can display larger palettes. Can import palettes from images and from
gradients. Fixed colour selection so that the hightlighted
square says in sync on redraws.
* app/convert.h
* app/palette.h
* app/palette.c
* app/gradient.c
* app/gradient_select.c
* app/gimage.c
* app/gimpimage.c
* app/gimpimage.h
New file:-
* app/palette_entries.h
Thu Dec 17 03:50:51 PST 1998 Manish Singh <yosh@gimp.org>
* app/Makefile.am: added some missing files
......
......@@ -20,6 +20,8 @@
#include "procedural_db.h"
#include "gimpimageF.h"
#include "palette_entries.h"
/* convert functions */
void convert_to_rgb (GimpImage *);
void convert_to_grayscale (GimpImage *);
......
......@@ -20,6 +20,8 @@
#include "procedural_db.h"
#include "gimpimageF.h"
#include "palette_entries.h"
/* convert functions */
void convert_to_rgb (GimpImage *);
void convert_to_grayscale (GimpImage *);
......
......@@ -2894,7 +2894,7 @@ gimp_image_composite_bytes (GimpImage *gimage)
return gimp_image_projection_bytes (gimage);
}
static TempBuf *
TempBuf *
gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height)
{
Layer * layer;
......
......@@ -223,5 +223,6 @@ int gimp_image_preview_valid (GimpImage *, ChannelType);
void gimp_image_invalidate_preview (GimpImage *);
void gimp_image_invalidate_previews (void);
TempBuf * gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height);
#endif
......@@ -2894,7 +2894,7 @@ gimp_image_composite_bytes (GimpImage *gimage)
return gimp_image_projection_bytes (gimage);
}
static TempBuf *
TempBuf *
gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height)
{
Layer * layer;
......
......@@ -223,5 +223,6 @@ int gimp_image_preview_valid (GimpImage *, ChannelType);
void gimp_image_invalidate_preview (GimpImage *);
void gimp_image_invalidate_previews (void);
TempBuf * gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height);
#endif
......@@ -2894,7 +2894,7 @@ gimp_image_composite_bytes (GimpImage *gimage)
return gimp_image_projection_bytes (gimage);
}
static TempBuf *
TempBuf *
gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height)
{
Layer * layer;
......
......@@ -223,5 +223,6 @@ int gimp_image_preview_valid (GimpImage *, ChannelType);
void gimp_image_invalidate_preview (GimpImage *);
void gimp_image_invalidate_previews (void);
TempBuf * gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height);
#endif
......@@ -2894,7 +2894,7 @@ gimp_image_composite_bytes (GimpImage *gimage)
return gimp_image_projection_bytes (gimage);
}
static TempBuf *
TempBuf *
gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height)
{
Layer * layer;
......
......@@ -223,5 +223,6 @@ int gimp_image_preview_valid (GimpImage *, ChannelType);
void gimp_image_invalidate_preview (GimpImage *);
void gimp_image_invalidate_previews (void);
TempBuf * gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height);
#endif
......@@ -2894,7 +2894,7 @@ gimp_image_composite_bytes (GimpImage *gimage)
return gimp_image_projection_bytes (gimage);
}
static TempBuf *
TempBuf *
gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height)
{
Layer * layer;
......
......@@ -223,5 +223,6 @@ int gimp_image_preview_valid (GimpImage *, ChannelType);
void gimp_image_invalidate_preview (GimpImage *);
void gimp_image_invalidate_previews (void);
TempBuf * gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height);
#endif
......@@ -2894,7 +2894,7 @@ gimp_image_composite_bytes (GimpImage *gimage)
return gimp_image_projection_bytes (gimage);
}
static TempBuf *
TempBuf *
gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height)
{
Layer * layer;
......
......@@ -223,5 +223,6 @@ int gimp_image_preview_valid (GimpImage *, ChannelType);
void gimp_image_invalidate_preview (GimpImage *);
void gimp_image_invalidate_previews (void);
TempBuf * gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height);
#endif
......@@ -2894,7 +2894,7 @@ gimp_image_composite_bytes (GimpImage *gimage)
return gimp_image_projection_bytes (gimage);
}
static TempBuf *
TempBuf *
gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height)
{
Layer * layer;
......
......@@ -223,5 +223,6 @@ int gimp_image_preview_valid (GimpImage *, ChannelType);
void gimp_image_invalidate_preview (GimpImage *);
void gimp_image_invalidate_previews (void);
TempBuf * gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height);
#endif
......@@ -53,6 +53,8 @@ gimage_new(int width, int height, GimpImageBaseType base_type)
gimp_set_add(image_context, gimage);
indexed_palette_update_image_list ();
palette_import_image_new(gimage);
return gimage;
}
......@@ -107,6 +109,8 @@ gimage_destroy_handler (GimpImage* gimage)
undo_free (gimage);
indexed_palette_update_image_list ();
palette_import_image_destroyed(gimage);
}
static void
......@@ -115,6 +119,8 @@ gimage_rename_handler (GimpImage* gimage)
gdisplays_update_title (gimage);
lc_dialog_update_image_list ();
indexed_palette_update_image_list ();
palette_import_image_renamed(gimage);
}
static void
......
......@@ -20,6 +20,8 @@
#include "procedural_db.h"
#include "gimpimageF.h"
#include "palette_entries.h"
/* convert functions */
void convert_to_rgb (GimpImage *);
void convert_to_grayscale (GimpImage *);
......
......@@ -2894,7 +2894,7 @@ gimp_image_composite_bytes (GimpImage *gimage)
return gimp_image_projection_bytes (gimage);
}
static TempBuf *
TempBuf *
gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height)
{
Layer * layer;
......
......@@ -223,5 +223,6 @@ int gimp_image_preview_valid (GimpImage *, ChannelType);
void gimp_image_invalidate_preview (GimpImage *);
void gimp_image_invalidate_previews (void);
TempBuf * gimp_image_construct_composite_preview (GimpImage *gimage, int width, int height);
#endif
......@@ -80,6 +80,8 @@ static Argument *return_args;
static void grad_select_close_callback (GtkWidget *, gpointer);
static void grad_select_edit_callback (GtkWidget *, gpointer);
static void grad_change_callbacks(GradSelectP gsp, gint closing);
extern void import_palette_grad_update(gradient_t *); /* ALT Hmm... */
static ActionAreaItem action_items[2] =
{
......@@ -253,6 +255,7 @@ sel_update_dialogs(gint row, gradient_t *grad)
if(gradient_select_dialog)
gtk_clist_set_text(GTK_CLIST(gradient_select_dialog->clist),row,1,grad->name);
import_palette_grad_update(grad);
}
static void
......@@ -271,6 +274,7 @@ sel_list_item_update(GtkWidget *widget,
if(gsp == gradient_select_dialog)
{
grad_set_grad_to_name(gsp->grad->name);
import_palette_grad_update(gsp->grad);
}
else
{
......
......@@ -80,6 +80,8 @@ static Argument *return_args;
static void grad_select_close_callback (GtkWidget *, gpointer);
static void grad_select_edit_callback (GtkWidget *, gpointer);
static void grad_change_callbacks(GradSelectP gsp, gint closing);
extern void import_palette_grad_update(gradient_t *); /* ALT Hmm... */
static ActionAreaItem action_items[2] =
{
......@@ -253,6 +255,7 @@ sel_update_dialogs(gint row, gradient_t *grad)
if(gradient_select_dialog)
gtk_clist_set_text(GTK_CLIST(gradient_select_dialog->clist),row,1,grad->name);
import_palette_grad_update(grad);
}
static void
......@@ -271,6 +274,7 @@ sel_list_item_update(GtkWidget *widget,
if(gsp == gradient_select_dialog)
{
grad_set_grad_to_name(gsp->grad->name);
import_palette_grad_update(gsp->grad);
}
else
{
......
This diff is collapsed.
......@@ -40,26 +40,11 @@ void palette_set_background (int, int, int);
void palette_set_active_color (int, int, int, int);
void palette_set_default_colors (void);
void palette_swap_colors (void);
struct _PaletteEntries {
char *name;
char *filename;
GSList *colors;
int n_colors;
int changed;
};
typedef struct _PaletteEntries _PaletteEntries, *PaletteEntriesP;
struct _PaletteEntry {
unsigned char color[3];
char *name;
int position;
};
typedef struct _PaletteEntry _PaletteEntry, *PaletteEntryP;
extern GSList * palette_entries_list;
void palette_init_palettes (int no_data);
void palette_free_palettes (void);
void palette_import_image_new(GimpImage * gimage);
void palette_import_image_destroyed(GimpImage* gimage);
void palette_import_image_renamed(GimpImage* gimage);
/* Procedure definition and marshalling function */
extern ProcRecord palette_get_foreground_proc;
......
This diff is collapsed.
......@@ -40,26 +40,11 @@ void palette_set_background (int, int, int);
void palette_set_active_color (int, int, int, int);
void palette_set_default_colors (void);
void palette_swap_colors (void);
struct _PaletteEntries {
char *name;
char *filename;
GSList *colors;
int n_colors;
int changed;
};
typedef struct _PaletteEntries _PaletteEntries, *PaletteEntriesP;
struct _PaletteEntry {
unsigned char color[3];
char *name;
int position;
};
typedef struct _PaletteEntry _PaletteEntry, *PaletteEntryP;
extern GSList * palette_entries_list;
void palette_init_palettes (int no_data);
void palette_free_palettes (void);
void palette_import_image_new(GimpImage * gimage);
void palette_import_image_destroyed(GimpImage* gimage);
void palette_import_image_renamed(GimpImage* gimage);
/* Procedure definition and marshalling function */
extern ProcRecord palette_get_foreground_proc;
......
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PALETTE_ENTRIES_H__
#define __PALETTE_ENTRIES_H__
#include "gtk/gtk.h"
#include "general.h"
struct _PaletteEntries {
char *name;
char *filename;
GSList *colors;
int n_colors;
int changed;
GdkPixmap *pixmap;
};
typedef struct _PaletteEntries _PaletteEntries, *PaletteEntriesP;
struct _PaletteEntry {
unsigned char color[3];
char *name;
int position;
};
typedef struct _PaletteEntry _PaletteEntry, *PaletteEntryP;
extern GSList * palette_entries_list;
#endif /* __PALETTE_H__ */
This diff is collapsed.
......@@ -40,26 +40,11 @@ void palette_set_background (int, int, int);
void palette_set_active_color (int, int, int, int);
void palette_set_default_colors (void);
void palette_swap_colors (void);
struct _PaletteEntries {
char *name;
char *filename;
GSList *colors;
int n_colors;
int changed;
};
typedef struct _PaletteEntries _PaletteEntries, *PaletteEntriesP;
struct _PaletteEntry {
unsigned char color[3];
char *name;
int position;
};
typedef struct _PaletteEntry _PaletteEntry, *PaletteEntryP;
extern GSList * palette_entries_list;
void palette_init_palettes (int no_data);
void palette_free_palettes (void);
void palette_import_image_new(GimpImage * gimage);
void palette_import_image_destroyed(GimpImage* gimage);
void palette_import_image_renamed(GimpImage* gimage);
/* Procedure definition and marshalling function */
extern ProcRecord palette_get_foreground_proc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment