Commit 55704fc7 authored by Manish Singh's avatar Manish Singh Committed by Manish Singh
Browse files

Deprecation cleanup

Mon Oct  7 11:59:33 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkliststore.[ch] gtk/gtktreedatalist.[ch] gtk/gtktreednd.c
        gtk/gtktreemodel.[ch] gtk/gtktreemodelsort.[ch]
        gtk/gtktreeselection.[ch] gtk/gtktreesortable.[ch]
        gtk/gtktreestore.[ch]: Deprecation cleanup
parent c1fff202
Mon Oct 7 11:59:33 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkliststore.[ch] gtk/gtktreedatalist.[ch] gtk/gtktreednd.c
gtk/gtktreemodel.[ch] gtk/gtktreemodelsort.[ch]
gtk/gtktreeselection.[ch] gtk/gtktreesortable.[ch]
gtk/gtktreestore.[ch]: Deprecation cleanup
Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkx.h: Fix some prototypes that had * gdk/x11/gdkx.h: Fix some prototypes that had
......
Mon Oct 7 11:59:33 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkliststore.[ch] gtk/gtktreedatalist.[ch] gtk/gtktreednd.c
gtk/gtktreemodel.[ch] gtk/gtktreemodelsort.[ch]
gtk/gtktreeselection.[ch] gtk/gtktreesortable.[ch]
gtk/gtktreestore.[ch]: Deprecation cleanup
Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkx.h: Fix some prototypes that had * gdk/x11/gdkx.h: Fix some prototypes that had
......
Mon Oct 7 11:59:33 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkliststore.[ch] gtk/gtktreedatalist.[ch] gtk/gtktreednd.c
gtk/gtktreemodel.[ch] gtk/gtktreemodelsort.[ch]
gtk/gtktreeselection.[ch] gtk/gtktreesortable.[ch]
gtk/gtktreestore.[ch]: Deprecation cleanup
Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkx.h: Fix some prototypes that had * gdk/x11/gdkx.h: Fix some prototypes that had
......
Mon Oct 7 11:59:33 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkliststore.[ch] gtk/gtktreedatalist.[ch] gtk/gtktreednd.c
gtk/gtktreemodel.[ch] gtk/gtktreemodelsort.[ch]
gtk/gtktreeselection.[ch] gtk/gtktreesortable.[ch]
gtk/gtktreestore.[ch]: Deprecation cleanup
Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkx.h: Fix some prototypes that had * gdk/x11/gdkx.h: Fix some prototypes that had
......
Mon Oct 7 11:59:33 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkliststore.[ch] gtk/gtktreedatalist.[ch] gtk/gtktreednd.c
gtk/gtktreemodel.[ch] gtk/gtktreemodelsort.[ch]
gtk/gtktreeselection.[ch] gtk/gtktreesortable.[ch]
gtk/gtktreestore.[ch]: Deprecation cleanup
Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkx.h: Fix some prototypes that had * gdk/x11/gdkx.h: Fix some prototypes that had
......
Mon Oct 7 11:59:33 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkliststore.[ch] gtk/gtktreedatalist.[ch] gtk/gtktreednd.c
gtk/gtktreemodel.[ch] gtk/gtktreemodelsort.[ch]
gtk/gtktreeselection.[ch] gtk/gtktreesortable.[ch]
gtk/gtktreestore.[ch]: Deprecation cleanup
Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 14:51:21 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkx.h: Fix some prototypes that had * gdk/x11/gdkx.h: Fix some prototypes that had
......
...@@ -18,12 +18,11 @@ ...@@ -18,12 +18,11 @@
*/ */
#include <string.h> #include <string.h>
#include <gobject/gvaluecollector.h>
#include "gtktreemodel.h" #include "gtktreemodel.h"
#include "gtkliststore.h" #include "gtkliststore.h"
#include "gtktreedatalist.h" #include "gtktreedatalist.h"
#include "gtksignal.h"
#include "gtktreednd.h" #include "gtktreednd.h"
#include <gobject/gvaluecollector.h>
#define G_SLIST(x) ((GSList *) x) #define G_SLIST(x) ((GSList *) x)
#define GTK_LIST_STORE_IS_SORTED(list) (GTK_LIST_STORE (list)->sort_column_id != -2) #define GTK_LIST_STORE_IS_SORTED(list) (GTK_LIST_STORE (list)->sort_column_id != -2)
...@@ -125,7 +124,7 @@ validate_list_store (GtkListStore *list_store) ...@@ -125,7 +124,7 @@ validate_list_store (GtkListStore *list_store)
} }
} }
GtkType GType
gtk_list_store_get_type (void) gtk_list_store_get_type (void)
{ {
static GType list_store_type = 0; static GType list_store_type = 0;
...@@ -173,7 +172,9 @@ gtk_list_store_get_type (void) ...@@ -173,7 +172,9 @@ gtk_list_store_get_type (void)
NULL NULL
}; };
list_store_type = g_type_register_static (G_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);
...@@ -277,7 +278,7 @@ gtk_list_store_new (gint n_columns, ...@@ -277,7 +278,7 @@ gtk_list_store_new (gint n_columns,
g_return_val_if_fail (n_columns > 0, NULL); g_return_val_if_fail (n_columns > 0, NULL);
retval = GTK_LIST_STORE (g_object_new (gtk_list_store_get_type (), NULL)); retval = g_object_new (GTK_TYPE_LIST_STORE, NULL);
gtk_list_store_set_n_columns (retval, n_columns); gtk_list_store_set_n_columns (retval, n_columns);
va_start (args, n_columns); va_start (args, n_columns);
...@@ -287,8 +288,9 @@ gtk_list_store_new (gint n_columns, ...@@ -287,8 +288,9 @@ gtk_list_store_new (gint n_columns,
GType type = va_arg (args, GType); GType type = va_arg (args, GType);
if (! _gtk_tree_data_list_check_type (type)) if (! _gtk_tree_data_list_check_type (type))
{ {
g_warning ("%s: Invalid type %s passed to gtk_list_store_new\n", G_STRLOC, g_type_name (type)); g_warning ("%s: Invalid type %s passed to gtk_list_store_new\n",
g_object_unref (G_OBJECT (retval)); G_STRLOC, g_type_name (type));
g_object_unref (retval);
return NULL; return NULL;
} }
...@@ -319,15 +321,16 @@ gtk_list_store_newv (gint n_columns, ...@@ -319,15 +321,16 @@ gtk_list_store_newv (gint n_columns,
g_return_val_if_fail (n_columns > 0, NULL); g_return_val_if_fail (n_columns > 0, NULL);
retval = GTK_LIST_STORE (g_object_new (gtk_list_store_get_type (), NULL)); retval = g_object_new (GTK_TYPE_LIST_STORE, NULL);
gtk_list_store_set_n_columns (retval, n_columns); gtk_list_store_set_n_columns (retval, n_columns);
for (i = 0; i < n_columns; i++) for (i = 0; i < n_columns; i++)
{ {
if (! _gtk_tree_data_list_check_type (types[i])) if (! _gtk_tree_data_list_check_type (types[i]))
{ {
g_warning ("%s: Invalid type %s passed to gtk_list_store_newv\n", G_STRLOC, g_type_name (types[i])); g_warning ("%s: Invalid type %s passed to gtk_list_store_newv\n",
g_object_unref (G_OBJECT (retval)); G_STRLOC, g_type_name (types[i]));
g_object_unref (retval);
return NULL; return NULL;
} }
...@@ -410,6 +413,7 @@ gtk_list_store_set_column_type (GtkListStore *list_store, ...@@ -410,6 +413,7 @@ gtk_list_store_set_column_type (GtkListStore *list_store,
{ {
g_return_if_fail (GTK_IS_LIST_STORE (list_store)); g_return_if_fail (GTK_IS_LIST_STORE (list_store));
g_return_if_fail (column >=0 && column < list_store->n_columns); g_return_if_fail (column >=0 && column < list_store->n_columns);
if (!_gtk_tree_data_list_check_type (type)) if (!_gtk_tree_data_list_check_type (type))
{ {
g_warning ("%s: Invalid type %s passed to gtk_list_store_set_column_type\n", G_STRLOC, g_type_name (type)); g_warning ("%s: Invalid type %s passed to gtk_list_store_set_column_type\n", G_STRLOC, g_type_name (type));
......
...@@ -28,11 +28,11 @@ extern "C" { ...@@ -28,11 +28,11 @@ extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#define GTK_TYPE_LIST_STORE (gtk_list_store_get_type ()) #define GTK_TYPE_LIST_STORE (gtk_list_store_get_type ())
#define GTK_LIST_STORE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_LIST_STORE, GtkListStore)) #define GTK_LIST_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LIST_STORE, GtkListStore))
#define GTK_LIST_STORE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_LIST_STORE, GtkListStoreClass)) #define GTK_LIST_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LIST_STORE, GtkListStoreClass))
#define GTK_IS_LIST_STORE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_LIST_STORE)) #define GTK_IS_LIST_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LIST_STORE))
#define GTK_IS_LIST_STORE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LIST_STORE)) #define GTK_IS_LIST_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LIST_STORE))
#define GTK_LIST_STORE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_LIST_STORE, GtkListStoreClass)) #define GTK_LIST_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LIST_STORE, GtkListStoreClass))
typedef struct _GtkListStore GtkListStore; typedef struct _GtkListStore GtkListStore;
typedef struct _GtkListStoreClass GtkListStoreClass; typedef struct _GtkListStoreClass GtkListStoreClass;
...@@ -69,7 +69,7 @@ struct _GtkListStoreClass ...@@ -69,7 +69,7 @@ struct _GtkListStoreClass
}; };
GtkType gtk_list_store_get_type (void); GType gtk_list_store_get_type (void);
GtkListStore *gtk_list_store_new (gint n_columns, GtkListStore *gtk_list_store_new (gint n_columns,
...); ...);
GtkListStore *gtk_list_store_newv (gint n_columns, GtkListStore *gtk_list_store_newv (gint n_columns,
......
...@@ -59,7 +59,7 @@ _gtk_tree_data_list_free (GtkTreeDataList *list, ...@@ -59,7 +59,7 @@ _gtk_tree_data_list_free (GtkTreeDataList *list,
if (g_type_is_a (column_headers [i], G_TYPE_STRING)) if (g_type_is_a (column_headers [i], G_TYPE_STRING))
g_free ((gchar *) tmp->data.v_pointer); g_free ((gchar *) tmp->data.v_pointer);
else if (g_type_is_a (column_headers [i], G_TYPE_OBJECT) && tmp->data.v_pointer != NULL) else if (g_type_is_a (column_headers [i], G_TYPE_OBJECT) && tmp->data.v_pointer != NULL)
g_object_unref (G_OBJECT (tmp->data.v_pointer)); g_object_unref (tmp->data.v_pointer);
else if (g_type_is_a (column_headers [i], G_TYPE_BOXED) && tmp->data.v_pointer != NULL) else if (g_type_is_a (column_headers [i], G_TYPE_BOXED) && tmp->data.v_pointer != NULL)
g_boxed_free (column_headers [i], (gpointer) tmp->data.v_pointer); g_boxed_free (column_headers [i], (gpointer) tmp->data.v_pointer);
...@@ -279,7 +279,7 @@ _gtk_tree_data_list_node_copy (GtkTreeDataList *list, ...@@ -279,7 +279,7 @@ _gtk_tree_data_list_node_copy (GtkTreeDataList *list,
case G_TYPE_OBJECT: case G_TYPE_OBJECT:
new_list->data.v_pointer = list->data.v_pointer; new_list->data.v_pointer = list->data.v_pointer;
if (new_list->data.v_pointer) if (new_list->data.v_pointer)
g_object_ref (G_OBJECT (new_list->data.v_pointer)); g_object_ref (new_list->data.v_pointer);
break; break;
case G_TYPE_BOXED: case G_TYPE_BOXED:
if (list->data.v_pointer) if (list->data.v_pointer)
......
...@@ -40,7 +40,8 @@ gtk_tree_drag_source_get_type (void) ...@@ -40,7 +40,8 @@ gtk_tree_drag_source_get_type (void)
NULL NULL
}; };
our_type = g_type_register_static (G_TYPE_INTERFACE, "GtkTreeDragSource", &our_info, 0); our_type = g_type_register_static (G_TYPE_INTERFACE, "GtkTreeDragSource",
&our_info, 0);
} }
return our_type; return our_type;
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include "gtktreeview.h" #include "gtktreeview.h"
#include "gtktreeprivate.h" #include "gtktreeprivate.h"
#include "gtkmarshalers.h" #include "gtkmarshalers.h"
#include "gtksignal.h"
#define INITIALIZE_TREE_ITER(Iter) \ #define INITIALIZE_TREE_ITER(Iter) \
...@@ -47,10 +46,10 @@ struct _GtkTreePath ...@@ -47,10 +46,10 @@ struct _GtkTreePath
static void gtk_tree_model_base_init (gpointer g_class); static void gtk_tree_model_base_init (gpointer g_class);
GtkType GType
gtk_tree_model_get_type (void) gtk_tree_model_get_type (void)
{ {
static GtkType tree_model_type = 0; static GType tree_model_type = 0;
if (! tree_model_type) if (! tree_model_type)
{ {
...@@ -67,7 +66,10 @@ gtk_tree_model_get_type (void) ...@@ -67,7 +66,10 @@ gtk_tree_model_get_type (void)
NULL NULL
}; };
tree_model_type = g_type_register_static (G_TYPE_INTERFACE, "GtkTreeModel", &tree_model_info, 0); tree_model_type =
g_type_register_static (G_TYPE_INTERFACE, "GtkTreeModel",
&tree_model_info, 0);
g_type_interface_add_prerequisite (tree_model_type, G_TYPE_OBJECT); g_type_interface_add_prerequisite (tree_model_type, G_TYPE_OBJECT);
} }
...@@ -1546,17 +1548,17 @@ gtk_tree_row_ref_reordered_callback (GObject *object, ...@@ -1546,17 +1548,17 @@ gtk_tree_row_ref_reordered_callback (GObject *object,
static void static void
connect_ref_callbacks (GtkTreeModel *model) connect_ref_callbacks (GtkTreeModel *model)
{ {
g_signal_connect (G_OBJECT (model), g_signal_connect (model,
"row_inserted", "row_inserted",
(GCallback) gtk_tree_row_ref_inserted_callback, G_CALLBACK (gtk_tree_row_ref_inserted_callback),
model); model);
g_signal_connect (G_OBJECT (model), g_signal_connect (model,
"row_deleted", "row_deleted",
(GCallback) gtk_tree_row_ref_deleted_callback, G_CALLBACK (gtk_tree_row_ref_deleted_callback),
model); model);
g_signal_connect (G_OBJECT (model), g_signal_connect (model,
"rows_reordered", "rows_reordered",
(GCallback) gtk_tree_row_ref_reordered_callback, G_CALLBACK (gtk_tree_row_ref_reordered_callback),
model); model);
} }
...@@ -1597,20 +1599,20 @@ gtk_tree_row_reference_unref_path (GtkTreePath *path, ...@@ -1597,20 +1599,20 @@ gtk_tree_row_reference_unref_path (GtkTreePath *path,
static void static void
disconnect_ref_callbacks (GtkTreeModel *model) disconnect_ref_callbacks (GtkTreeModel *model)
{ {
g_signal_handlers_disconnect_matched (G_OBJECT (model), g_signal_handlers_disconnect_matched (model,
G_SIGNAL_MATCH_FUNC, G_SIGNAL_MATCH_FUNC,
0, 0, NULL, 0, 0, NULL,
(gpointer) gtk_tree_row_ref_inserted_callback, gtk_tree_row_ref_inserted_callback,
NULL); NULL);
g_signal_handlers_disconnect_matched (G_OBJECT (model), g_signal_handlers_disconnect_matched (model,
G_SIGNAL_MATCH_FUNC, G_SIGNAL_MATCH_FUNC,
0, 0, NULL, 0, 0, NULL,
(gpointer) gtk_tree_row_ref_deleted_callback, gtk_tree_row_ref_deleted_callback,
NULL); NULL);
g_signal_handlers_disconnect_matched (G_OBJECT (model), g_signal_handlers_disconnect_matched (model,
G_SIGNAL_MATCH_FUNC, G_SIGNAL_MATCH_FUNC,
0, 0, NULL, 0, 0, NULL,
(gpointer) gtk_tree_row_ref_reordered_callback, gtk_tree_row_ref_reordered_callback,
NULL); NULL);
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef __GTK_TREE_MODEL_H__ #ifndef __GTK_TREE_MODEL_H__
#define __GTK_TREE_MODEL_H__ #define __GTK_TREE_MODEL_H__
#include <gtk/gtkobject.h> #include <glib-object.h>
G_BEGIN_DECLS G_BEGIN_DECLS
...@@ -173,7 +173,7 @@ GtkTreeIter * gtk_tree_iter_copy (GtkTreeIter *iter); ...@@ -173,7 +173,7 @@ GtkTreeIter * gtk_tree_iter_copy (GtkTreeIter *iter);
void gtk_tree_iter_free (GtkTreeIter *iter); void gtk_tree_iter_free (GtkTreeIter *iter);
GType gtk_tree_iter_get_type (void); GType gtk_tree_iter_get_type (void);
GtkType gtk_tree_model_get_type (void) G_GNUC_CONST; GType gtk_tree_model_get_type (void) G_GNUC_CONST;
GtkTreeModelFlags gtk_tree_model_get_flags (GtkTreeModel *tree_model); GtkTreeModelFlags gtk_tree_model_get_flags (GtkTreeModel *tree_model);
gint gtk_tree_model_get_n_columns (GtkTreeModel *tree_model); gint gtk_tree_model_get_n_columns (GtkTreeModel *tree_model);
GType gtk_tree_model_get_column_type (GtkTreeModel *tree_model, GType gtk_tree_model_get_column_type (GtkTreeModel *tree_model,
......
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
* we warned you and we're not liable for any head injuries. * we warned you and we're not liable for any head injuries.
*/ */
#include <string.h>
#include "gtktreemodelsort.h" #include "gtktreemodelsort.h"
#include "gtktreesortable.h" #include "gtktreesortable.h"
#include "gtktreestore.h" #include "gtktreestore.h"
#include "gtksignal.h"
#include "gtktreedatalist.h" #include "gtktreedatalist.h"
#include <string.h>
#include "gtkintl.h" #include "gtkintl.h"
typedef struct _SortElt SortElt; typedef struct _SortElt SortElt;
...@@ -260,9 +260,10 @@ gtk_tree_model_sort_get_type (void) ...@@ -260,9 +260,10 @@ gtk_tree_model_sort_get_type (void)
NULL NULL
}; };
tree_model_sort_type = g_type_register_static (G_TYPE_OBJECT, tree_model_sort_type =
"GtkTreeModelSort", g_type_register_static (G_TYPE_OBJECT, "GtkTreeModelSort",
&tree_model_sort_info, 0); &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);
...@@ -352,7 +353,7 @@ gtk_tree_model_sort_new_with_model (GtkTreeModel *child_model) ...@@ -352,7 +353,7 @@ gtk_tree_model_sort_new_with_model (GtkTreeModel *child_model)
g_return_val_if_fail (GTK_IS_TREE_MODEL (child_model), NULL); g_return_val_if_fail (GTK_IS_TREE_MODEL (child_model), NULL);
retval = GTK_TREE_MODEL (g_object_new (gtk_tree_model_sort_get_type (), NULL)); retval = g_object_new (gtk_tree_model_sort_get_type (), NULL);
gtk_tree_model_sort_set_model (GTK_TREE_MODEL_SORT (retval), child_model); gtk_tree_model_sort_set_model (GTK_TREE_MODEL_SORT (retval), child_model);
...@@ -1736,19 +1737,19 @@ gtk_tree_model_sort_set_model (GtkTreeModelSort *tree_model_sort, ...@@ -1736,19 +1737,19 @@ gtk_tree_model_sort_set_model (GtkTreeModelSort *tree_model_sort,
g_return_if_fail (GTK_IS_TREE_MODEL_SORT (tree_model_sort)); g_return_if_fail (GTK_IS_TREE_MODEL_SORT (tree_model_sort));
if (child_model) if (child_model)
g_object_ref (G_OBJECT (child_model)); g_object_ref (child_model);
if (tree_model_sort->child_model) if (tree_model_sort->child_model)
{ {
g_signal_handler_disconnect (G_OBJECT (tree_model_sort->child_model), g_signal_handler_disconnect (tree_model_sort->child_model,
tree_model_sort->changed_id); tree_model_sort->changed_id);
g_signal_handler_disconnect (G_OBJECT (tree_model_sort->child_model), g_signal_handler_disconnect (tree_model_sort->child_model,
tree_model_sort->inserted_id); tree_model_sort->inserted_id);
g_signal_handler_disconnect (G_OBJECT (tree_model_sort->child_model), g_signal_handler_disconnect (tree_model_sort->child_model,
tree_model_sort->has_child_toggled_id); tree_model_sort->has_child_toggled_id);
g_signal_handler_disconnect (G_OBJECT (tree_model_sort->child_model), g_signal_handler_disconnect (tree_model_sort->child_model,
tree_model_sort->deleted_id); tree_model_sort->deleted_id);
g_signal_handler_disconnect (G_OBJECT (tree_model_sort->child_model), g_signal_handler_disconnect (tree_model_sort->child_model,
tree_model_sort->reordered_id); tree_model_sort->reordered_id);
/* reset our state */ /* reset our state */
...@@ -1757,7 +1758,7 @@ gtk_tree_model_sort_set_model (GtkTreeModelSort *tree_model_sort, ...@@ -1757,7 +1758,7 @@ gtk_tree_model_sort_set_model (GtkTreeModelSort *tree_model_sort,
tree_model_sort->root = NULL; tree_model_sort->root = NULL;
_gtk_tree_data_list_header_free (tree_model_sort->sort_list); _gtk_tree_data_list_header_free (tree_model_sort->sort_list);
tree_model_sort->sort_list = NULL; tree_model_sort->sort_list = NULL;
g_object_unref (G_OBJECT (tree_model_sort->child_model)); g_object_unref (tree_model_sort->child_model);
} }
tree_model_sort->child_model = child_model; tree_model_sort->child_model = child_model;
......
...@@ -26,11 +26,11 @@ ...@@ -26,11 +26,11 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GTK_TYPE_TREE_MODEL_SORT (gtk_tree_model_sort_get_type ()) #define GTK_TYPE_TREE_MODEL_SORT (gtk_tree_model_sort_get_type ())
#define GTK_TREE_MODEL_SORT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TREE_MODEL_SORT, GtkTreeModelSort)) #define GTK_TREE_MODEL_SORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_MODEL_SORT, GtkTreeModelSort))
#define GTK_TREE_MODEL_SORT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_MODEL_SORT, GtkTreeModelSortClass)) #define GTK_TREE_MODEL_SORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_MODEL_SORT, GtkTreeModelSortClass))
#define GTK_IS_TREE_MODEL_SORT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TREE_MODEL_SORT)) #define GTK_IS_TREE_MODEL_SORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_MODEL_SORT))
#define GTK_IS_TREE_MODEL_SORT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_MODEL_SORT)) #define GTK_IS_TREE_MODEL_SORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_MODEL_SORT))
#define GTK_TREE_MODEL_SORT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_TREE_MODEL_SORT, GtkTreeModelSortClass)) #define GTK_TREE_MODEL_SORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_MODEL_SORT, GtkTreeModelSortClass))
typedef struct _GtkTreeModelSort GtkTreeModelSort; typedef struct _GtkTreeModelSort GtkTreeModelSort;
typedef struct _GtkTreeModelSortClass GtkTreeModelSortClass; typedef struct _GtkTreeModelSortClass GtkTreeModelSortClass;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "gtktreeprivate.h" #include "gtktreeprivate.h"
#include "gtkrbtree.h" #include "gtkrbtree.h"
#include "gtkmarshalers.h" #include "gtkmarshalers.h"
#include "gtksignal.h"
static void gtk_tree_selection_init (GtkTreeSelection *selection); static void gtk_tree_selection_init (GtkTreeSelection *selection);
static void gtk_tree_selection_class_init (GtkTreeSelectionClass *class); static void gtk_tree_selection_class_init (GtkTreeSelectionClass *class);
...@@ -43,10 +42,10 @@ enum ...@@ -43,10 +42,10 @@ enum
static GObjectClass *parent_class = NULL; static GObjectClass *parent_class = NULL;
static guint tree_selection_signals [LAST_SIGNAL] = { 0 }; static guint tree_selection_signals [LAST_SIGNAL] = { 0 };
GtkType GType
gtk_tree_selection_get_type (void) gtk_tree_selection_get_type (void)
{ {
static GtkType selection_type = 0; static GType selection_type = 0;
if (!selection_type) if (!selection_type)
{ {
...@@ -63,7 +62,9 @@ gtk_tree_selection_get_type (void) ...@@ -63,7 +62,9 @@ gtk_tree_selection_get_type (void)
(GInstanceInitFunc) gtk_tree_selection_init (GInstanceInitFunc) gtk_tree_selection_init
}; };
selection_type = g_type_register_static (G_TYPE_OBJECT, "GtkTreeSelection", &selection_info, 0); selection_type =
g_type_register_static (G_TYPE_OBJECT, "GtkTreeSelection",
&selection_info, 0);
} }
return selection_type; return selection_type;
...@@ -81,12 +82,13 @@ gtk_tree_selection_class_init (GtkTreeSelectionClass *class) ...@@ -81,12 +82,13 @@ gtk_tree_selection_class_init (GtkTreeSelectionClass *class)
class->changed = NULL; class->changed = NULL;
tree_selection_signals[CHANGED] = tree_selection_signals[CHANGED] =
gtk_signal_new ("changed", g_signal_new ("changed",
GTK_RUN_FIRST, G_OBJECT_CLASS_TYPE (object_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST,
GTK_SIGNAL_OFFSET (GtkTreeSelectionClass, changed), G_STRUCT_OFFSET (GtkTreeSelectionClass, changed),
_gtk_marshal_VOID__VOID, NULL, NULL,
GTK_TYPE_NONE, 0); _gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
} }
static void static void
...@@ -125,7 +127,7 @@ _gtk_tree_selection_new (void) ...@@ -125,7 +127,7 @@ _gtk_tree_selection_new (void)
{ {
GtkTreeSelection *selection; GtkTreeSelection *selection;