app/dialogs/channel-options-dialog.c app/dialogs/convert-dialog.c
2007-05-23 Sven Neumann <sven@gimp.org> * app/dialogs/channel-options-dialog.c * app/dialogs/convert-dialog.c * app/dialogs/desaturate-dialog.c * app/dialogs/fade-dialog.c * app/dialogs/image-merge-layers-dialog.c * app/dialogs/image-new-dialog.c * app/dialogs/image-scale-dialog.c * app/dialogs/layer-add-mask-dialog.c * app/dialogs/layer-options-dialog.c * app/dialogs/module-dialog.c * app/dialogs/offset-dialog.c * app/dialogs/palette-import-dialog.c * app/dialogs/print-size-dialog.c * app/dialogs/resize-dialog.c * app/dialogs/scale-dialog.c * app/dialogs/template-options-dialog.c * app/dialogs/vectors-export-dialog.c * app/dialogs/vectors-import-dialog.c * app/dialogs/vectors-options-dialog.c: allocate structs using GSlice. svn path=/trunk/; revision=22598
This commit is contained in:
committed by
Sven Neumann
parent
ac2f30c485
commit
2381068a89
@ -43,9 +43,7 @@
|
||||
#define SB_WIDTH 8
|
||||
|
||||
|
||||
typedef struct _ResizeDialog ResizeDialog;
|
||||
|
||||
struct _ResizeDialog
|
||||
typedef struct
|
||||
{
|
||||
GimpViewable *viewable;
|
||||
gint old_width;
|
||||
@ -57,13 +55,14 @@ struct _ResizeDialog
|
||||
GimpItemSet layer_set;
|
||||
GimpResizeCallback callback;
|
||||
gpointer user_data;
|
||||
};
|
||||
} ResizeDialog;
|
||||
|
||||
|
||||
static void resize_dialog_response (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
ResizeDialog *private);
|
||||
static void resize_dialog_reset (ResizeDialog *private);
|
||||
static void resize_dialog_free (ResizeDialog *private);
|
||||
|
||||
static void size_notify (GimpSizeBox *box,
|
||||
GParamSpec *pspec,
|
||||
@ -154,9 +153,10 @@ resize_dialog_new (GimpViewable *viewable,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
private = g_new0 (ResizeDialog, 1);
|
||||
private = g_slice_new0 (ResizeDialog);
|
||||
|
||||
g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_free, private);
|
||||
g_object_weak_ref (G_OBJECT (dialog),
|
||||
(GWeakNotify) resize_dialog_free, private);
|
||||
|
||||
private->viewable = viewable;
|
||||
private->old_width = width;
|
||||
@ -368,6 +368,12 @@ resize_dialog_reset (ResizeDialog *private)
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
resize_dialog_free (ResizeDialog *private)
|
||||
{
|
||||
g_slice_free (ResizeDialog, private);
|
||||
}
|
||||
|
||||
static void
|
||||
size_notify (GimpSizeBox *box,
|
||||
GParamSpec *pspec,
|
||||
|
||||
Reference in New Issue
Block a user