mirror of https://github.com/GNOME/gimp.git
parent
0a3253096d
commit
731f5219a3
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
Wed Feb 4 19:04:35 1998 Scott Goehring <scott@poverty.bloomington.in.us>
|
||||||
|
|
||||||
|
* channel.c
|
||||||
|
* channel.h
|
||||||
|
* disp_callbacks.c
|
||||||
|
* gimage.c
|
||||||
|
* layer.c
|
||||||
|
* layer.h
|
||||||
|
* layers_dialog.c
|
||||||
|
* undo.c: More GTK refcount-related changes. (We're not there
|
||||||
|
yet, but we're getting closer.)
|
||||||
|
|
||||||
Tue Feb 3 17:52:34 1998 Scott Goehring <scott@poverty.bloomington.in.us>
|
Tue Feb 3 17:52:34 1998 Scott Goehring <scott@poverty.bloomington.in.us>
|
||||||
|
|
||||||
* app/interface.[ch] app/app_procs.[ch]: Changes to deal with new
|
* app/interface.[ch] app/app_procs.[ch]: Changes to deal with new
|
||||||
|
|
|
@ -32,16 +32,19 @@
|
||||||
|
|
||||||
#include "channel_pvt.h"
|
#include "channel_pvt.h"
|
||||||
|
|
||||||
|
/*
|
||||||
enum {
|
enum {
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
static void gimp_channel_class_init (GimpChannelClass *klass);
|
static void gimp_channel_class_init (GimpChannelClass *klass);
|
||||||
static void gimp_channel_init (GimpChannel *channel);
|
static void gimp_channel_init (GimpChannel *channel);
|
||||||
static void gimp_channel_destroy (GtkObject *object);
|
static void gimp_channel_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
/*
|
||||||
static gint channel_signals[LAST_SIGNAL] = { 0 };
|
static gint channel_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
*/
|
||||||
|
|
||||||
static GimpDrawableClass *parent_class = NULL;
|
static GimpDrawableClass *parent_class = NULL;
|
||||||
|
|
||||||
|
@ -77,7 +80,9 @@ gimp_channel_class_init (GimpChannelClass *class)
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass*) class;
|
||||||
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
||||||
|
|
||||||
|
/*
|
||||||
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
||||||
|
*/
|
||||||
|
|
||||||
object_class->destroy = gimp_channel_destroy;
|
object_class->destroy = gimp_channel_destroy;
|
||||||
}
|
}
|
||||||
|
@ -143,6 +148,21 @@ channel_new (int gimage_ID, int width, int height, char *name, int opacity,
|
||||||
return channel;
|
return channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Channel *
|
||||||
|
channel_ref (Channel *channel)
|
||||||
|
{
|
||||||
|
gtk_object_ref (GTK_OBJECT (channel));
|
||||||
|
gtk_object_sink (GTK_OBJECT (channel));
|
||||||
|
return channel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
channel_unref (Channel *channel)
|
||||||
|
{
|
||||||
|
gtk_object_unref (GTK_OBJECT (channel));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Channel *
|
Channel *
|
||||||
channel_copy (Channel *channel)
|
channel_copy (Channel *channel)
|
||||||
|
|
|
@ -73,6 +73,9 @@ struct _mask_undo
|
||||||
|
|
||||||
Channel * channel_new (int, int, int, char *, int, unsigned char *);
|
Channel * channel_new (int, int, int, char *, int, unsigned char *);
|
||||||
Channel * channel_copy (Channel *);
|
Channel * channel_copy (Channel *);
|
||||||
|
Channel * channel_ref (Channel *);
|
||||||
|
void channel_unref (Channel *);
|
||||||
|
|
||||||
Channel * channel_get_ID (int);
|
Channel * channel_get_ID (int);
|
||||||
void channel_delete (Channel *);
|
void channel_delete (Channel *);
|
||||||
void channel_scale (Channel *, int, int);
|
void channel_scale (Channel *, int, int);
|
||||||
|
|
|
@ -32,16 +32,19 @@
|
||||||
|
|
||||||
#include "channel_pvt.h"
|
#include "channel_pvt.h"
|
||||||
|
|
||||||
|
/*
|
||||||
enum {
|
enum {
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
static void gimp_channel_class_init (GimpChannelClass *klass);
|
static void gimp_channel_class_init (GimpChannelClass *klass);
|
||||||
static void gimp_channel_init (GimpChannel *channel);
|
static void gimp_channel_init (GimpChannel *channel);
|
||||||
static void gimp_channel_destroy (GtkObject *object);
|
static void gimp_channel_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
/*
|
||||||
static gint channel_signals[LAST_SIGNAL] = { 0 };
|
static gint channel_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
*/
|
||||||
|
|
||||||
static GimpDrawableClass *parent_class = NULL;
|
static GimpDrawableClass *parent_class = NULL;
|
||||||
|
|
||||||
|
@ -77,7 +80,9 @@ gimp_channel_class_init (GimpChannelClass *class)
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass*) class;
|
||||||
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
||||||
|
|
||||||
|
/*
|
||||||
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
||||||
|
*/
|
||||||
|
|
||||||
object_class->destroy = gimp_channel_destroy;
|
object_class->destroy = gimp_channel_destroy;
|
||||||
}
|
}
|
||||||
|
@ -143,6 +148,21 @@ channel_new (int gimage_ID, int width, int height, char *name, int opacity,
|
||||||
return channel;
|
return channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Channel *
|
||||||
|
channel_ref (Channel *channel)
|
||||||
|
{
|
||||||
|
gtk_object_ref (GTK_OBJECT (channel));
|
||||||
|
gtk_object_sink (GTK_OBJECT (channel));
|
||||||
|
return channel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
channel_unref (Channel *channel)
|
||||||
|
{
|
||||||
|
gtk_object_unref (GTK_OBJECT (channel));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Channel *
|
Channel *
|
||||||
channel_copy (Channel *channel)
|
channel_copy (Channel *channel)
|
||||||
|
|
|
@ -73,6 +73,9 @@ struct _mask_undo
|
||||||
|
|
||||||
Channel * channel_new (int, int, int, char *, int, unsigned char *);
|
Channel * channel_new (int, int, int, char *, int, unsigned char *);
|
||||||
Channel * channel_copy (Channel *);
|
Channel * channel_copy (Channel *);
|
||||||
|
Channel * channel_ref (Channel *);
|
||||||
|
void channel_unref (Channel *);
|
||||||
|
|
||||||
Channel * channel_get_ID (int);
|
Channel * channel_get_ID (int);
|
||||||
void channel_delete (Channel *);
|
void channel_delete (Channel *);
|
||||||
void channel_scale (Channel *, int, int);
|
void channel_scale (Channel *, int, int);
|
||||||
|
|
|
@ -32,16 +32,19 @@
|
||||||
|
|
||||||
#include "channel_pvt.h"
|
#include "channel_pvt.h"
|
||||||
|
|
||||||
|
/*
|
||||||
enum {
|
enum {
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
static void gimp_channel_class_init (GimpChannelClass *klass);
|
static void gimp_channel_class_init (GimpChannelClass *klass);
|
||||||
static void gimp_channel_init (GimpChannel *channel);
|
static void gimp_channel_init (GimpChannel *channel);
|
||||||
static void gimp_channel_destroy (GtkObject *object);
|
static void gimp_channel_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
/*
|
||||||
static gint channel_signals[LAST_SIGNAL] = { 0 };
|
static gint channel_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
*/
|
||||||
|
|
||||||
static GimpDrawableClass *parent_class = NULL;
|
static GimpDrawableClass *parent_class = NULL;
|
||||||
|
|
||||||
|
@ -77,7 +80,9 @@ gimp_channel_class_init (GimpChannelClass *class)
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass*) class;
|
||||||
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
||||||
|
|
||||||
|
/*
|
||||||
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
||||||
|
*/
|
||||||
|
|
||||||
object_class->destroy = gimp_channel_destroy;
|
object_class->destroy = gimp_channel_destroy;
|
||||||
}
|
}
|
||||||
|
@ -143,6 +148,21 @@ channel_new (int gimage_ID, int width, int height, char *name, int opacity,
|
||||||
return channel;
|
return channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Channel *
|
||||||
|
channel_ref (Channel *channel)
|
||||||
|
{
|
||||||
|
gtk_object_ref (GTK_OBJECT (channel));
|
||||||
|
gtk_object_sink (GTK_OBJECT (channel));
|
||||||
|
return channel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
channel_unref (Channel *channel)
|
||||||
|
{
|
||||||
|
gtk_object_unref (GTK_OBJECT (channel));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Channel *
|
Channel *
|
||||||
channel_copy (Channel *channel)
|
channel_copy (Channel *channel)
|
||||||
|
|
|
@ -73,6 +73,9 @@ struct _mask_undo
|
||||||
|
|
||||||
Channel * channel_new (int, int, int, char *, int, unsigned char *);
|
Channel * channel_new (int, int, int, char *, int, unsigned char *);
|
||||||
Channel * channel_copy (Channel *);
|
Channel * channel_copy (Channel *);
|
||||||
|
Channel * channel_ref (Channel *);
|
||||||
|
void channel_unref (Channel *);
|
||||||
|
|
||||||
Channel * channel_get_ID (int);
|
Channel * channel_get_ID (int);
|
||||||
void channel_delete (Channel *);
|
void channel_delete (Channel *);
|
||||||
void channel_scale (Channel *, int, int);
|
void channel_scale (Channel *, int, int);
|
||||||
|
|
|
@ -1033,7 +1033,7 @@ undo_push_layer (GImage *gimage,
|
||||||
{
|
{
|
||||||
/* if this is a remove layer, delete the layer */
|
/* if this is a remove layer, delete the layer */
|
||||||
if (lu->undo_type == 1)
|
if (lu->undo_type == 1)
|
||||||
layer_delete (lu->layer);
|
layer_unref (lu->layer);
|
||||||
g_free (lu);
|
g_free (lu);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1124,7 +1124,7 @@ undo_free_layer (int state,
|
||||||
*/
|
*/
|
||||||
if ((state == REDO && lu->undo_type == 0) ||
|
if ((state == REDO && lu->undo_type == 0) ||
|
||||||
(state == UNDO && lu->undo_type == 1))
|
(state == UNDO && lu->undo_type == 1))
|
||||||
layer_delete (lu->layer);
|
layer_unref (lu->layer);
|
||||||
|
|
||||||
g_free (lu);
|
g_free (lu);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,10 @@ static void gimp_layer_mask_class_init (GimpLayerMaskClass *klass);
|
||||||
static void gimp_layer_mask_init (GimpLayerMask *layermask);
|
static void gimp_layer_mask_init (GimpLayerMask *layermask);
|
||||||
static void gimp_layer_mask_destroy (GtkObject *object);
|
static void gimp_layer_mask_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
/*
|
||||||
static gint layer_signals[LAST_SIGNAL] = { 0 };
|
static gint layer_signals[LAST_SIGNAL] = { 0 };
|
||||||
static gint layer_mask_signals[LAST_SIGNAL] = { 0 };
|
static gint layer_mask_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
*/
|
||||||
|
|
||||||
static GimpDrawableClass *layer_parent_class = NULL;
|
static GimpDrawableClass *layer_parent_class = NULL;
|
||||||
static GimpChannelClass *layer_mask_parent_class = NULL;
|
static GimpChannelClass *layer_mask_parent_class = NULL;
|
||||||
|
@ -93,7 +95,9 @@ gimp_layer_class_init (GimpLayerClass *class)
|
||||||
|
|
||||||
layer_parent_class = gtk_type_class (gimp_drawable_get_type ());
|
layer_parent_class = gtk_type_class (gimp_drawable_get_type ());
|
||||||
|
|
||||||
|
/*
|
||||||
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
||||||
|
*/
|
||||||
|
|
||||||
object_class->destroy = gimp_layer_destroy;
|
object_class->destroy = gimp_layer_destroy;
|
||||||
drawable_class->invalidate_preview = layer_invalidate_preview;
|
drawable_class->invalidate_preview = layer_invalidate_preview;
|
||||||
|
@ -136,7 +140,9 @@ gimp_layer_mask_class_init (GimpLayerMaskClass *class)
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass*) class;
|
||||||
layer_mask_parent_class = gtk_type_class (gimp_channel_get_type ());
|
layer_mask_parent_class = gtk_type_class (gimp_channel_get_type ());
|
||||||
|
|
||||||
|
/*
|
||||||
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
||||||
|
*/
|
||||||
|
|
||||||
object_class->destroy = gimp_layer_mask_destroy;
|
object_class->destroy = gimp_layer_mask_destroy;
|
||||||
}
|
}
|
||||||
|
@ -264,6 +270,22 @@ layer_new (gimage_ID, width, height, type, name, opacity, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Layer *
|
||||||
|
layer_ref (Layer *layer)
|
||||||
|
{
|
||||||
|
gtk_object_ref (GTK_OBJECT (layer));
|
||||||
|
gtk_object_sink (GTK_OBJECT (layer));
|
||||||
|
return layer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
layer_unref (Layer *layer)
|
||||||
|
{
|
||||||
|
gtk_object_unref (GTK_OBJECT (layer));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Layer *
|
Layer *
|
||||||
layer_copy (layer, add_alpha)
|
layer_copy (layer, add_alpha)
|
||||||
Layer * layer;
|
Layer * layer;
|
||||||
|
|
|
@ -96,6 +96,9 @@ struct _fs_to_layer_undo
|
||||||
|
|
||||||
Layer * layer_new (int, int, int, int, char *, int, int);
|
Layer * layer_new (int, int, int, int, char *, int, int);
|
||||||
Layer * layer_copy (Layer *, int);
|
Layer * layer_copy (Layer *, int);
|
||||||
|
Layer * layer_ref (Layer *);
|
||||||
|
void layer_unref (Layer *);
|
||||||
|
|
||||||
Layer * layer_from_tiles (void *, GimpDrawable *, TileManager *, char *, int, int);
|
Layer * layer_from_tiles (void *, GimpDrawable *, TileManager *, char *, int, int);
|
||||||
LayerMask * layer_add_mask (Layer *, LayerMask *);
|
LayerMask * layer_add_mask (Layer *, LayerMask *);
|
||||||
LayerMask * layer_create_mask (Layer *, AddMaskType);
|
LayerMask * layer_create_mask (Layer *, AddMaskType);
|
||||||
|
|
|
@ -86,6 +86,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
||||||
|
|
||||||
gdisp = (GDisplay *) gtk_object_get_user_data (GTK_OBJECT (canvas));
|
gdisp = (GDisplay *) gtk_object_get_user_data (GTK_OBJECT (canvas));
|
||||||
|
|
||||||
|
if (!canvas->window)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* If this is the first event... */
|
/* If this is the first event... */
|
||||||
if (!gdisp->select)
|
if (!gdisp->select)
|
||||||
{
|
{
|
||||||
|
|
|
@ -86,6 +86,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
||||||
|
|
||||||
gdisp = (GDisplay *) gtk_object_get_user_data (GTK_OBJECT (canvas));
|
gdisp = (GDisplay *) gtk_object_get_user_data (GTK_OBJECT (canvas));
|
||||||
|
|
||||||
|
if (!canvas->window)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* If this is the first event... */
|
/* If this is the first event... */
|
||||||
if (!gdisp->select)
|
if (!gdisp->select)
|
||||||
{
|
{
|
||||||
|
|
|
@ -86,6 +86,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
||||||
|
|
||||||
gdisp = (GDisplay *) gtk_object_get_user_data (GTK_OBJECT (canvas));
|
gdisp = (GDisplay *) gtk_object_get_user_data (GTK_OBJECT (canvas));
|
||||||
|
|
||||||
|
if (!canvas->window)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* If this is the first event... */
|
/* If this is the first event... */
|
||||||
if (!gdisp->select)
|
if (!gdisp->select)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2147,10 +2147,10 @@ gimage_add_layer (GImage *gimage, Layer *float_layer, int position)
|
||||||
*/
|
*/
|
||||||
if (gimage_floating_sel (gimage) && (gimage->floating_sel != float_layer) && position == 0)
|
if (gimage_floating_sel (gimage) && (gimage->floating_sel != float_layer) && position == 0)
|
||||||
position = 1;
|
position = 1;
|
||||||
gimage->layers = g_slist_insert (gimage->layers, float_layer, position);
|
gimage->layers = g_slist_insert (gimage->layers, layer_ref (float_layer), position);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
gimage->layers = g_slist_prepend (gimage->layers, float_layer);
|
gimage->layers = g_slist_prepend (gimage->layers, layer_ref (float_layer));
|
||||||
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, float_layer);
|
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, float_layer);
|
||||||
|
|
||||||
/* notify the layers dialog of the currently active layer */
|
/* notify the layers dialog of the currently active layer */
|
||||||
|
@ -2431,7 +2431,7 @@ gimage_add_channel (GImage *gimage, Channel *channel, int position)
|
||||||
undo_push_channel (gimage, cu);
|
undo_push_channel (gimage, cu);
|
||||||
|
|
||||||
/* add the channel to the list */
|
/* add the channel to the list */
|
||||||
gimage->channels = g_slist_prepend (gimage->channels, channel);
|
gimage->channels = g_slist_prepend (gimage->channels, channel_ref (channel));
|
||||||
|
|
||||||
/* notify this gimage of the currently active channel */
|
/* notify this gimage of the currently active channel */
|
||||||
gimage_set_active_channel (gimage, channel);
|
gimage_set_active_channel (gimage, channel);
|
||||||
|
|
|
@ -32,16 +32,19 @@
|
||||||
|
|
||||||
#include "channel_pvt.h"
|
#include "channel_pvt.h"
|
||||||
|
|
||||||
|
/*
|
||||||
enum {
|
enum {
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
static void gimp_channel_class_init (GimpChannelClass *klass);
|
static void gimp_channel_class_init (GimpChannelClass *klass);
|
||||||
static void gimp_channel_init (GimpChannel *channel);
|
static void gimp_channel_init (GimpChannel *channel);
|
||||||
static void gimp_channel_destroy (GtkObject *object);
|
static void gimp_channel_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
/*
|
||||||
static gint channel_signals[LAST_SIGNAL] = { 0 };
|
static gint channel_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
*/
|
||||||
|
|
||||||
static GimpDrawableClass *parent_class = NULL;
|
static GimpDrawableClass *parent_class = NULL;
|
||||||
|
|
||||||
|
@ -77,7 +80,9 @@ gimp_channel_class_init (GimpChannelClass *class)
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass*) class;
|
||||||
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
||||||
|
|
||||||
|
/*
|
||||||
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
||||||
|
*/
|
||||||
|
|
||||||
object_class->destroy = gimp_channel_destroy;
|
object_class->destroy = gimp_channel_destroy;
|
||||||
}
|
}
|
||||||
|
@ -143,6 +148,21 @@ channel_new (int gimage_ID, int width, int height, char *name, int opacity,
|
||||||
return channel;
|
return channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Channel *
|
||||||
|
channel_ref (Channel *channel)
|
||||||
|
{
|
||||||
|
gtk_object_ref (GTK_OBJECT (channel));
|
||||||
|
gtk_object_sink (GTK_OBJECT (channel));
|
||||||
|
return channel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
channel_unref (Channel *channel)
|
||||||
|
{
|
||||||
|
gtk_object_unref (GTK_OBJECT (channel));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Channel *
|
Channel *
|
||||||
channel_copy (Channel *channel)
|
channel_copy (Channel *channel)
|
||||||
|
|
|
@ -73,6 +73,9 @@ struct _mask_undo
|
||||||
|
|
||||||
Channel * channel_new (int, int, int, char *, int, unsigned char *);
|
Channel * channel_new (int, int, int, char *, int, unsigned char *);
|
||||||
Channel * channel_copy (Channel *);
|
Channel * channel_copy (Channel *);
|
||||||
|
Channel * channel_ref (Channel *);
|
||||||
|
void channel_unref (Channel *);
|
||||||
|
|
||||||
Channel * channel_get_ID (int);
|
Channel * channel_get_ID (int);
|
||||||
void channel_delete (Channel *);
|
void channel_delete (Channel *);
|
||||||
void channel_scale (Channel *, int, int);
|
void channel_scale (Channel *, int, int);
|
||||||
|
|
|
@ -52,8 +52,10 @@ static void gimp_layer_mask_class_init (GimpLayerMaskClass *klass);
|
||||||
static void gimp_layer_mask_init (GimpLayerMask *layermask);
|
static void gimp_layer_mask_init (GimpLayerMask *layermask);
|
||||||
static void gimp_layer_mask_destroy (GtkObject *object);
|
static void gimp_layer_mask_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
/*
|
||||||
static gint layer_signals[LAST_SIGNAL] = { 0 };
|
static gint layer_signals[LAST_SIGNAL] = { 0 };
|
||||||
static gint layer_mask_signals[LAST_SIGNAL] = { 0 };
|
static gint layer_mask_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
*/
|
||||||
|
|
||||||
static GimpDrawableClass *layer_parent_class = NULL;
|
static GimpDrawableClass *layer_parent_class = NULL;
|
||||||
static GimpChannelClass *layer_mask_parent_class = NULL;
|
static GimpChannelClass *layer_mask_parent_class = NULL;
|
||||||
|
@ -93,7 +95,9 @@ gimp_layer_class_init (GimpLayerClass *class)
|
||||||
|
|
||||||
layer_parent_class = gtk_type_class (gimp_drawable_get_type ());
|
layer_parent_class = gtk_type_class (gimp_drawable_get_type ());
|
||||||
|
|
||||||
|
/*
|
||||||
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
||||||
|
*/
|
||||||
|
|
||||||
object_class->destroy = gimp_layer_destroy;
|
object_class->destroy = gimp_layer_destroy;
|
||||||
drawable_class->invalidate_preview = layer_invalidate_preview;
|
drawable_class->invalidate_preview = layer_invalidate_preview;
|
||||||
|
@ -136,7 +140,9 @@ gimp_layer_mask_class_init (GimpLayerMaskClass *class)
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass*) class;
|
||||||
layer_mask_parent_class = gtk_type_class (gimp_channel_get_type ());
|
layer_mask_parent_class = gtk_type_class (gimp_channel_get_type ());
|
||||||
|
|
||||||
|
/*
|
||||||
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
||||||
|
*/
|
||||||
|
|
||||||
object_class->destroy = gimp_layer_mask_destroy;
|
object_class->destroy = gimp_layer_mask_destroy;
|
||||||
}
|
}
|
||||||
|
@ -264,6 +270,22 @@ layer_new (gimage_ID, width, height, type, name, opacity, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Layer *
|
||||||
|
layer_ref (Layer *layer)
|
||||||
|
{
|
||||||
|
gtk_object_ref (GTK_OBJECT (layer));
|
||||||
|
gtk_object_sink (GTK_OBJECT (layer));
|
||||||
|
return layer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
layer_unref (Layer *layer)
|
||||||
|
{
|
||||||
|
gtk_object_unref (GTK_OBJECT (layer));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Layer *
|
Layer *
|
||||||
layer_copy (layer, add_alpha)
|
layer_copy (layer, add_alpha)
|
||||||
Layer * layer;
|
Layer * layer;
|
||||||
|
|
|
@ -96,6 +96,9 @@ struct _fs_to_layer_undo
|
||||||
|
|
||||||
Layer * layer_new (int, int, int, int, char *, int, int);
|
Layer * layer_new (int, int, int, int, char *, int, int);
|
||||||
Layer * layer_copy (Layer *, int);
|
Layer * layer_copy (Layer *, int);
|
||||||
|
Layer * layer_ref (Layer *);
|
||||||
|
void layer_unref (Layer *);
|
||||||
|
|
||||||
Layer * layer_from_tiles (void *, GimpDrawable *, TileManager *, char *, int, int);
|
Layer * layer_from_tiles (void *, GimpDrawable *, TileManager *, char *, int, int);
|
||||||
LayerMask * layer_add_mask (Layer *, LayerMask *);
|
LayerMask * layer_add_mask (Layer *, LayerMask *);
|
||||||
LayerMask * layer_create_mask (Layer *, AddMaskType);
|
LayerMask * layer_create_mask (Layer *, AddMaskType);
|
||||||
|
|
|
@ -272,6 +272,7 @@ lc_dialog_create (int gimage_id)
|
||||||
if (lc_shell == NULL)
|
if (lc_shell == NULL)
|
||||||
{
|
{
|
||||||
lc_shell = gtk_dialog_new ();
|
lc_shell = gtk_dialog_new ();
|
||||||
|
gtk_widget_ref (lc_shell);
|
||||||
|
|
||||||
gtk_window_set_title (GTK_WINDOW (lc_shell), "Layers & Channels");
|
gtk_window_set_title (GTK_WINDOW (lc_shell), "Layers & Channels");
|
||||||
gtk_window_set_wmclass (GTK_WINDOW (lc_shell), "layers_and_channels", "Gimp");
|
gtk_window_set_wmclass (GTK_WINDOW (lc_shell), "layers_and_channels", "Gimp");
|
||||||
|
@ -371,7 +372,7 @@ lc_dialog_update_image_list ()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gtk_option_menu_remove_menu (GTK_OPTION_MENU (image_option_menu));
|
gtk_option_menu_remove_menu (GTK_OPTION_MENU (image_option_menu));
|
||||||
gtk_widget_destroy (image_menu);
|
/* gtk_widget_destroy (image_menu); */
|
||||||
|
|
||||||
default_id = layersD->gimage_id;
|
default_id = layersD->gimage_id;
|
||||||
layersD->gimage_id = -1; /* ??? */
|
layersD->gimage_id = -1; /* ??? */
|
||||||
|
@ -412,6 +413,8 @@ lc_dialog_free ()
|
||||||
channels_dialog_free ();
|
channels_dialog_free ();
|
||||||
|
|
||||||
gtk_widget_destroy (lc_shell);
|
gtk_widget_destroy (lc_shell);
|
||||||
|
gtk_widget_unref (lc_shell);
|
||||||
|
|
||||||
lc_shell = NULL;
|
lc_shell = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
22
app/layer.c
22
app/layer.c
|
@ -52,8 +52,10 @@ static void gimp_layer_mask_class_init (GimpLayerMaskClass *klass);
|
||||||
static void gimp_layer_mask_init (GimpLayerMask *layermask);
|
static void gimp_layer_mask_init (GimpLayerMask *layermask);
|
||||||
static void gimp_layer_mask_destroy (GtkObject *object);
|
static void gimp_layer_mask_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
/*
|
||||||
static gint layer_signals[LAST_SIGNAL] = { 0 };
|
static gint layer_signals[LAST_SIGNAL] = { 0 };
|
||||||
static gint layer_mask_signals[LAST_SIGNAL] = { 0 };
|
static gint layer_mask_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
*/
|
||||||
|
|
||||||
static GimpDrawableClass *layer_parent_class = NULL;
|
static GimpDrawableClass *layer_parent_class = NULL;
|
||||||
static GimpChannelClass *layer_mask_parent_class = NULL;
|
static GimpChannelClass *layer_mask_parent_class = NULL;
|
||||||
|
@ -93,7 +95,9 @@ gimp_layer_class_init (GimpLayerClass *class)
|
||||||
|
|
||||||
layer_parent_class = gtk_type_class (gimp_drawable_get_type ());
|
layer_parent_class = gtk_type_class (gimp_drawable_get_type ());
|
||||||
|
|
||||||
|
/*
|
||||||
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
||||||
|
*/
|
||||||
|
|
||||||
object_class->destroy = gimp_layer_destroy;
|
object_class->destroy = gimp_layer_destroy;
|
||||||
drawable_class->invalidate_preview = layer_invalidate_preview;
|
drawable_class->invalidate_preview = layer_invalidate_preview;
|
||||||
|
@ -136,7 +140,9 @@ gimp_layer_mask_class_init (GimpLayerMaskClass *class)
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass*) class;
|
||||||
layer_mask_parent_class = gtk_type_class (gimp_channel_get_type ());
|
layer_mask_parent_class = gtk_type_class (gimp_channel_get_type ());
|
||||||
|
|
||||||
|
/*
|
||||||
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
||||||
|
*/
|
||||||
|
|
||||||
object_class->destroy = gimp_layer_mask_destroy;
|
object_class->destroy = gimp_layer_mask_destroy;
|
||||||
}
|
}
|
||||||
|
@ -264,6 +270,22 @@ layer_new (gimage_ID, width, height, type, name, opacity, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Layer *
|
||||||
|
layer_ref (Layer *layer)
|
||||||
|
{
|
||||||
|
gtk_object_ref (GTK_OBJECT (layer));
|
||||||
|
gtk_object_sink (GTK_OBJECT (layer));
|
||||||
|
return layer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
layer_unref (Layer *layer)
|
||||||
|
{
|
||||||
|
gtk_object_unref (GTK_OBJECT (layer));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Layer *
|
Layer *
|
||||||
layer_copy (layer, add_alpha)
|
layer_copy (layer, add_alpha)
|
||||||
Layer * layer;
|
Layer * layer;
|
||||||
|
|
|
@ -96,6 +96,9 @@ struct _fs_to_layer_undo
|
||||||
|
|
||||||
Layer * layer_new (int, int, int, int, char *, int, int);
|
Layer * layer_new (int, int, int, int, char *, int, int);
|
||||||
Layer * layer_copy (Layer *, int);
|
Layer * layer_copy (Layer *, int);
|
||||||
|
Layer * layer_ref (Layer *);
|
||||||
|
void layer_unref (Layer *);
|
||||||
|
|
||||||
Layer * layer_from_tiles (void *, GimpDrawable *, TileManager *, char *, int, int);
|
Layer * layer_from_tiles (void *, GimpDrawable *, TileManager *, char *, int, int);
|
||||||
LayerMask * layer_add_mask (Layer *, LayerMask *);
|
LayerMask * layer_add_mask (Layer *, LayerMask *);
|
||||||
LayerMask * layer_create_mask (Layer *, AddMaskType);
|
LayerMask * layer_create_mask (Layer *, AddMaskType);
|
||||||
|
|
|
@ -272,6 +272,7 @@ lc_dialog_create (int gimage_id)
|
||||||
if (lc_shell == NULL)
|
if (lc_shell == NULL)
|
||||||
{
|
{
|
||||||
lc_shell = gtk_dialog_new ();
|
lc_shell = gtk_dialog_new ();
|
||||||
|
gtk_widget_ref (lc_shell);
|
||||||
|
|
||||||
gtk_window_set_title (GTK_WINDOW (lc_shell), "Layers & Channels");
|
gtk_window_set_title (GTK_WINDOW (lc_shell), "Layers & Channels");
|
||||||
gtk_window_set_wmclass (GTK_WINDOW (lc_shell), "layers_and_channels", "Gimp");
|
gtk_window_set_wmclass (GTK_WINDOW (lc_shell), "layers_and_channels", "Gimp");
|
||||||
|
@ -371,7 +372,7 @@ lc_dialog_update_image_list ()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gtk_option_menu_remove_menu (GTK_OPTION_MENU (image_option_menu));
|
gtk_option_menu_remove_menu (GTK_OPTION_MENU (image_option_menu));
|
||||||
gtk_widget_destroy (image_menu);
|
/* gtk_widget_destroy (image_menu); */
|
||||||
|
|
||||||
default_id = layersD->gimage_id;
|
default_id = layersD->gimage_id;
|
||||||
layersD->gimage_id = -1; /* ??? */
|
layersD->gimage_id = -1; /* ??? */
|
||||||
|
@ -412,6 +413,8 @@ lc_dialog_free ()
|
||||||
channels_dialog_free ();
|
channels_dialog_free ();
|
||||||
|
|
||||||
gtk_widget_destroy (lc_shell);
|
gtk_widget_destroy (lc_shell);
|
||||||
|
gtk_widget_unref (lc_shell);
|
||||||
|
|
||||||
lc_shell = NULL;
|
lc_shell = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1033,7 +1033,7 @@ undo_push_layer (GImage *gimage,
|
||||||
{
|
{
|
||||||
/* if this is a remove layer, delete the layer */
|
/* if this is a remove layer, delete the layer */
|
||||||
if (lu->undo_type == 1)
|
if (lu->undo_type == 1)
|
||||||
layer_delete (lu->layer);
|
layer_unref (lu->layer);
|
||||||
g_free (lu);
|
g_free (lu);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1124,7 +1124,7 @@ undo_free_layer (int state,
|
||||||
*/
|
*/
|
||||||
if ((state == REDO && lu->undo_type == 0) ||
|
if ((state == REDO && lu->undo_type == 0) ||
|
||||||
(state == UNDO && lu->undo_type == 1))
|
(state == UNDO && lu->undo_type == 1))
|
||||||
layer_delete (lu->layer);
|
layer_unref (lu->layer);
|
||||||
|
|
||||||
g_free (lu);
|
g_free (lu);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue