Commit 90acebb6 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

modules/cdisplay_colorblind.c modules/cdisplay_gamma.c

2005-02-05  Sven Neumann  <sven@gimp.org>

	* modules/cdisplay_colorblind.c
	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c
	* modules/cdisplay_proof.c: there's no longer a need to keep a
	pointer to the widget returned by GimpColorDisplay::configure.
parent 5b70c77f
2005-02-05 Sven Neumann <sven@gimp.org>
* modules/cdisplay_colorblind.c
* modules/cdisplay_gamma.c
* modules/cdisplay_highcontrast.c
* modules/cdisplay_proof.c: there's no longer a need to keep a
pointer to the widget returned by GimpColorDisplay::configure.
2005-02-05 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpcolordisplay.[ch]: deprecate the
......
......@@ -102,8 +102,6 @@ struct _CdisplayColorblind
gfloat inflection;
guint32 cache[2 * COLOR_CACHE_SIZE];
GtkWidget *widget;
};
struct _CdisplayColorblindClass
......@@ -119,19 +117,18 @@ enum
};
static GType cdisplay_colorblind_get_type (GTypeModule *module);
static void cdisplay_colorblind_class_init (CdisplayColorblindClass *klass);
static void cdisplay_colorblind_init (CdisplayColorblind *colorblind);
static GType cdisplay_colorblind_get_type (GTypeModule *module);
static void cdisplay_colorblind_class_init (CdisplayColorblindClass *klass);
static void cdisplay_colorblind_init (CdisplayColorblind *colorblind);
static void cdisplay_colorblind_dispose (GObject *object);
static void cdisplay_colorblind_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void cdisplay_colorblind_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void cdisplay_colorblind_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void cdisplay_colorblind_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void cdisplay_colorblind_convert (GimpColorDisplay *display,
guchar *buf,
......@@ -229,7 +226,6 @@ cdisplay_colorblind_class_init (CdisplayColorblindClass *klass)
parent_class = g_type_class_peek_parent (klass);
object_class->dispose = cdisplay_colorblind_dispose;
object_class->get_property = cdisplay_colorblind_get_property;
object_class->set_property = cdisplay_colorblind_set_property;
......@@ -298,17 +294,6 @@ cdisplay_colorblind_init (CdisplayColorblind *colorblind)
colorblind->gammaRGB[2] = 2.1;
}
static void
cdisplay_colorblind_dispose (GObject *object)
{
CdisplayColorblind *colorblind = CDISPLAY_COLORBLIND (object);
if (colorblind->widget)
gtk_widget_destroy (colorblind->widget);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
cdisplay_colorblind_get_property (GObject *object,
guint property_id,
......@@ -483,9 +468,6 @@ cdisplay_colorblind_configure (GimpColorDisplay *display)
GtkWidget *label;
GtkWidget *combo;
if (colorblind->widget)
gtk_widget_destroy (colorblind->widget);
hbox = gtk_hbox_new (FALSE, 6);
label = gtk_label_new_with_mnemonic (_("Color _Deficiency Type:"));
......@@ -500,12 +482,7 @@ cdisplay_colorblind_configure (GimpColorDisplay *display)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
colorblind->widget = hbox;
g_signal_connect (colorblind->widget, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&colorblind->widget);
return colorblind->widget;
return hbox;
}
static void
......
......@@ -48,8 +48,6 @@ struct _CdisplayGamma
gdouble gamma;
guchar lookup[256];
GtkWidget *widget;
};
struct _CdisplayGammaClass
......@@ -68,7 +66,6 @@ enum
static GType cdisplay_gamma_get_type (GTypeModule *module);
static void cdisplay_gamma_class_init (CdisplayGammaClass *klass);
static void cdisplay_gamma_dispose (GObject *object);
static void cdisplay_gamma_set_property (GObject *object,
guint property_id,
const GValue *value,
......@@ -153,7 +150,6 @@ cdisplay_gamma_class_init (CdisplayGammaClass *klass)
parent_class = g_type_class_peek_parent (klass);
object_class->dispose = cdisplay_gamma_dispose;
object_class->get_property = cdisplay_gamma_get_property;
object_class->set_property = cdisplay_gamma_set_property;
......@@ -168,17 +164,6 @@ cdisplay_gamma_class_init (CdisplayGammaClass *klass)
display_class->configure = cdisplay_gamma_configure;
}
static void
cdisplay_gamma_dispose (GObject *object)
{
CdisplayGamma *gamma = CDISPLAY_GAMMA (object);
if (gamma->widget)
gtk_widget_destroy (gamma->widget);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
cdisplay_gamma_get_property (GObject *object,
guint property_id,
......@@ -262,9 +247,6 @@ cdisplay_gamma_configure (GimpColorDisplay *display)
GtkWidget *label;
GtkWidget *spinbutton;
if (gamma->widget)
gtk_widget_destroy (gamma->widget);
hbox = gtk_hbox_new (FALSE, 6);
label = gtk_label_new_with_mnemonic (_("_Gamma:"));
......@@ -278,12 +260,7 @@ cdisplay_gamma_configure (GimpColorDisplay *display)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
gamma->widget = hbox;
g_signal_connect (gamma->widget, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&gamma->widget);
return gamma->widget;
return hbox;
}
static void
......
......@@ -48,8 +48,6 @@ struct _CdisplayContrast
gdouble contrast;
guchar lookup[256];
GtkWidget *widget;
};
struct _CdisplayContrastClass
......@@ -68,7 +66,6 @@ enum
static GType cdisplay_contrast_get_type (GTypeModule *module);
static void cdisplay_contrast_class_init (CdisplayContrastClass *klass);
static void cdisplay_contrast_dispose (GObject *object);
static void cdisplay_contrast_set_property (GObject *object,
guint property_id,
const GValue *value,
......@@ -153,7 +150,6 @@ cdisplay_contrast_class_init (CdisplayContrastClass *klass)
parent_class = g_type_class_peek_parent (klass);
object_class->dispose = cdisplay_contrast_dispose;
object_class->get_property = cdisplay_contrast_get_property;
object_class->set_property = cdisplay_contrast_set_property;
......@@ -168,17 +164,6 @@ cdisplay_contrast_class_init (CdisplayContrastClass *klass)
display_class->configure = cdisplay_contrast_configure;
}
static void
cdisplay_contrast_dispose (GObject *object)
{
CdisplayContrast *contrast = CDISPLAY_CONTRAST (object);
if (contrast->widget)
gtk_widget_destroy (contrast->widget);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
cdisplay_contrast_get_property (GObject *object,
guint property_id,
......@@ -262,9 +247,6 @@ cdisplay_contrast_configure (GimpColorDisplay *display)
GtkWidget *label;
GtkWidget *spinbutton;
if (contrast->widget)
gtk_widget_destroy (contrast->widget);
hbox = gtk_hbox_new (FALSE, 6);
label = gtk_label_new_with_mnemonic (_("Contrast C_ycles:"));
......@@ -278,12 +260,7 @@ cdisplay_contrast_configure (GimpColorDisplay *display)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
contrast->widget = hbox;
g_signal_connect (contrast->widget, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&contrast->widget);
return contrast->widget;
return hbox;
}
static void
......
......@@ -81,8 +81,6 @@ struct _CdisplayProof
gchar *profile;
cmsHTRANSFORM transform;
GtkWidget *widget;
};
struct _CdisplayProofClass
......@@ -104,7 +102,6 @@ static GType cdisplay_proof_get_type (GTypeModule *module);
static void cdisplay_proof_class_init (CdisplayProofClass *klass);
static void cdisplay_proof_init (CdisplayProof *proof);
static void cdisplay_proof_dispose (GObject *object);
static void cdisplay_proof_finalize (GObject *object);
static void cdisplay_proof_get_property (GObject *object,
guint property_id,
......@@ -206,7 +203,6 @@ cdisplay_proof_class_init (CdisplayProofClass *klass)
parent_class = g_type_class_peek_parent (klass);
object_class->dispose = cdisplay_proof_dispose;
object_class->finalize = cdisplay_proof_finalize;
object_class->get_property = cdisplay_proof_get_property;
object_class->set_property = cdisplay_proof_set_property;
......@@ -238,18 +234,6 @@ cdisplay_proof_init (CdisplayProof *proof)
{
proof->transform = NULL;
proof->profile = NULL;
proof->widget = NULL;
}
static void
cdisplay_proof_dispose (GObject *object)
{
CdisplayProof *proof = CDISPLAY_PROOF (object);
if (proof->widget)
gtk_widget_destroy (proof->widget);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
......@@ -354,9 +338,6 @@ cdisplay_proof_configure (GimpColorDisplay *display)
GtkWidget *entry;
GtkWidget *toggle;
if (proof->widget)
gtk_widget_destroy (proof->widget);
table = gtk_table_new (3, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
......@@ -380,12 +361,7 @@ cdisplay_proof_configure (GimpColorDisplay *display)
gtk_table_attach_defaults (GTK_TABLE (table), toggle, 1, 2, 2, 3);
gtk_widget_show (toggle);
proof->widget = table;
g_signal_connect (proof->widget, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&proof->widget);
return proof->widget;
return table;
}
static void
......
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