Commit fff60947 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

libgimpwidgets/gimpfileselection.c replaced deprecated GDK calls

2001-07-31  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpfileselection.c
	* libgimpwidgets/gimppixmap.c: replaced deprecated GDK calls

	* modules/colorsel_gtk.c
	* modules/colorsel_triangle.c
	* modules/colorsel_water.c: GObject porting.
parent 56b49396
2001-07-31 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpfileselection.c
* libgimpwidgets/gimppixmap.c: replaced deprecated GDK calls
* modules/colorsel_gtk.c
* modules/colorsel_triangle.c
* modules/colorsel_water.c: GObject porting.
2001-07-31 Sven Neumann <sven@gimp.org>
* libgimp/gimpbrushmenu.c
......
......@@ -98,25 +98,25 @@ gimp_file_selection_destroy (GtkObject *object)
if (gfs->yes_pixmap)
{
gdk_pixmap_unref (gfs->yes_pixmap);
gdk_drawable_unref (gfs->yes_pixmap);
gfs->yes_pixmap = NULL;
}
if (gfs->yes_mask)
{
gdk_bitmap_unref (gfs->yes_mask);
gdk_drawable_unref (gfs->yes_mask);
gfs->yes_mask = NULL;
}
if (gfs->no_pixmap)
{
gdk_pixmap_unref (gfs->no_pixmap);
gdk_drawable_unref (gfs->no_pixmap);
gfs->no_pixmap = NULL;
}
if (gfs->no_mask)
{
gdk_bitmap_unref (gfs->no_mask);
gdk_drawable_unref (gfs->no_mask);
gfs->no_mask = NULL;
}
......
......@@ -98,25 +98,25 @@ gimp_file_selection_destroy (GtkObject *object)
if (gfs->yes_pixmap)
{
gdk_pixmap_unref (gfs->yes_pixmap);
gdk_drawable_unref (gfs->yes_pixmap);
gfs->yes_pixmap = NULL;
}
if (gfs->yes_mask)
{
gdk_bitmap_unref (gfs->yes_mask);
gdk_drawable_unref (gfs->yes_mask);
gfs->yes_mask = NULL;
}
if (gfs->no_pixmap)
{
gdk_pixmap_unref (gfs->no_pixmap);
gdk_drawable_unref (gfs->no_pixmap);
gfs->no_pixmap = NULL;
}
if (gfs->no_mask)
{
gdk_bitmap_unref (gfs->no_mask);
gdk_drawable_unref (gfs->no_mask);
gfs->no_mask = NULL;
}
......
......@@ -180,8 +180,8 @@ gimp_pixmap_create_from_xpm_d (GimpPixmap *pixmap)
gtk_pixmap_set (GTK_PIXMAP (pixmap), gdk_pixmap, mask);
if (gdk_pixmap)
gdk_pixmap_unref (gdk_pixmap);
gdk_drawable_unref (gdk_pixmap);
if (mask)
gdk_bitmap_unref (mask);
gdk_drawable_unref (mask);
}
......@@ -150,14 +150,15 @@ colorsel_gtk_new (const GimpHSV *hsv,
colorsel_gtk_set_color (p, hsv, rgb);
/* EEK: to be removed */
gtk_signal_connect_object_after
(GTK_OBJECT (GTK_COLOR_SELECTION (p->selector)->sample_area), "realize",
GTK_SIGNAL_FUNC (colorsel_gtk_widget_hide),
GTK_OBJECT (GTK_COLOR_SELECTION (p->selector)->sample_area->parent));
gtk_signal_connect (GTK_OBJECT (p->selector), "color_changed",
GTK_SIGNAL_FUNC (colorsel_gtk_update),
p);
g_signal_connect (G_OBJECT (GTK_COLOR_SELECTION (p->selector)->sample_area),
"realize",
G_CALLBACK (colorsel_gtk_widget_hide),
GTK_COLOR_SELECTION (p->selector)->sample_area->parent,
G_CONNECT_SWAPPED | G_CONNECT_AFTER);
g_signal_connect (G_OBJECT (p->selector), "color_changed",
G_CALLBACK (colorsel_gtk_update),
p);
vbox = gtk_vbox_new (TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
......
......@@ -483,7 +483,7 @@ color_selection_callback (GtkWidget *widget,
gdouble hue, sat, val;
gint hx,hy, sx,sy, vx,vy;
coldata = gtk_object_get_user_data (GTK_OBJECT (widget));
coldata = g_object_get_data (G_OBJECT (widget), "colorselect");
switch (event->type)
{
......@@ -632,17 +632,17 @@ create_preview (ColorSelect *coldata)
gtk_widget_set_events (GTK_WIDGET (preview), PREVIEW_MASK );
gtk_preview_size (GTK_PREVIEW (preview), PREVIEWSIZE, PREVIEWSIZE);
gtk_object_set_user_data (GTK_OBJECT (preview), coldata);
gtk_signal_connect (GTK_OBJECT (preview), "motion_notify_event",
GTK_SIGNAL_FUNC (color_selection_callback),
NULL);
gtk_signal_connect (GTK_OBJECT (preview), "button_press_event",
GTK_SIGNAL_FUNC (color_selection_callback),
NULL);
gtk_signal_connect (GTK_OBJECT (preview), "button_release_event",
GTK_SIGNAL_FUNC (color_selection_callback),
NULL);
g_object_set_data (G_OBJECT (preview), "colorselect", coldata);
g_signal_connect (G_OBJECT (preview), "motion_notify_event",
G_CALLBACK (color_selection_callback),
NULL);
g_signal_connect (G_OBJECT (preview), "button_press_event",
G_CALLBACK (color_selection_callback),
NULL);
g_signal_connect (G_OBJECT (preview), "button_release_event",
G_CALLBACK (color_selection_callback),
NULL);
for (i=0; i < 3 * PREVIEWSIZE; i += 3)
buf[i] = buf[i+1] = buf[i+2] = BGCOLOR;
......
......@@ -433,18 +433,18 @@ colorsel_water_new (const GimpHSV *hsv,
select_area_draw (preview);
/* Event signals */
gtk_signal_connect (GTK_OBJECT (event_box), "motion_notify_event",
GTK_SIGNAL_FUNC (motion_notify_event),
coldata);
gtk_signal_connect (GTK_OBJECT (event_box), "button_press_event",
GTK_SIGNAL_FUNC (button_press_event),
coldata);
gtk_signal_connect (GTK_OBJECT (event_box), "button_release_event",
GTK_SIGNAL_FUNC (button_release_event),
coldata);
gtk_signal_connect (GTK_OBJECT (event_box), "proximity_out_event",
GTK_SIGNAL_FUNC (proximity_out_event),
coldata);
g_signal_connect (G_OBJECT (event_box), "motion_notify_event",
G_CALLBACK (motion_notify_event),
coldata);
g_signal_connect (G_OBJECT (event_box), "button_press_event",
G_CALLBACK (button_press_event),
coldata);
g_signal_connect (G_OBJECT (event_box), "button_release_event",
G_CALLBACK (button_release_event),
coldata);
g_signal_connect (G_OBJECT (event_box), "proximity_out_event",
G_CALLBACK (proximity_out_event),
coldata);
gtk_widget_set_events (event_box,
GDK_EXPOSURE_MASK |
......@@ -463,9 +463,9 @@ colorsel_water_new (const GimpHSV *hsv,
adj = gtk_adjustment_new (200.0 - coldata->pressure_adjust * 100.0,
0.0, 200.0, 1.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (pressure_adjust_update),
coldata);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (pressure_adjust_update),
coldata);
scale = gtk_vscale_new (GTK_ADJUSTMENT (adj));
gtk_scale_set_digits (GTK_SCALE (scale), 0);
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
......
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