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

app/nav_window.c app/user_install.c app/pdb/color_cmds.c

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

	* app/nav_window.c
	* app/user_install.c
	* app/pdb/color_cmds.c
	* app/pdb/selection_cmds.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpdrawtool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpellipseselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptool.c
	* app/tools/paint_options.c
	* app/tools/selection_options.c
	* app/tools/tool_manager.c
	* app/tools/transform_options.c
	* app/widgets/gimpdnd.c
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/selection.pdb: use GObject functions.
parent fd97c498
2001-07-25 Sven Neumann <sven@gimp.org>
* app/nav_window.c
* app/user_install.c
* app/pdb/color_cmds.c
* app/pdb/selection_cmds.c
* app/tools/gimpbezierselecttool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpdrawtool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpellipseselecttool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimppainttool.c
* app/tools/gimprectselecttool.c
* app/tools/gimptexttool.c
* app/tools/gimptool.c
* app/tools/paint_options.c
* app/tools/selection_options.c
* app/tools/tool_manager.c
* app/tools/transform_options.c
* app/widgets/gimpdnd.c
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/selection.pdb: use GObject functions.
2001-07-25 Sven Neumann <sven@gimp.org>
* app/gximage.c: replaced some deprecated gdk functions.
......
......@@ -490,7 +490,7 @@ hue_saturation_dialog_new (void)
{
radio_button = gtk_radio_button_new_with_label (group, gettext (hue_partition_names[i]));
group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio_button));
gtk_object_set_data (GTK_OBJECT (radio_button), "hue_partition",
g_object_set_data (G_OBJECT (radio_button), "hue_partition",
(gpointer) i);
if (!i)
......@@ -827,7 +827,7 @@ hue_saturation_partition_callback (GtkWidget *widget,
hsd = (HueSaturationDialog *) data;
partition = (HueRange) gtk_object_get_data (GTK_OBJECT (widget),
partition = (HueRange) g_object_get_data (G_OBJECT (widget),
"hue_partition");
hsd->hue_partition = partition;
......
......@@ -801,7 +801,7 @@ blend_options_new (void)
/* automatically set the sensitive state of the table */
gtk_widget_set_sensitive (table, options->supersample_d);
gtk_object_set_data (GTK_OBJECT (options->supersample_w), "set_sensitive",
g_object_set_data (G_OBJECT (options->supersample_w), "set_sensitive",
table);
/* max depth scale */
......
......@@ -340,10 +340,10 @@ gimp_color_picker_tool_options_new (void)
gtk_scale_set_digits (GTK_SCALE (scale), 0);
gtk_container_add (GTK_CONTAINER (abox), scale);
gtk_widget_set_sensitive (scale, options->sample_average_d);
gtk_object_set_data (GTK_OBJECT (options->sample_average_w), "set_sensitive",
g_object_set_data (G_OBJECT (options->sample_average_w), "set_sensitive",
scale);
gtk_widget_set_sensitive (label, options->sample_average_d);
gtk_object_set_data (GTK_OBJECT (scale), "set_sensitive",
g_object_set_data (G_OBJECT (scale), "set_sensitive",
label);
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
......
......@@ -298,8 +298,8 @@ user_install_notebook_set_page (GtkNotebook *notebook,
page = gtk_notebook_get_nth_page (notebook, index);
title = gtk_object_get_data (GTK_OBJECT (page), "title");
footer = gtk_object_get_data (GTK_OBJECT (page), "footer");
title = g_object_get_data (G_OBJECT (page), "title");
footer = g_object_get_data (G_OBJECT (page), "footer");
gtk_label_set_text (GTK_LABEL (title_label), title);
gtk_label_set_text (GTK_LABEL (footer_label), footer);
......@@ -466,8 +466,8 @@ user_install_notebook_append_page (GtkNotebook *notebook,
GtkWidget *page;
page = gtk_vbox_new (FALSE, 6);
gtk_object_set_data (GTK_OBJECT (page), "title", title);
gtk_object_set_data (GTK_OBJECT (page), "footer", footer);
g_object_set_data (G_OBJECT (page), "title", title);
g_object_set_data (G_OBJECT (page), "footer", footer);
gtk_notebook_append_page (notebook, page, NULL);
gtk_widget_show (page);
......@@ -763,9 +763,9 @@ user_install_dialog_create (Gimp *gimp)
NULL, NULL, NULL, NULL,
FALSE, TRUE);
gtk_signal_connect (GTK_OBJECT (ctree), "select_row",
GTK_SIGNAL_FUNC (user_install_ctree_select_row),
notebook2);
g_signal_connect (G_OBJECT (ctree), "select_row",
G_CALLBACK (user_install_ctree_select_row),
notebook2);
file_pixmap = gdk_pixmap_create_from_xpm_d (dialog->window,
&file_mask,
......@@ -1058,8 +1058,8 @@ user_install_run (void)
if (executable)
{
gtk_object_set_data (GTK_OBJECT (log_page), "footer",
_("Click \"Continue\" to complete GIMP installation."));
g_object_set_data (G_OBJECT (log_page), "footer",
_("Click \"Continue\" to complete GIMP installation."));
}
else
{
......@@ -1211,7 +1211,7 @@ user_install_resolution (void)
chain = GIMP_COORDINATES_CHAINBUTTON (resolution_entry);
PAGE_STYLE (GTK_WIDGET (chain->line1));
PAGE_STYLE (GTK_WIDGET (chain->line2));
gtk_object_set_data (GTK_OBJECT (resolution_entry), "chain_button", chain);
g_object_set_data (G_OBJECT (resolution_entry), "chain_button", chain);
for (list = GTK_TABLE (resolution_entry)->children;
list;
......@@ -1241,18 +1241,18 @@ user_install_resolution (void)
button = gtk_button_new_with_label (_("Calibrate"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 4, 0);
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (user_install_resolution_calibrate),
NULL);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (user_install_resolution_calibrate),
NULL);
gtk_widget_show (button);
gtk_object_set_data (GTK_OBJECT (xserver_toggle), "inverse_sensitive",
resolution_entry);
gtk_object_set_data (GTK_OBJECT (resolution_entry), "inverse_sensitive",
button);
gtk_signal_connect (GTK_OBJECT (xserver_toggle), "toggled",
GTK_SIGNAL_FUNC (gimp_toggle_button_sensitive_update),
NULL);
g_object_set_data (G_OBJECT (xserver_toggle), "inverse_sensitive",
resolution_entry);
g_object_set_data (G_OBJECT (resolution_entry), "inverse_sensitive",
button);
g_signal_connect (G_OBJECT (xserver_toggle), "toggled",
G_CALLBACK (gimp_toggle_button_sensitive_update),
NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (xserver_toggle),
gimprc.using_xserver_resolution);
}
......
......@@ -258,8 +258,7 @@ nav_dialog_create (GDisplay *gdisp)
button_area, FALSE, FALSE, 0);
gtk_widget_show (button_area);
if (! gtk_object_get_data (GTK_OBJECT (gdisp->gimage),
"nav_handlers_installed"))
if (! g_object_get_data (G_OBJECT (gdisp->gimage), "nav_handlers_installed"))
{
gtk_signal_connect_after (GTK_OBJECT (gdisp->gimage), "dirty",
GTK_SIGNAL_FUNC (nav_image_need_update),
......@@ -268,9 +267,9 @@ nav_dialog_create (GDisplay *gdisp)
GTK_SIGNAL_FUNC (nav_image_need_update),
nav_dialog);
gtk_object_set_data (GTK_OBJECT (gdisp->gimage),
"nav_handlers_installed",
nav_dialog);
g_object_set_data (G_OBJECT (gdisp->gimage),
"nav_handlers_installed",
nav_dialog);
}
return nav_dialog;
......@@ -590,7 +589,7 @@ nav_dialog_new (GDisplay *gdisp,
static gchar *
nav_dialog_title (GDisplay *gdisp)
{
gchar *basename;
const gchar *basename;
gchar *title;
basename = g_basename (gimp_image_filename (gdisp->gimage));
......@@ -1646,8 +1645,7 @@ nav_dialog_display_changed (GimpContext *context,
/* Tie into the dirty signal so we can update the preview
* provided we haven't already
*/
if (! gtk_object_get_data (GTK_OBJECT (gimage),
"nav_handlers_installed"))
if (! g_object_get_data (G_OBJECT (gimage), "nav_handlers_installed"))
{
gtk_signal_connect_after (GTK_OBJECT (gimage), "dirty",
GTK_SIGNAL_FUNC (nav_image_need_update),
......@@ -1656,9 +1654,9 @@ nav_dialog_display_changed (GimpContext *context,
GTK_SIGNAL_FUNC (nav_image_need_update),
nav_dialog);
gtk_object_set_data (GTK_OBJECT (gimage),
"nav_handlers_installed",
nav_dialog);
g_object_set_data (G_OBJECT (gimage),
"nav_handlers_installed",
nav_dialog);
}
}
}
......
......@@ -258,8 +258,7 @@ nav_dialog_create (GDisplay *gdisp)
button_area, FALSE, FALSE, 0);
gtk_widget_show (button_area);
if (! gtk_object_get_data (GTK_OBJECT (gdisp->gimage),
"nav_handlers_installed"))
if (! g_object_get_data (G_OBJECT (gdisp->gimage), "nav_handlers_installed"))
{
gtk_signal_connect_after (GTK_OBJECT (gdisp->gimage), "dirty",
GTK_SIGNAL_FUNC (nav_image_need_update),
......@@ -268,9 +267,9 @@ nav_dialog_create (GDisplay *gdisp)
GTK_SIGNAL_FUNC (nav_image_need_update),
nav_dialog);
gtk_object_set_data (GTK_OBJECT (gdisp->gimage),
"nav_handlers_installed",
nav_dialog);
g_object_set_data (G_OBJECT (gdisp->gimage),
"nav_handlers_installed",
nav_dialog);
}
return nav_dialog;
......@@ -590,7 +589,7 @@ nav_dialog_new (GDisplay *gdisp,
static gchar *
nav_dialog_title (GDisplay *gdisp)
{
gchar *basename;
const gchar *basename;
gchar *title;
basename = g_basename (gimp_image_filename (gdisp->gimage));
......@@ -1646,8 +1645,7 @@ nav_dialog_display_changed (GimpContext *context,
/* Tie into the dirty signal so we can update the preview
* provided we haven't already
*/
if (! gtk_object_get_data (GTK_OBJECT (gimage),
"nav_handlers_installed"))
if (! g_object_get_data (G_OBJECT (gimage), "nav_handlers_installed"))
{
gtk_signal_connect_after (GTK_OBJECT (gimage), "dirty",
GTK_SIGNAL_FUNC (nav_image_need_update),
......@@ -1656,9 +1654,9 @@ nav_dialog_display_changed (GimpContext *context,
GTK_SIGNAL_FUNC (nav_image_need_update),
nav_dialog);
gtk_object_set_data (GTK_OBJECT (gimage),
"nav_handlers_installed",
nav_dialog);
g_object_set_data (G_OBJECT (gimage),
"nav_handlers_installed",
nav_dialog);
}
}
}
......
......@@ -298,8 +298,8 @@ user_install_notebook_set_page (GtkNotebook *notebook,
page = gtk_notebook_get_nth_page (notebook, index);
title = gtk_object_get_data (GTK_OBJECT (page), "title");
footer = gtk_object_get_data (GTK_OBJECT (page), "footer");
title = g_object_get_data (G_OBJECT (page), "title");
footer = g_object_get_data (G_OBJECT (page), "footer");
gtk_label_set_text (GTK_LABEL (title_label), title);
gtk_label_set_text (GTK_LABEL (footer_label), footer);
......@@ -466,8 +466,8 @@ user_install_notebook_append_page (GtkNotebook *notebook,
GtkWidget *page;
page = gtk_vbox_new (FALSE, 6);
gtk_object_set_data (GTK_OBJECT (page), "title", title);
gtk_object_set_data (GTK_OBJECT (page), "footer", footer);
g_object_set_data (G_OBJECT (page), "title", title);
g_object_set_data (G_OBJECT (page), "footer", footer);
gtk_notebook_append_page (notebook, page, NULL);
gtk_widget_show (page);
......@@ -763,9 +763,9 @@ user_install_dialog_create (Gimp *gimp)
NULL, NULL, NULL, NULL,
FALSE, TRUE);
gtk_signal_connect (GTK_OBJECT (ctree), "select_row",
GTK_SIGNAL_FUNC (user_install_ctree_select_row),
notebook2);
g_signal_connect (G_OBJECT (ctree), "select_row",
G_CALLBACK (user_install_ctree_select_row),
notebook2);
file_pixmap = gdk_pixmap_create_from_xpm_d (dialog->window,
&file_mask,
......@@ -1058,8 +1058,8 @@ user_install_run (void)
if (executable)
{
gtk_object_set_data (GTK_OBJECT (log_page), "footer",
_("Click \"Continue\" to complete GIMP installation."));
g_object_set_data (G_OBJECT (log_page), "footer",
_("Click \"Continue\" to complete GIMP installation."));
}
else
{
......@@ -1211,7 +1211,7 @@ user_install_resolution (void)
chain = GIMP_COORDINATES_CHAINBUTTON (resolution_entry);
PAGE_STYLE (GTK_WIDGET (chain->line1));
PAGE_STYLE (GTK_WIDGET (chain->line2));
gtk_object_set_data (GTK_OBJECT (resolution_entry), "chain_button", chain);
g_object_set_data (G_OBJECT (resolution_entry), "chain_button", chain);
for (list = GTK_TABLE (resolution_entry)->children;
list;
......@@ -1241,18 +1241,18 @@ user_install_resolution (void)
button = gtk_button_new_with_label (_("Calibrate"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 4, 0);
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (user_install_resolution_calibrate),
NULL);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (user_install_resolution_calibrate),
NULL);
gtk_widget_show (button);
gtk_object_set_data (GTK_OBJECT (xserver_toggle), "inverse_sensitive",
resolution_entry);
gtk_object_set_data (GTK_OBJECT (resolution_entry), "inverse_sensitive",
button);
gtk_signal_connect (GTK_OBJECT (xserver_toggle), "toggled",
GTK_SIGNAL_FUNC (gimp_toggle_button_sensitive_update),
NULL);
g_object_set_data (G_OBJECT (xserver_toggle), "inverse_sensitive",
resolution_entry);
g_object_set_data (G_OBJECT (resolution_entry), "inverse_sensitive",
button);
g_signal_connect (G_OBJECT (xserver_toggle), "toggled",
G_CALLBACK (gimp_toggle_button_sensitive_update),
NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (xserver_toggle),
gimprc.using_xserver_resolution);
}
......
......@@ -258,8 +258,7 @@ nav_dialog_create (GDisplay *gdisp)
button_area, FALSE, FALSE, 0);
gtk_widget_show (button_area);
if (! gtk_object_get_data (GTK_OBJECT (gdisp->gimage),
"nav_handlers_installed"))
if (! g_object_get_data (G_OBJECT (gdisp->gimage), "nav_handlers_installed"))
{
gtk_signal_connect_after (GTK_OBJECT (gdisp->gimage), "dirty",
GTK_SIGNAL_FUNC (nav_image_need_update),
......@@ -268,9 +267,9 @@ nav_dialog_create (GDisplay *gdisp)
GTK_SIGNAL_FUNC (nav_image_need_update),
nav_dialog);
gtk_object_set_data (GTK_OBJECT (gdisp->gimage),
"nav_handlers_installed",
nav_dialog);
g_object_set_data (G_OBJECT (gdisp->gimage),
"nav_handlers_installed",
nav_dialog);
}
return nav_dialog;
......@@ -590,7 +589,7 @@ nav_dialog_new (GDisplay *gdisp,
static gchar *
nav_dialog_title (GDisplay *gdisp)
{
gchar *basename;
const gchar *basename;
gchar *title;
basename = g_basename (gimp_image_filename (gdisp->gimage));
......@@ -1646,8 +1645,7 @@ nav_dialog_display_changed (GimpContext *context,
/* Tie into the dirty signal so we can update the preview
* provided we haven't already
*/
if (! gtk_object_get_data (GTK_OBJECT (gimage),
"nav_handlers_installed"))
if (! g_object_get_data (G_OBJECT (gimage), "nav_handlers_installed"))
{
gtk_signal_connect_after (GTK_OBJECT (gimage), "dirty",
GTK_SIGNAL_FUNC (nav_image_need_update),
......@@ -1656,9 +1654,9 @@ nav_dialog_display_changed (GimpContext *context,
GTK_SIGNAL_FUNC (nav_image_need_update),
nav_dialog);
gtk_object_set_data (GTK_OBJECT (gimage),
"nav_handlers_installed",
nav_dialog);
g_object_set_data (G_OBJECT (gimage),
"nav_handlers_installed",
nav_dialog);
}
}
}
......
......@@ -254,14 +254,18 @@ clone_set_src_drawable (GimpDrawable *drawable)
{
if (src_drawable_ == drawable)
return;
if (src_drawable_)
gtk_signal_disconnect_by_data (GTK_OBJECT (src_drawable_), &src_drawable_);
g_signal_handlers_disconnect_by_func (G_OBJECT (src_drawable_),
G_CALLBACK (clone_src_drawable_destroyed_cb),
&src_drawable_);
src_drawable_ = drawable;
if (drawable)
{
gtk_signal_connect (GTK_OBJECT (drawable), "destroy",
GTK_SIGNAL_FUNC (clone_src_drawable_destroyed_cb),
&src_drawable_);
g_signal_connect (G_OBJECT (drawable), "destroy",
G_CALLBACK (clone_src_drawable_destroyed_cb),
&src_drawable_);
}
}
......
......@@ -863,8 +863,8 @@ gimp_paint_tool_paint (GimpPaintTool *tool,
GimpDrawable *drawable,
PaintState state)
{
gtk_signal_emit (GTK_OBJECT(tool), gimp_paint_tool_signals[PAINT],
drawable, state);
g_signal_emit (G_OBJECT(tool), gimp_paint_tool_signals[PAINT], 0,
drawable, state);
}
gboolean
......@@ -898,10 +898,10 @@ gimp_paint_tool_start (GimpPaintTool *paint_tool,
/* Each buffer is the same size as the maximum bounds of the active brush... */
if (brush && brush != gimp_context_get_brush (context))
{
gtk_signal_disconnect_by_func (GTK_OBJECT (brush),
GTK_SIGNAL_FUNC (gimp_paint_tool_invalidate_cache),
NULL);
gtk_object_unref (GTK_OBJECT (brush));
g_signal_handlers_disconnect_by_func (G_OBJECT (brush),
G_CALLBACK (gimp_paint_tool_invalidate_cache),
NULL);
g_object_unref (G_OBJECT (brush));
}
if (!(brush = gimp_context_get_brush (context)))
{
......@@ -909,10 +909,10 @@ gimp_paint_tool_start (GimpPaintTool *paint_tool,
return FALSE;
}
gtk_object_ref (GTK_OBJECT (brush));
gtk_signal_connect (GTK_OBJECT (brush), "invalidate_preview",
GTK_SIGNAL_FUNC (gimp_paint_tool_invalidate_cache),
NULL);
g_object_ref (G_OBJECT (brush));
g_signal_connect (G_OBJECT (brush), "invalidate_preview",
G_CALLBACK (gimp_paint_tool_invalidate_cache),
NULL);
paint_tool->spacing = (double) gimp_brush_get_spacing (brush) / 100.0;
......
......@@ -254,14 +254,18 @@ clone_set_src_drawable (GimpDrawable *drawable)
{
if (src_drawable_ == drawable)
return;
if (src_drawable_)
gtk_signal_disconnect_by_data (GTK_OBJECT (src_drawable_), &src_drawable_);
g_signal_handlers_disconnect_by_func (G_OBJECT (src_drawable_),
G_CALLBACK (clone_src_drawable_destroyed_cb),
&src_drawable_);
src_drawable_ = drawable;
if (drawable)
{
gtk_signal_connect (GTK_OBJECT (drawable), "destroy",
GTK_SIGNAL_FUNC (clone_src_drawable_destroyed_cb),
&src_drawable_);
g_signal_connect (G_OBJECT (drawable), "destroy",
G_CALLBACK (clone_src_drawable_destroyed_cb),
&src_drawable_);
}
}
......
......@@ -959,9 +959,9 @@ histogram_invoker (Gimp *gimp,
htd.histogram = histogram_widget_new (HISTOGRAM_WIDTH,
HISTOGRAM_HEIGHT);
gtk_signal_connect (GTK_OBJECT (htd.histogram), "range_changed",
GTK_SIGNAL_FUNC (histogram_tool_histogram_range),
(gpointer) &htd);
g_signal_connect (G_OBJECT (htd.histogram), "range_changed",
G_CALLBACK (histogram_tool_histogram_range),
(gpointer) &htd);
/* The information collection should occur only within selection bounds */
no_mask = (gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2) == FALSE);
......
......@@ -1030,7 +1030,7 @@ selection_combine_invoker (Gimp *gimp,
operation,
0, 0); /* off x/y */
gimage_mask_load (gimage, new_channel);
gtk_object_unref (GTK_OBJECT (new_channel));
g_object_unref (G_OBJECT (new_channel));
}
else
success = FALSE;
......
......@@ -1078,7 +1078,7 @@ bezier_select_reset (GimpBezierSelectTool *bezier_sel)
}
if (bezier_sel->mask)
gtk_object_unref (GTK_OBJECT (bezier_sel->mask));
g_object_unref (G_OBJECT (bezier_sel->mask));
bezier_sel->state = BEZIER_START; /* we are starting the curve */
bezier_sel->draw_mode = BEZIER_DRAW_ALL; /* draw everything by default */
......@@ -2873,7 +2873,7 @@ bezier_convert (GimpBezierSelectTool *bezier_sel,
/* destroy previous mask */
if (bezier_sel->mask)
{
gtk_object_unref (GTK_OBJECT (bezier_sel->mask));
g_object_unref (G_OBJECT (bezier_sel->mask));
bezier_sel->mask = NULL;
}
......
......@@ -801,7 +801,7 @@ blend_options_new (void)
/* automatically set the sensitive state of the table */
gtk_widget_set_sensitive (table, options->supersample_d);
gtk_object_set_data (GTK_OBJECT (options->supersample_w), "set_sensitive",
g_object_set_data (G_OBJECT (options->supersample_w), "set_sensitive",
table);
/* max depth scale */
......
......@@ -863,8 +863,8 @@ gimp_paint_tool_paint (GimpPaintTool *tool,
GimpDrawable *drawable,
PaintState state)
{
gtk_signal_emit (GTK_OBJECT(tool), gimp_paint_tool_signals[PAINT],
drawable, state);
g_signal_emit (G_OBJECT(tool), gimp_paint_tool_signals[PAINT], 0,
drawable, state);
}
gboolean
......@@ -898,10 +898,10 @@ gimp_paint_tool_start (GimpPaintTool *paint_tool,
/* Each buffer is the same size as the maximum bounds of the active brush... */
if (brush && brush != gimp_context_get_brush (context))
{
gtk_signal_disconnect_by_func (GTK_OBJECT (brush),
GTK_SIGNAL_FUNC (gimp_paint_tool_invalidate_cache),
NULL);
gtk_object_unref (GTK_OBJECT (brush));
g_signal_handlers_disconnect_by_func (G_OBJECT (brush),
G_CALLBACK (gimp_paint_tool_invalidate_cache),
NULL);
g_object_unref (G_OBJECT (brush));
}
if (!(brush = gimp_context_get_brush (context)))
{
......@@ -909,10 +909,10 @@ gimp_paint_tool_start (GimpPaintTool *paint_tool,
return FALSE;
}
gtk_object_ref (GTK_OBJECT (brush));
gtk_signal_connect (GTK_OBJECT (brush), "invalidate_preview",
GTK_SIGNAL_FUNC (gimp_paint_tool_invalidate_cache),
NULL);
g_object_ref (G_OBJECT (brush));
g_signal_connect (G_OBJECT (brush), "invalidate_preview",
G_CALLBACK (gimp_paint_tool_invalidate_cache),
NULL);
paint_tool->spacing = (double) gimp_brush_get_spacing (brush) / 100.0;
......
......@@ -605,7 +605,7 @@ bucket_fill (GimpImage *gimage,
/* free the mask */
if (mask)
gtk_object_unref (GTK_OBJECT (mask));
g_object_unref (G_OBJECT (mask));
if (new_buf)
temp_buf_free (pat_buf);
......
......@@ -255,7 +255,7 @@ gimp_by_color_select_tool_select (GimpImage *gimage,
gimp_channel_combine_mask (gimp_image_get_mask (gimage),
new_mask, op, off_x, off_y);
gtk_object_unref (GTK_OBJECT (new_mask));
g_object_unref (G_OBJECT (new_mask));
}
void
......
......@@ -254,14 +254,18 @@ clone_set_src_drawable (GimpDrawable *drawable)
{
if (src_drawable_ == drawable)
return;
if (src_drawable_)
gtk_signal_disconnect_by_data (GTK_OBJECT (src_drawable_), &src_drawable_);