Commit 1a72ab25 authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford

Fixed some braindeadness spotted by Jamie Strachan <frostfreek@yahoo.com>.

Fri Mar 16 11:38:42 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_set_model): Fixed some
	braindeadness spotted by Jamie Strachan <frostfreek@yahoo.com>.
parent bd51a589
Fri Mar 16 11:38:42 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_set_model): Fixed some
braindeadness spotted by Jamie Strachan <frostfreek@yahoo.com>.
2001-03-16 Alexander Larsson <alexl@redhat.com>
* gdk/x11/gdkgeometry-x11.c (_gdk_window_process_expose):
......
Fri Mar 16 11:38:42 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_set_model): Fixed some
braindeadness spotted by Jamie Strachan <frostfreek@yahoo.com>.
2001-03-16 Alexander Larsson <alexl@redhat.com>
* gdk/x11/gdkgeometry-x11.c (_gdk_window_process_expose):
......
Fri Mar 16 11:38:42 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_set_model): Fixed some
braindeadness spotted by Jamie Strachan <frostfreek@yahoo.com>.
2001-03-16 Alexander Larsson <alexl@redhat.com>
* gdk/x11/gdkgeometry-x11.c (_gdk_window_process_expose):
......
Fri Mar 16 11:38:42 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_set_model): Fixed some
braindeadness spotted by Jamie Strachan <frostfreek@yahoo.com>.
2001-03-16 Alexander Larsson <alexl@redhat.com>
* gdk/x11/gdkgeometry-x11.c (_gdk_window_process_expose):
......
Fri Mar 16 11:38:42 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_set_model): Fixed some
braindeadness spotted by Jamie Strachan <frostfreek@yahoo.com>.
2001-03-16 Alexander Larsson <alexl@redhat.com>
* gdk/x11/gdkgeometry-x11.c (_gdk_window_process_expose):
......
Fri Mar 16 11:38:42 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_set_model): Fixed some
braindeadness spotted by Jamie Strachan <frostfreek@yahoo.com>.
2001-03-16 Alexander Larsson <alexl@redhat.com>
* gdk/x11/gdkgeometry-x11.c (_gdk_window_process_expose):
......
Fri Mar 16 11:38:42 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_set_model): Fixed some
braindeadness spotted by Jamie Strachan <frostfreek@yahoo.com>.
2001-03-16 Alexander Larsson <alexl@redhat.com>
* gdk/x11/gdkgeometry-x11.c (_gdk_window_process_expose):
......
......@@ -454,7 +454,8 @@ gtk_tree_view_destroy (GtkObject *object)
GtkTreeView *tree_view = (GtkTreeView *) object;
GList *list;
g_object_unref (G_OBJECT (tree_view->priv->model));
if (tree_view->priv->model)
g_object_unref (G_OBJECT (tree_view->priv->model));
gtk_tree_view_unref_tree (tree_view, tree_view->priv->tree);
for (list = tree_view->priv->columns; list; list = list->next)
......@@ -3827,6 +3828,9 @@ gtk_tree_view_set_model (GtkTreeView *tree_view,
g_return_if_fail (tree_view != NULL);
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
if (model != NULL)
g_object_ref (model);
if (tree_view->priv->model != NULL)
{
if (GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_MODEL_SETUP))
......@@ -3854,10 +3858,11 @@ gtk_tree_view_set_model (GtkTreeView *tree_view,
gtk_tree_row_reference_free (tree_view->priv->drag_dest_row);
GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_MODEL_SETUP);
g_object_unref (tree_view->priv->model);
}
tree_view->priv->model = model;
g_object_ref (model);
if (model == NULL)
{
tree_view->priv->tree = NULL;
......
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