Commit ef084e87 authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford

removed signals. Moved to inherit from GObject instead of GtkObject.

Wed Feb 21 15:41:34 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreestore.c: removed signals.  Moved to inherit from
	GObject instead of GtkObject.

	* gtk/gtkliststore.c: ditto.

	* gtk/gtktreemodelsort.c: ditto.

	* gtk/gtktreemodel.c (gtk_tree_model_base_init): moved signals to
	GtkTreeModelIface, instead of in each model.
parent 0ebf7690
Wed Feb 21 15:41:34 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c: removed signals. Moved to inherit from
GObject instead of GtkObject.
* gtk/gtkliststore.c: ditto.
* gtk/gtktreemodelsort.c: ditto.
* gtk/gtktreemodel.c (gtk_tree_model_base_init): moved signals to
GtkTreeModelIface, instead of in each model.
2001-02-21 Havoc Pennington <hp@redhat.com> 2001-02-21 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor): * gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor):
......
Wed Feb 21 15:41:34 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c: removed signals. Moved to inherit from
GObject instead of GtkObject.
* gtk/gtkliststore.c: ditto.
* gtk/gtktreemodelsort.c: ditto.
* gtk/gtktreemodel.c (gtk_tree_model_base_init): moved signals to
GtkTreeModelIface, instead of in each model.
2001-02-21 Havoc Pennington <hp@redhat.com> 2001-02-21 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor): * gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor):
......
Wed Feb 21 15:41:34 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c: removed signals. Moved to inherit from
GObject instead of GtkObject.
* gtk/gtkliststore.c: ditto.
* gtk/gtktreemodelsort.c: ditto.
* gtk/gtktreemodel.c (gtk_tree_model_base_init): moved signals to
GtkTreeModelIface, instead of in each model.
2001-02-21 Havoc Pennington <hp@redhat.com> 2001-02-21 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor): * gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor):
......
Wed Feb 21 15:41:34 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c: removed signals. Moved to inherit from
GObject instead of GtkObject.
* gtk/gtkliststore.c: ditto.
* gtk/gtktreemodelsort.c: ditto.
* gtk/gtktreemodel.c (gtk_tree_model_base_init): moved signals to
GtkTreeModelIface, instead of in each model.
2001-02-21 Havoc Pennington <hp@redhat.com> 2001-02-21 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor): * gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor):
......
Wed Feb 21 15:41:34 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c: removed signals. Moved to inherit from
GObject instead of GtkObject.
* gtk/gtkliststore.c: ditto.
* gtk/gtktreemodelsort.c: ditto.
* gtk/gtktreemodel.c (gtk_tree_model_base_init): moved signals to
GtkTreeModelIface, instead of in each model.
2001-02-21 Havoc Pennington <hp@redhat.com> 2001-02-21 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor): * gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor):
......
Wed Feb 21 15:41:34 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c: removed signals. Moved to inherit from
GObject instead of GtkObject.
* gtk/gtkliststore.c: ditto.
* gtk/gtktreemodelsort.c: ditto.
* gtk/gtktreemodel.c (gtk_tree_model_base_init): moved signals to
GtkTreeModelIface, instead of in each model.
2001-02-21 Havoc Pennington <hp@redhat.com> 2001-02-21 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor): * gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor):
......
Wed Feb 21 15:41:34 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c: removed signals. Moved to inherit from
GObject instead of GtkObject.
* gtk/gtkliststore.c: ditto.
* gtk/gtktreemodelsort.c: ditto.
* gtk/gtktreemodel.c (gtk_tree_model_base_init): moved signals to
GtkTreeModelIface, instead of in each model.
2001-02-21 Havoc Pennington <hp@redhat.com> 2001-02-21 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor): * gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor):
......
...@@ -27,16 +27,6 @@ ...@@ -27,16 +27,6 @@
#define G_SLIST(x) ((GSList *) x) #define G_SLIST(x) ((GSList *) x)
enum {
CHANGED,
INSERTED,
CHILD_TOGGLED,
DELETED,
LAST_SIGNAL
};
static guint list_store_signals[LAST_SIGNAL] = { 0 };
static void gtk_list_store_init (GtkListStore *list_store); static void gtk_list_store_init (GtkListStore *list_store);
static void gtk_list_store_class_init (GtkListStoreClass *class); static void gtk_list_store_class_init (GtkListStoreClass *class);
static void gtk_list_store_tree_model_init (GtkTreeModelIface *iface); static void gtk_list_store_tree_model_init (GtkTreeModelIface *iface);
...@@ -98,7 +88,7 @@ validate_list_store (GtkListStore *list_store) ...@@ -98,7 +88,7 @@ validate_list_store (GtkListStore *list_store)
GtkType GtkType
gtk_list_store_get_type (void) gtk_list_store_get_type (void)
{ {
static GtkType list_store_type = 0; static GType list_store_type = 0;
if (!list_store_type) if (!list_store_type)
{ {
...@@ -136,7 +126,7 @@ gtk_list_store_get_type (void) ...@@ -136,7 +126,7 @@ gtk_list_store_get_type (void)
NULL NULL
}; };
list_store_type = g_type_register_static (GTK_TYPE_OBJECT, "GtkListStore", &list_store_info, 0); list_store_type = g_type_register_static (G_TYPE_OBJECT, "GtkListStore", &list_store_info, 0);
g_type_add_interface_static (list_store_type, g_type_add_interface_static (list_store_type,
GTK_TYPE_TREE_MODEL, GTK_TYPE_TREE_MODEL,
&tree_model_info); &tree_model_info);
...@@ -154,45 +144,9 @@ gtk_list_store_get_type (void) ...@@ -154,45 +144,9 @@ gtk_list_store_get_type (void)
static void static void
gtk_list_store_class_init (GtkListStoreClass *class) gtk_list_store_class_init (GtkListStoreClass *class)
{ {
GtkObjectClass *object_class; GObjectClass *object_class;
object_class = (GtkObjectClass*) class; object_class = (GObjectClass*) class;
list_store_signals[CHANGED] =
gtk_signal_new ("changed",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkListStoreClass, changed),
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
GTK_TYPE_TREE_PATH,
GTK_TYPE_TREE_ITER);
list_store_signals[INSERTED] =
gtk_signal_new ("inserted",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkListStoreClass, inserted),
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
GTK_TYPE_TREE_PATH,
GTK_TYPE_TREE_ITER);
list_store_signals[CHILD_TOGGLED] =
gtk_signal_new ("child_toggled",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkListStoreClass, child_toggled),
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
GTK_TYPE_TREE_PATH,
GTK_TYPE_TREE_ITER);
list_store_signals[DELETED] =
gtk_signal_new ("deleted",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkListStoreClass, deleted),
gtk_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
GTK_TYPE_TREE_PATH);
} }
static void static void
...@@ -250,7 +204,7 @@ gtk_list_store_init (GtkListStore *list_store) ...@@ -250,7 +204,7 @@ gtk_list_store_init (GtkListStore *list_store)
GtkListStore * GtkListStore *
gtk_list_store_new (void) gtk_list_store_new (void)
{ {
return GTK_LIST_STORE (gtk_type_new (gtk_list_store_get_type ())); return GTK_LIST_STORE (g_object_new (gtk_list_store_get_type (), NULL));
} }
/** /**
...@@ -583,9 +537,9 @@ gtk_list_store_set_cell (GtkListStore *list_store, ...@@ -583,9 +537,9 @@ gtk_list_store_set_cell (GtkListStore *list_store,
if (column == 0) if (column == 0)
{ {
_gtk_tree_data_list_value_to_node (list, value); _gtk_tree_data_list_value_to_node (list, value);
gtk_signal_emit_by_name (GTK_OBJECT (list_store), g_signal_emit_by_name (G_OBJECT (list_store),
"changed", "changed",
NULL, iter); NULL, iter);
return; return;
} }
...@@ -613,7 +567,7 @@ gtk_list_store_set_cell (GtkListStore *list_store, ...@@ -613,7 +567,7 @@ gtk_list_store_set_cell (GtkListStore *list_store,
column --; column --;
} }
_gtk_tree_data_list_value_to_node (list, value); _gtk_tree_data_list_value_to_node (list, value);
gtk_signal_emit_by_name (GTK_OBJECT (list_store), g_signal_emit_by_name (G_OBJECT (list_store),
"changed", "changed",
NULL, iter); NULL, iter);
} }
...@@ -790,7 +744,7 @@ gtk_list_store_remove (GtkListStore *list_store, ...@@ -790,7 +744,7 @@ gtk_list_store_remove (GtkListStore *list_store,
validate_list_store (list_store); validate_list_store (list_store);
gtk_signal_emit_by_name (GTK_OBJECT (list_store), g_signal_emit_by_name (G_OBJECT (list_store),
"deleted", "deleted",
path); path);
gtk_tree_path_free (path); gtk_tree_path_free (path);
...@@ -865,7 +819,7 @@ gtk_list_store_insert (GtkListStore *list_store, ...@@ -865,7 +819,7 @@ gtk_list_store_insert (GtkListStore *list_store,
path = gtk_tree_path_new (); path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, position); gtk_tree_path_append_index (path, position);
gtk_signal_emit_by_name (GTK_OBJECT (list_store), g_signal_emit_by_name (G_OBJECT (list_store),
"inserted", "inserted",
path, iter); path, iter);
gtk_tree_path_free (path); gtk_tree_path_free (path);
...@@ -946,7 +900,7 @@ gtk_list_store_insert_before (GtkListStore *list_store, ...@@ -946,7 +900,7 @@ gtk_list_store_insert_before (GtkListStore *list_store,
path = gtk_tree_path_new (); path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, i); gtk_tree_path_append_index (path, i);
gtk_signal_emit_by_name (GTK_OBJECT (list_store), g_signal_emit_by_name (G_OBJECT (list_store),
"inserted", "inserted",
path, iter); path, iter);
gtk_tree_path_free (path); gtk_tree_path_free (path);
...@@ -1000,7 +954,7 @@ gtk_list_store_insert_after (GtkListStore *list_store, ...@@ -1000,7 +954,7 @@ gtk_list_store_insert_after (GtkListStore *list_store,
path = gtk_tree_path_new (); path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, i); gtk_tree_path_append_index (path, i);
gtk_signal_emit_by_name (GTK_OBJECT (list_store), g_signal_emit_by_name (G_OBJECT (list_store),
"inserted", "inserted",
path, iter); path, iter);
gtk_tree_path_free (path); gtk_tree_path_free (path);
...@@ -1041,7 +995,7 @@ gtk_list_store_prepend (GtkListStore *list_store, ...@@ -1041,7 +995,7 @@ gtk_list_store_prepend (GtkListStore *list_store,
path = gtk_tree_path_new (); path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, 0); gtk_tree_path_append_index (path, 0);
gtk_signal_emit_by_name (GTK_OBJECT (list_store), g_signal_emit_by_name (G_OBJECT (list_store),
"inserted", "inserted",
path, iter); path, iter);
gtk_tree_path_free (path); gtk_tree_path_free (path);
...@@ -1084,7 +1038,7 @@ gtk_list_store_append (GtkListStore *list_store, ...@@ -1084,7 +1038,7 @@ gtk_list_store_append (GtkListStore *list_store,
path = gtk_tree_path_new (); path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, i); gtk_tree_path_append_index (path, i);
gtk_signal_emit_by_name (GTK_OBJECT (list_store), g_signal_emit_by_name (G_OBJECT (list_store),
"inserted", "inserted",
path, iter); path, iter);
gtk_tree_path_free (path); gtk_tree_path_free (path);
...@@ -1230,7 +1184,7 @@ gtk_list_store_drag_data_received (GtkTreeDragDest *drag_dest, ...@@ -1230,7 +1184,7 @@ gtk_list_store_drag_data_received (GtkTreeDragDest *drag_dest,
G_SLIST (dest_iter.user_data)->data = copy_head; G_SLIST (dest_iter.user_data)->data = copy_head;
gtk_signal_emit_by_name (GTK_OBJECT (tree_model), g_signal_emit_by_name (G_OBJECT (tree_model),
"changed", "changed",
NULL, &dest_iter); NULL, &dest_iter);
} }
......
...@@ -37,7 +37,7 @@ typedef struct _GtkListStoreClass GtkListStoreClass; ...@@ -37,7 +37,7 @@ typedef struct _GtkListStoreClass GtkListStoreClass;
struct _GtkListStore struct _GtkListStore
{ {
GtkObject parent; GObject parent;
/*< private >*/ /*< private >*/
gint stamp; gint stamp;
...@@ -50,7 +50,7 @@ struct _GtkListStore ...@@ -50,7 +50,7 @@ struct _GtkListStore
struct _GtkListStoreClass struct _GtkListStoreClass
{ {
GtkObjectClass parent_class; GObjectClass parent_class;
/* signals */ /* signals */
/* Will be moved into the GtkTreeModelIface eventually */ /* Will be moved into the GtkTreeModelIface eventually */
......
...@@ -66,22 +66,21 @@ static void ...@@ -66,22 +66,21 @@ static void
gtk_tree_model_base_init (gpointer g_class) gtk_tree_model_base_init (gpointer g_class)
{ {
static gboolean initted = FALSE; static gboolean initted = FALSE;
#if 0
if (! initted) if (! initted)
{ {
g_signal_newc ("changed", g_signal_newc ("changed",
GTK_TYPE_TREE_MODEL, GTK_TYPE_TREE_MODEL,
G_SIGNAL_RUN_FIRST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkTreeModelIface, changed), G_STRUCT_OFFSET (GtkTreeModelIface, changed),
NULL, NULL,
gtk_marshal_VOID__BOXED_BOXED, gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2, G_TYPE_NONE, 2,
GTK_TYPE_TREE_PATH, GTK_TYPE_TREE_PATH,
GTK_TYPE_TREE_ITER); GTK_TYPE_TREE_ITER);
g_signal_newc ("inserted", g_signal_newc ("inserted",
GTK_TYPE_TREE_MODEL, GTK_TYPE_TREE_MODEL,
G_SIGNAL_RUN_FIRST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkTreeModelIface, inserted), G_STRUCT_OFFSET (GtkTreeModelIface, inserted),
NULL, NULL,
gtk_marshal_VOID__BOXED_BOXED, gtk_marshal_VOID__BOXED_BOXED,
...@@ -90,7 +89,7 @@ gtk_tree_model_base_init (gpointer g_class) ...@@ -90,7 +89,7 @@ gtk_tree_model_base_init (gpointer g_class)
GTK_TYPE_TREE_ITER); GTK_TYPE_TREE_ITER);
g_signal_newc ("child_toggled", g_signal_newc ("child_toggled",
GTK_TYPE_TREE_MODEL, GTK_TYPE_TREE_MODEL,
G_SIGNAL_RUN_FIRST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkTreeModelIface, child_toggled), G_STRUCT_OFFSET (GtkTreeModelIface, child_toggled),
NULL, NULL,
gtk_marshal_VOID__BOXED_BOXED, gtk_marshal_VOID__BOXED_BOXED,
...@@ -99,16 +98,14 @@ gtk_tree_model_base_init (gpointer g_class) ...@@ -99,16 +98,14 @@ gtk_tree_model_base_init (gpointer g_class)
GTK_TYPE_TREE_ITER); GTK_TYPE_TREE_ITER);
g_signal_newc ("deleted", g_signal_newc ("deleted",
GTK_TYPE_TREE_MODEL, GTK_TYPE_TREE_MODEL,
G_SIGNAL_RUN_FIRST, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkTreeModelIface, deleted), G_STRUCT_OFFSET (GtkTreeModelIface, deleted),
NULL, NULL,
gtk_marshal_VOID__BOXED_BOXED, gtk_marshal_VOID__BOXED,
G_TYPE_NONE, 1, G_TYPE_NONE, 1,
GTK_TYPE_TREE_PATH); GTK_TYPE_TREE_PATH);
initted = TRUE; initted = TRUE;
} }
#endif
} }
/** /**
......
...@@ -28,14 +28,6 @@ ...@@ -28,14 +28,6 @@
#include "gtksignal.h" #include "gtksignal.h"
#include <string.h> #include <string.h>
enum {
CHANGED,
INSERTED,
CHILD_TOGGLED,
DELETED,
LAST_SIGNAL
};
typedef struct _SortElt SortElt; typedef struct _SortElt SortElt;
struct _SortElt struct _SortElt
{ {
...@@ -54,8 +46,6 @@ struct _SortData ...@@ -54,8 +46,6 @@ struct _SortData
GValueCompareFunc func; GValueCompareFunc func;
}; };
static guint tree_model_sort_signals[LAST_SIGNAL] = { 0 };
#define get_array(e,t) ((GArray *)((e)->parent?(e)->parent->children:GTK_TREE_MODEL_SORT(t)->root)) #define get_array(e,t) ((GArray *)((e)->parent?(e)->parent->children:GTK_TREE_MODEL_SORT(t)->root))
...@@ -134,10 +124,10 @@ static gint g_value_int_compare_func (const GValue *a, ...@@ -134,10 +124,10 @@ static gint g_value_int_compare_func (const GValue *a,
GtkType GType
gtk_tree_model_sort_get_type (void) gtk_tree_model_sort_get_type (void)
{ {
static GtkType tree_model_sort_type = 0; static GType tree_model_sort_type = 0;
if (!tree_model_sort_type) if (!tree_model_sort_type)
{ {
...@@ -161,7 +151,7 @@ gtk_tree_model_sort_get_type (void) ...@@ -161,7 +151,7 @@ gtk_tree_model_sort_get_type (void)
NULL NULL
}; };
tree_model_sort_type = g_type_register_static (GTK_TYPE_OBJECT, "GtkTreeModelSort", &tree_model_sort_info, 0); tree_model_sort_type = g_type_register_static (G_TYPE_OBJECT, "GtkTreeModelSort", &tree_model_sort_info, 0);
g_type_add_interface_static (tree_model_sort_type, g_type_add_interface_static (tree_model_sort_type,
GTK_TYPE_TREE_MODEL, GTK_TYPE_TREE_MODEL,
&tree_model_info); &tree_model_info);
...@@ -178,42 +168,6 @@ gtk_tree_model_sort_class_init (GtkTreeModelSortClass *tree_model_sort_class) ...@@ -178,42 +168,6 @@ gtk_tree_model_sort_class_init (GtkTreeModelSortClass *tree_model_sort_class)
object_class = (GObjectClass *) tree_model_sort_class; object_class = (GObjectClass *) tree_model_sort_class;
object_class->finalize = gtk_tree_model_sort_finalize; object_class->finalize = gtk_tree_model_sort_finalize;
tree_model_sort_signals[CHANGED] =
gtk_signal_new ("changed",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkTreeModelSortClass, changed),
gtk_marshal_VOID__POINTER_POINTER,
GTK_TYPE_NONE, 2,
GTK_TYPE_POINTER,
GTK_TYPE_POINTER);
tree_model_sort_signals[INSERTED] =
gtk_signal_new ("inserted",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkTreeModelSortClass, inserted),
gtk_marshal_VOID__POINTER_POINTER,
GTK_TYPE_NONE, 2,
GTK_TYPE_POINTER,
GTK_TYPE_POINTER);
tree_model_sort_signals[CHILD_TOGGLED] =
gtk_signal_new ("child_toggled",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkTreeModelSortClass, child_toggled),
gtk_marshal_VOID__POINTER_POINTER,
GTK_TYPE_NONE, 2,
GTK_TYPE_POINTER,
GTK_TYPE_POINTER);
tree_model_sort_signals[DELETED] =
gtk_signal_new ("deleted",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkTreeModelSortClass, deleted),
gtk_marshal_VOID__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_POINTER);
} }
static void static void
...@@ -243,7 +197,7 @@ gtk_tree_model_sort_init (GtkTreeModelSort *tree_model_sort) ...@@ -243,7 +197,7 @@ gtk_tree_model_sort_init (GtkTreeModelSort *tree_model_sort)
GtkTreeModel * GtkTreeModel *
gtk_tree_model_sort_new (void) gtk_tree_model_sort_new (void)
{ {
return GTK_TREE_MODEL (gtk_type_new (gtk_tree_model_sort_get_type ())); return GTK_TREE_MODEL (g_object_new (gtk_tree_model_sort_get_type (), NULL));
} }
GtkTreeModel * GtkTreeModel *
...@@ -281,18 +235,14 @@ gtk_tree_model_sort_set_model (GtkTreeModelSort *tree_model_sort, ...@@ -281,18 +235,14 @@ gtk_tree_model_sort_set_model (GtkTreeModelSort *tree_model_sort,
if (tree_model_sort->child_model) if (tree_model_sort->child_model)
{ {
gtk_signal_disconnect_by_func (GTK_OBJECT (tree_model_sort->child_model), g_signal_handler_disconnect (G_OBJECT (tree_model_sort->child_model),
gtk_tree_model_sort_changed, tree_model_sort->changed_id);
tree_model_sort); g_signal_handler_disconnect (G_OBJECT (tree_model_sort->child_model),
gtk_signal_disconnect_by_func (GTK_OBJECT (tree_model_sort->child_model), tree_model_sort->inserted_id);
gtk_tree_model_sort_inserted, g_signal_handler_disconnect (G_OBJECT (tree_model_sort->child_model),
tree_model_sort); tree_model_sort->child_toggled_id);
gtk_signal_disconnect_by_func (GTK_OBJECT (tree_model_sort->child_model), g_signal_handler_disconnect (G_OBJECT (tree_model_sort->child_model),
gtk_tree_model_sort_child_toggled, tree_model_sort->deleted_id);
tree_model_sort);
gtk_signal_disconnect_by_func (GTK_OBJECT (tree_model_sort->child_model),
gtk_tree_model_sort_deleted,
tree_model_sort);
g_object_unref (G_OBJECT (tree_model_sort->child_model)); g_object_unref (G_OBJECT (tree_model_sort->child_model));
} }
...@@ -301,19 +251,23 @@ gtk_tree_model_sort_set_model (GtkTreeModelSort *tree_model_sort, ...@@ -301,19 +251,23 @@ gtk_tree_model_sort_set_model (GtkTreeModelSort *tree_model_sort,
if (child_model) if (child_model)
{ {
gtk_signal_connect (GTK_OBJECT (child_model), tree_model_sort->changed_id =
g_signal_connect (child_model,