Commit 0c42eed2 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Ref and sink the column. (gtk_combo_box_menu_destroy): Unref the column.

Sun Aug  8 23:36:55 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_menu_setup): Ref
	and sink the column.
	(gtk_combo_box_menu_destroy): Unref the column.

Sun Aug  8 23:35:00 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkdnd.c (gtk_drag_source_add_text_targets):
	(gtk_drag_dest_add_text_targets): Don't leak a reference
	to the target list.
parent b04a72a5
Sun Aug 8 23:36:55 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_menu_setup): Ref
and sink the column.
(gtk_combo_box_menu_destroy): Unref the column.
Sun Aug 8 23:35:00 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkdnd.c (gtk_drag_source_add_text_targets):
(gtk_drag_dest_add_text_targets): Don't leak a reference
to the target list.
Sun Aug 8 22:52:26 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (find_menu_by_path): Don't stumble over
......
Sun Aug 8 23:36:55 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_menu_setup): Ref
and sink the column.
(gtk_combo_box_menu_destroy): Unref the column.
Sun Aug 8 23:35:00 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkdnd.c (gtk_drag_source_add_text_targets):
(gtk_drag_dest_add_text_targets): Don't leak a reference
to the target list.
Sun Aug 8 22:52:26 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (find_menu_by_path): Don't stumble over
......
Sun Aug 8 23:36:55 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_menu_setup): Ref
and sink the column.
(gtk_combo_box_menu_destroy): Unref the column.
Sun Aug 8 23:35:00 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkdnd.c (gtk_drag_source_add_text_targets):
(gtk_drag_dest_add_text_targets): Don't leak a reference
to the target list.
Sun Aug 8 22:52:26 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (find_menu_by_path): Don't stumble over
......
Sun Aug 8 23:36:55 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_menu_setup): Ref
and sink the column.
(gtk_combo_box_menu_destroy): Unref the column.
Sun Aug 8 23:35:00 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkdnd.c (gtk_drag_source_add_text_targets):
(gtk_drag_dest_add_text_targets): Don't leak a reference
to the target list.
Sun Aug 8 22:52:26 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (find_menu_by_path): Don't stumble over
......
......@@ -2279,6 +2279,8 @@ gtk_combo_box_menu_setup (GtkComboBox *combo_box,
/* the column is needed in tree_column_row_is_sensitive() */
combo_box->priv->column = gtk_tree_view_column_new ();
g_object_ref (combo_box->priv->column);
gtk_object_sink (GTK_OBJECT (combo_box->priv->column));
gtk_combo_box_sync_cells (combo_box,
GTK_CELL_LAYOUT (combo_box->priv->column));
}
......@@ -2427,6 +2429,9 @@ gtk_combo_box_menu_destroy (GtkComboBox *combo_box)
combo_box->priv->arrow = NULL;
combo_box->priv->separator = NULL;
g_object_unref (combo_box->priv->column);
combo_box->priv->column = NULL;
/* changing the popup window will unref the menu and the children */
}
......@@ -4301,6 +4306,7 @@ gtk_combo_box_set_active_iter (GtkComboBox *combo_box,
path = gtk_tree_model_get_path (gtk_combo_box_get_model (combo_box), iter);
gtk_combo_box_set_active_internal (combo_box, path);
gtk_tree_path_free (path);
}
/**
......
......@@ -1039,10 +1039,13 @@ gtk_drag_dest_add_text_targets (GtkWidget *widget)
GtkTargetList *target_list;
target_list = gtk_drag_dest_get_target_list (widget);
if (!target_list)
if (target_list)
gtk_target_list_ref (target_list);
else
target_list = gtk_target_list_new (NULL, 0);
gtk_target_list_add_text_targets (target_list);
gtk_drag_dest_set_target_list (widget, target_list);
gtk_target_list_unref (target_list);
}
/*************************************************************
......@@ -2203,10 +2206,13 @@ gtk_drag_source_add_text_targets (GtkWidget *widget)
GtkTargetList *target_list;
target_list = gtk_drag_source_get_target_list (widget);
if (!target_list)
if (target_list)
gtk_target_list_ref (target_list);
else
target_list = gtk_target_list_new (NULL, 0);
gtk_target_list_add_text_targets (target_list);
gtk_drag_source_set_target_list (widget, target_list);
gtk_target_list_unref (target_list);
}
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