Commit 2671ae15 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

defined convenience macro g_signal_handlers_disconnect_by_data(). Will try

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

	* app/core/core-types.h:
	defined convenience macro g_signal_handlers_disconnect_by_data().
	Will try to persuade Tim to accept it for GLib.

	* app/module_db.c
	* app/undo_history.c
	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdatafactory.c
	* app/core/gimpparasite.c
	* app/gui/brush-editor.c
	* app/gui/brush-select.c
	* app/gui/dialogs.c
	* app/gui/file-open-dialog.c
	* app/gui/gradient-select.c
	* app/gui/gradients-commands.c
	* app/gui/menus.c
	* app/gui/pattern-select.c: GObject porting.
	Replaced all gtk_object_[unref|ref] calls by their g_object_
	counterparts, expect refs that are used with gtk_object_sink().
parent 04d8a337
2001-07-27 Sven Neumann <sven@gimp.org>
* app/core/core-types.h:
defined convenience macro g_signal_handlers_disconnect_by_data().
Will try to persuade Tim to accept it for GLib.
* app/module_db.c
* app/undo_history.c
* app/core/gimp.c
* app/core/gimpbrush.c
* app/core/gimpbrushpipe.c
* app/core/gimpcontainer.c
* app/core/gimpcontext.c
* app/core/gimpdatafactory.c
* app/core/gimpparasite.c
* app/gui/brush-editor.c
* app/gui/brush-select.c
* app/gui/dialogs.c
* app/gui/file-open-dialog.c
* app/gui/gradient-select.c
* app/gui/gradients-commands.c
* app/gui/menus.c
* app/gui/pattern-select.c: GObject porting.
Replaced all gtk_object_[unref|ref] calls by their g_object_
counterparts, expect refs that are used with gtk_object_sink().
2001-07-27 Sven Neumann <sven@gimp.org>
* app/module_db.c
......
......@@ -132,23 +132,24 @@ gradients_save_as_pov_query (GimpContainerEditor *editor)
gtk_container_set_border_width (GTK_CONTAINER (filesel), 2);
gtk_container_set_border_width (GTK_CONTAINER (filesel->button_area), 2);
gtk_signal_connect (GTK_OBJECT (filesel->ok_button), "clicked",
GTK_SIGNAL_FUNC (gradients_save_as_pov_ok_callback),
gradient);
g_signal_connect (G_OBJECT (filesel->ok_button), "clicked",
G_CALLBACK (gradients_save_as_pov_ok_callback),
gradient);
gtk_signal_connect_object (GTK_OBJECT (filesel->cancel_button), "clicked",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (filesel));
g_signal_connect_swapped (G_OBJECT (filesel->cancel_button), "clicked",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
filesel);
gtk_signal_connect_object (GTK_OBJECT (filesel), "delete_event",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (filesel));
g_signal_connect_swapped (G_OBJECT (filesel), "delete_event",
G_CALLBACK (gtk_widget_destroy),
filesel);
gtk_object_ref (GTK_OBJECT (gradient));
g_object_ref (G_OBJECT (gradient));
gtk_signal_connect_object (GTK_OBJECT (filesel), "destroy",
GTK_SIGNAL_FUNC (gtk_object_unref),
GTK_OBJECT (gradient));
g_signal_connect_object (G_OBJECT (filesel), "destroy",
G_CALLBACK (g_object_unref),
G_OBJECT (gradient),
G_CONNECT_SWAPPED);
/* Connect the "F1" help key */
gimp_help_connect_help_accel (GTK_WIDGET (filesel), gimp_standard_help_func,
......
......@@ -23,6 +23,13 @@
#include "apptypes.h"
/* EEEK, we will submit this a patch for glib */
#define g_signal_handlers_disconnect_by_data(instance,data) \
g_signal_handlers_disconnect_matched (instance,\
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, data);
/* enums */
/* Base image types */
......
......@@ -56,7 +56,7 @@ gimp_parasites_exit (Gimp *gimp)
if (gimp->parasites)
{
gtk_object_unref (GTK_OBJECT (gimp->parasites));
g_object_unref (G_OBJECT (gimp->parasites));
gimp->parasites = NULL;
}
}
......
......@@ -173,7 +173,7 @@ gimp_destroy (GtkObject *object)
if (gimp->standard_context)
{
gtk_object_unref (GTK_OBJECT (gimp->standard_context));
g_object_unref (G_OBJECT (gimp->standard_context));
gimp->standard_context = NULL;
}
......@@ -181,7 +181,7 @@ gimp_destroy (GtkObject *object)
if (gimp->tool_info_list)
{
gtk_object_unref (GTK_OBJECT (gimp->tool_info_list));
g_object_unref (G_OBJECT (gimp->tool_info_list));
gimp->tool_info_list = NULL;
}
......@@ -190,34 +190,34 @@ gimp_destroy (GtkObject *object)
if (gimp->brush_factory)
{
gimp_data_factory_data_free (gimp->brush_factory);
gtk_object_unref (GTK_OBJECT (gimp->brush_factory));
g_object_unref (G_OBJECT (gimp->brush_factory));
gimp->brush_factory = NULL;
}
if (gimp->pattern_factory)
{
gimp_data_factory_data_free (gimp->pattern_factory);
gtk_object_unref (GTK_OBJECT (gimp->pattern_factory));
g_object_unref (G_OBJECT (gimp->pattern_factory));
gimp->pattern_factory = NULL;
}
if (gimp->gradient_factory)
{
gimp_data_factory_data_free (gimp->gradient_factory);
gtk_object_unref (GTK_OBJECT (gimp->gradient_factory));
g_object_unref (G_OBJECT (gimp->gradient_factory));
gimp->gradient_factory = NULL;
}
if (gimp->palette_factory)
{
gimp_data_factory_data_free (gimp->palette_factory);
gtk_object_unref (GTK_OBJECT (gimp->palette_factory));
g_object_unref (G_OBJECT (gimp->palette_factory));
gimp->palette_factory = NULL;
}
if (gimp->named_buffers)
{
gtk_object_unref (GTK_OBJECT (gimp->named_buffers));
g_object_unref (G_OBJECT (gimp->named_buffers));
gimp->named_buffers = NULL;
}
......@@ -241,7 +241,7 @@ gimp_destroy (GtkObject *object)
if (gimp->images)
{
gtk_object_unref (GTK_OBJECT (gimp->images));
g_object_unref (G_OBJECT (gimp->images));
gimp->images = NULL;
}
......@@ -603,7 +603,7 @@ gimp_set_default_context (Gimp *gimp,
if (gimp->default_context)
{
gtk_object_unref (GTK_OBJECT (gimp->default_context));
g_object_unref (G_OBJECT (gimp->default_context));
}
gimp->default_context = context;
......@@ -634,7 +634,7 @@ gimp_set_user_context (Gimp *gimp,
if (gimp->user_context)
{
gtk_object_unref (GTK_OBJECT (gimp->user_context));
g_object_unref (G_OBJECT (gimp->user_context));
}
gimp->user_context = context;
......@@ -665,14 +665,14 @@ gimp_set_current_context (Gimp *gimp,
if (gimp->current_context)
{
gtk_object_unref (GTK_OBJECT (gimp->current_context));
g_object_unref (G_OBJECT (gimp->current_context));
}
gimp->current_context = context;
if (gimp->current_context)
{
gtk_object_ref (GTK_OBJECT (gimp->current_context));
g_object_ref (G_OBJECT (gimp->current_context));
}
}
......
......@@ -310,7 +310,7 @@ gimp_brush_get_standard (void)
gimp_object_set_name (GIMP_OBJECT (standard_brush), "Standard");
/* set ref_count to 2 --> never swap the standard brush */
gtk_object_ref (GTK_OBJECT (standard_brush));
g_object_ref (G_OBJECT (standard_brush));
gtk_object_ref (GTK_OBJECT (standard_brush));
gtk_object_sink (GTK_OBJECT (standard_brush));
}
......
......@@ -310,7 +310,7 @@ gimp_brush_get_standard (void)
gimp_object_set_name (GIMP_OBJECT (standard_brush), "Standard");
/* set ref_count to 2 --> never swap the standard brush */
gtk_object_ref (GTK_OBJECT (standard_brush));
g_object_ref (G_OBJECT (standard_brush));
gtk_object_ref (GTK_OBJECT (standard_brush));
gtk_object_sink (GTK_OBJECT (standard_brush));
}
......
......@@ -167,7 +167,7 @@ gimp_brush_pipe_destroy (GtkObject *object)
for (i = 0; i < pipe->nbrushes; i++)
if (pipe->brushes[i])
gtk_object_unref (GTK_OBJECT (pipe->brushes[i]));
g_object_unref (G_OBJECT (pipe->brushes[i]));
g_free (pipe->brushes);
g_free (pipe->select);
......
......@@ -167,7 +167,7 @@ gimp_brush_pipe_destroy (GtkObject *object)
for (i = 0; i < pipe->nbrushes; i++)
if (pipe->brushes[i])
gtk_object_unref (GTK_OBJECT (pipe->brushes[i]));
g_object_unref (G_OBJECT (pipe->brushes[i]));
g_free (pipe->brushes);
g_free (pipe->select);
......
......@@ -364,12 +364,12 @@ gimp_container_remove (GimpContainer *container,
}
}
gtk_object_ref (GTK_OBJECT (object));
g_object_ref (G_OBJECT (object));
switch (container->policy)
{
case GIMP_CONTAINER_POLICY_STRONG:
gtk_object_unref (GTK_OBJECT (object));
g_object_unref (G_OBJECT (object));
break;
case GIMP_CONTAINER_POLICY_WEAK:
......@@ -382,10 +382,10 @@ gimp_container_remove (GimpContainer *container,
container->num_children--;
g_signal_emit (GTK_OBJECT (container), container_signals[REMOVE], 0,
g_signal_emit (G_OBJECT (container), container_signals[REMOVE], 0,
object);
gtk_object_unref (GTK_OBJECT (object));
g_object_unref (G_OBJECT (object));
return TRUE;
}
......
......@@ -554,7 +554,7 @@ gimp_context_destroy (GtkObject *object)
if (context->tool_info)
{
gtk_object_unref (GTK_OBJECT (context->tool_info));
g_object_unref (G_OBJECT (context->tool_info));
context->tool_info = NULL;
}
......@@ -566,7 +566,7 @@ gimp_context_destroy (GtkObject *object)
if (context->brush)
{
gtk_object_unref (GTK_OBJECT (context->brush));
g_object_unref (G_OBJECT (context->brush));
context->brush = NULL;
}
......@@ -578,7 +578,7 @@ gimp_context_destroy (GtkObject *object)
if (context->pattern)
{
gtk_object_unref (GTK_OBJECT (context->pattern));
g_object_unref (G_OBJECT (context->pattern));
context->pattern = NULL;
}
......@@ -590,7 +590,7 @@ gimp_context_destroy (GtkObject *object)
if (context->gradient)
{
gtk_object_unref (GTK_OBJECT (context->gradient));
g_object_unref (G_OBJECT (context->gradient));
context->gradient = NULL;
}
......@@ -602,7 +602,7 @@ gimp_context_destroy (GtkObject *object)
if (context->palette)
{
gtk_object_unref (GTK_OBJECT (context->palette));
g_object_unref (G_OBJECT (context->palette));
context->palette = NULL;
}
......@@ -614,7 +614,7 @@ gimp_context_destroy (GtkObject *object)
if (context->buffer)
{
gtk_object_unref (GTK_OBJECT (context->buffer));
g_object_unref (G_OBJECT (context->buffer));
context->buffer = NULL;
}
......
......@@ -103,7 +103,7 @@ gimp_data_factory_destroy (GtkObject *object)
if (factory->container)
{
gtk_object_unref (GTK_OBJECT (factory->container));
g_object_unref (G_OBJECT (factory->container));
factory->container = NULL;
}
......
......@@ -56,7 +56,7 @@ gimp_parasites_exit (Gimp *gimp)
if (gimp->parasites)
{
gtk_object_unref (GTK_OBJECT (gimp->parasites));
g_object_unref (G_OBJECT (gimp->parasites));
gimp->parasites = NULL;
}
}
......
......@@ -132,8 +132,8 @@ dialogs_init (Gimp *gimp)
void
dialogs_exit (Gimp *gimp)
{
gtk_object_unref (GTK_OBJECT (global_dialog_factory));
gtk_object_unref (GTK_OBJECT (global_dock_factory));
g_object_unref (G_OBJECT (global_dialog_factory));
g_object_unref (G_OBJECT (global_dock_factory));
global_dialog_factory = NULL;
global_dock_factory = NULL;
......
......@@ -667,7 +667,7 @@ file_open_genbutton_callback (GtkWidget *widget,
}
set_preview (full_filename, RGBbuf, RGBbuf_w, RGBbuf_h);
gtk_object_unref (GTK_OBJECT (gimage_to_be_thumbed));
g_object_unref (G_OBJECT (gimage_to_be_thumbed));
if (RGBbuf)
g_free (RGBbuf);
......
......@@ -800,9 +800,7 @@ static void
browser_destroy_callback (GtkWidget *widget,
gpointer data)
{
g_signal_handlers_disconnect_matched (G_OBJECT (modules),
G_SIGNAL_MATCH_DATA,
0, 0, 0, NULL, data);
g_signal_handlers_disconnect_by_data (G_OBJECT (modules), data);
gimp_container_remove_handler (modules, modules_handler_id);
g_free (data);
}
......
......@@ -117,12 +117,12 @@ brush_editor_new (Gimp *gimp)
gtk_box_pack_start (GTK_BOX (vbox), brush_editor->name, FALSE, FALSE, 0);
gtk_widget_show (brush_editor->name);
gtk_signal_connect (GTK_OBJECT (brush_editor->name), "activate",
GTK_SIGNAL_FUNC (brush_editor_name_activate),
brush_editor);
gtk_signal_connect (GTK_OBJECT (brush_editor->name), "focus_out_event",
GTK_SIGNAL_FUNC (brush_editor_name_focus_out),
brush_editor);
g_signal_connect (G_OBJECT (brush_editor->name), "activate",
G_CALLBACK (brush_editor_name_activate),
brush_editor);
g_signal_connect (G_OBJECT (brush_editor->name), "focus_out_event",
G_CALLBACK (brush_editor_name_focus_out),
brush_editor);
/* brush's preview widget w/frame */
brush_editor->frame = gtk_frame_new (NULL);
......@@ -137,7 +137,7 @@ brush_editor_new (Gimp *gimp)
gtk_preview_set_expand (GTK_PREVIEW (brush_editor->preview), TRUE);
gtk_signal_connect_after (GTK_OBJECT (brush_editor->frame), "size_allocate",
GTK_SIGNAL_FUNC (brush_editor_preview_resize),
G_CALLBACK (brush_editor_preview_resize),
brush_editor);
gtk_container_add (GTK_CONTAINER (brush_editor->frame), brush_editor->preview);
......@@ -162,9 +162,9 @@ brush_editor_new (Gimp *gimp)
slider = gtk_hscale_new (brush_editor->radius_data);
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (brush_editor->radius_data), "value_changed",
GTK_SIGNAL_FUNC (brush_editor_update_brush),
brush_editor);
g_signal_connect (G_OBJECT (brush_editor->radius_data), "value_changed",
G_CALLBACK (brush_editor_update_brush),
brush_editor);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Radius:"), 1.0, 1.0,
slider, 1, FALSE);
......@@ -175,9 +175,9 @@ brush_editor_new (Gimp *gimp)
slider = gtk_hscale_new (brush_editor->hardness_data);
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (brush_editor->hardness_data), "value_changed",
GTK_SIGNAL_FUNC (brush_editor_update_brush),
brush_editor);
g_signal_connect (G_OBJECT (brush_editor->hardness_data), "value_changed",
G_CALLBACK (brush_editor_update_brush),
brush_editor);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Hardness:"), 1.0, 1.0,
slider, 1, FALSE);
......@@ -188,10 +188,9 @@ brush_editor_new (Gimp *gimp)
slider = gtk_hscale_new (brush_editor->aspect_ratio_data);
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (brush_editor->aspect_ratio_data),
"value_changed",
GTK_SIGNAL_FUNC (brush_editor_update_brush),
brush_editor);
g_signal_connect (G_OBJECT (brush_editor->aspect_ratio_data),"value_changed",
G_CALLBACK (brush_editor_update_brush),
brush_editor);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
_("Aspect Ratio:"), 1.0, 1.0,
slider, 1, FALSE);
......@@ -202,9 +201,9 @@ brush_editor_new (Gimp *gimp)
slider = gtk_hscale_new (brush_editor->angle_data);
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
gtk_signal_connect (GTK_OBJECT (brush_editor->angle_data), "value_changed",
GTK_SIGNAL_FUNC (brush_editor_update_brush),
brush_editor);
g_signal_connect (G_OBJECT (brush_editor->angle_data), "value_changed",
G_CALLBACK (brush_editor_update_brush),
brush_editor);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Angle:"), 1.0, 1.0,
slider, 1, FALSE);
......@@ -232,10 +231,9 @@ brush_editor_set_brush (BrushEditor *brush_editor,
if (brush_editor->brush)
{
gtk_signal_disconnect_by_data (GTK_OBJECT (brush_editor->brush),
brush_editor);
gtk_object_unref (GTK_OBJECT (brush_editor->brush));
g_signal_handlers_disconnect_by_data (G_OBJECT (brush_editor->brush),
brush_editor);
g_object_unref (G_OBJECT (brush_editor->brush));
brush_editor->brush = NULL;
}
......@@ -249,12 +247,12 @@ brush_editor_set_brush (BrushEditor *brush_editor,
brush = GIMP_BRUSH_GENERATED (gbrush);
gtk_signal_connect (GTK_OBJECT (brush), "invalidate_preview",
GTK_SIGNAL_FUNC (brush_editor_brush_dirty),
brush_editor);
gtk_signal_connect (GTK_OBJECT (brush), "name_changed",
GTK_SIGNAL_FUNC (brush_editor_brush_name_changed),
brush_editor);
g_signal_connect (G_OBJECT (brush), "invalidate_preview",
G_CALLBACK (brush_editor_brush_dirty),
brush_editor);
g_signal_connect (G_OBJECT (brush), "name_changed",
G_CALLBACK (brush_editor_brush_name_changed),
brush_editor);
gtk_adjustment_set_value (GTK_ADJUSTMENT (brush_editor->radius_data),
gimp_brush_generated_get_radius (brush));
......@@ -268,7 +266,7 @@ brush_editor_set_brush (BrushEditor *brush_editor,
gimp_object_get_name (GIMP_OBJECT (gbrush)));
brush_editor->brush = brush;
gtk_object_ref (GTK_OBJECT (brush_editor->brush));
g_object_ref (G_OBJECT (brush_editor->brush));
brush_editor_brush_dirty (GIMP_BRUSH (brush), brush_editor);
......
......@@ -302,12 +302,12 @@ brush_select_free (BrushSelect *bsp)
/* remove from active list */
brush_active_dialogs = g_slist_remove (brush_active_dialogs, bsp);
gtk_signal_disconnect_by_data (GTK_OBJECT (bsp->context), bsp);
g_signal_handlers_disconnect_by_data (G_OBJECT (bsp->context), bsp);
if (bsp->callback_name)
{
g_free (bsp->callback_name);
gtk_object_unref (GTK_OBJECT (bsp->context));
g_object_unref (G_OBJECT (bsp->context));
}
g_free (bsp);
......
......@@ -132,8 +132,8 @@ dialogs_init (Gimp *gimp)
void
dialogs_exit (Gimp *gimp)
{
gtk_object_unref (GTK_OBJECT (global_dialog_factory));
gtk_object_unref (GTK_OBJECT (global_dock_factory));
g_object_unref (G_OBJECT (global_dialog_factory));
g_object_unref (G_OBJECT (global_dock_factory));
global_dialog_factory = NULL;
global_dock_factory = NULL;
......
......@@ -667,7 +667,7 @@ file_open_genbutton_callback (GtkWidget *widget,
}
set_preview (full_filename, RGBbuf, RGBbuf_w, RGBbuf_h);
gtk_object_unref (GTK_OBJECT (gimage_to_be_thumbed));
g_object_unref (G_OBJECT (gimage_to_be_thumbed));
if (RGBbuf)
g_free (RGBbuf);
......
......@@ -185,12 +185,12 @@ gradient_select_free (GradientSelect *gsp)
/* remove from active list */
gradient_active_dialogs = g_slist_remove (gradient_active_dialogs, gsp);
gtk_signal_disconnect_by_data (GTK_OBJECT (gsp->context), gsp);
g_signal_handlers_disconnect_by_data (G_OBJECT (gsp->context), gsp);
if (gsp->callback_name)
{
g_free (gsp->callback_name);
gtk_object_unref (GTK_OBJECT (gsp->context));
g_object_unref (G_OBJECT (gsp->context));
}
g_free (gsp);
......
......@@ -132,23 +132,24 @@ gradients_save_as_pov_query (GimpContainerEditor *editor)
gtk_container_set_border_width (GTK_CONTAINER (filesel), 2);
gtk_container_set_border_width (GTK_CONTAINER (filesel->button_area), 2);
gtk_signal_connect (GTK_OBJECT (filesel->ok_button), "clicked",
GTK_SIGNAL_FUNC (gradients_save_as_pov_ok_callback),
gradient);
g_signal_connect (G_OBJECT (filesel->ok_button), "clicked",
G_CALLBACK (gradients_save_as_pov_ok_callback),
gradient);
gtk_signal_connect_object (GTK_OBJECT (filesel->cancel_button), "clicked",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (filesel));
g_signal_connect_swapped (G_OBJECT (filesel->cancel_button), "clicked",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
filesel);
gtk_signal_connect_object (GTK_OBJECT (filesel), "delete_event",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (filesel));
g_signal_connect_swapped (G_OBJECT (filesel), "delete_event",
G_CALLBACK (gtk_widget_destroy),
filesel);
gtk_object_ref (GTK_OBJECT (gradient));
g_object_ref (G_OBJECT (gradient));
gtk_signal_connect_object (GTK_OBJECT (filesel), "destroy",
GTK_SIGNAL_FUNC (gtk_object_unref),
GTK_OBJECT (gradient));
g_signal_connect_object (G_OBJECT (filesel), "destroy",
G_CALLBACK (g_object_unref),
G_OBJECT (gradient),
G_CONNECT_SWAPPED);
/* Connect the "F1" help key */
gimp_help_connect_help_accel (GTK_WIDGET (filesel), gimp_standard_help_func,
......
......@@ -1523,7 +1523,7 @@ menus_create_item_from_full_path (GimpItemFactoryEntry *entry,
return;
}
gtk_object_set_data (GTK_OBJECT (item_factory), "textdomain", domain_name);
g_object_set_data (G_OBJECT (item_factory), "textdomain", domain_name);
while (*path != '>')
path++;
......@@ -1571,9 +1571,9 @@ menus_create_branches (GtkItemFactory *item_factory,
};
branch_entry.entry.path = tearoff_path->str;
gtk_object_set_data (GTK_OBJECT (item_factory), "complete", path);
g_object_set_data (G_OBJECT (item_factory), "complete", path);
menus_create_item (item_factory, &branch_entry, NULL, 2, TRUE, FALSE);
gtk_object_remove_data (GTK_OBJECT (item_factory), "complete");
g_object_set_data (G_OBJECT (item_factory), "complete", NULL);
}
g_string_append (tearoff_path, "/tearoff1");
......@@ -1932,18 +1932,18 @@ menus_quit (void)
if (menus_initialized)
{
gtk_object_unref (GTK_OBJECT (toolbox_factory));
gtk_object_unref (GTK_OBJECT (image_factory));
gtk_object_unref (GTK_OBJECT (load_factory));
gtk_object_unref (GTK_OBJECT (save_factory));
gtk_object_unref (GTK_OBJECT (layers_factory));
gtk_object_unref (GTK_OBJECT (channels_factory));
gtk_object_unref (GTK_OBJECT (paths_factory));