diff options
author | Manish Singh <yosh@gimp.org> | 2002-10-07 19:10:39 +0000 |
---|---|---|
committer | Manish Singh <yosh@src.gnome.org> | 2002-10-07 19:10:39 +0000 |
commit | 55704fc7c1b5429bf8cc7e8100893b01898a9fe8 (patch) | |
tree | 10a62005decc56928e7d5730c7f84691796b8a40 | |
parent | c1fff202edabc843327c94d35ad5f2da977f9957 (diff) | |
download | gtk+-55704fc7c1b5429bf8cc7e8100893b01898a9fe8.tar.gz |
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
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 7 | ||||
-rw-r--r-- | gtk/gtkliststore.c | 24 | ||||
-rw-r--r-- | gtk/gtkliststore.h | 12 | ||||
-rw-r--r-- | gtk/gtktreedatalist.c | 4 | ||||
-rw-r--r-- | gtk/gtktreednd.c | 3 | ||||
-rw-r--r-- | gtk/gtktreemodel.c | 34 | ||||
-rw-r--r-- | gtk/gtktreemodel.h | 4 | ||||
-rw-r--r-- | gtk/gtktreemodelsort.c | 27 | ||||
-rw-r--r-- | gtk/gtktreemodelsort.h | 10 | ||||
-rw-r--r-- | gtk/gtktreeselection.c | 34 | ||||
-rw-r--r-- | gtk/gtktreeselection.h | 14 | ||||
-rw-r--r-- | gtk/gtktreesortable.c | 14 | ||||
-rw-r--r-- | gtk/gtktreesortable.h | 2 |
18 files changed, 140 insertions, 84 deletions
@@ -1,3 +1,10 @@ +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> * gdk/x11/gdkx.h: Fix some prototypes that had diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index bef423b065..4063ac303b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +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> * gdk/x11/gdkx.h: Fix some prototypes that had diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index bef423b065..4063ac303b 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +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> * gdk/x11/gdkx.h: Fix some prototypes that had diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index bef423b065..4063ac303b 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +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> * gdk/x11/gdkx.h: Fix some prototypes that had diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index bef423b065..4063ac303b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +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> * gdk/x11/gdkx.h: Fix some prototypes that had diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index bef423b065..4063ac303b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +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> * gdk/x11/gdkx.h: Fix some prototypes that had diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c index a8de408c4d..b945b51914 100644 --- a/gtk/gtkliststore.c +++ b/gtk/gtkliststore.c @@ -18,12 +18,11 @@ */ #include <string.h> +#include <gobject/gvaluecollector.h> #include "gtktreemodel.h" #include "gtkliststore.h" #include "gtktreedatalist.h" -#include "gtksignal.h" #include "gtktreednd.h" -#include <gobject/gvaluecollector.h> #define G_SLIST(x) ((GSList *) x) #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) } } -GtkType +GType gtk_list_store_get_type (void) { static GType list_store_type = 0; @@ -173,7 +172,9 @@ gtk_list_store_get_type (void) 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, GTK_TYPE_TREE_MODEL, &tree_model_info); @@ -277,7 +278,7 @@ gtk_list_store_new (gint n_columns, 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); va_start (args, n_columns); @@ -287,8 +288,9 @@ gtk_list_store_new (gint n_columns, GType type = va_arg (args, GType); 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_object_unref (G_OBJECT (retval)); + g_warning ("%s: Invalid type %s passed to gtk_list_store_new\n", + G_STRLOC, g_type_name (type)); + g_object_unref (retval); return NULL; } @@ -319,15 +321,16 @@ gtk_list_store_newv (gint n_columns, 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); for (i = 0; i < n_columns; 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_object_unref (G_OBJECT (retval)); + g_warning ("%s: Invalid type %s passed to gtk_list_store_newv\n", + G_STRLOC, g_type_name (types[i])); + g_object_unref (retval); return NULL; } @@ -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 (column >=0 && column < list_store->n_columns); + 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)); diff --git a/gtk/gtkliststore.h b/gtk/gtkliststore.h index 6e35fa6cb2..25787e2bae 100644 --- a/gtk/gtkliststore.h +++ b/gtk/gtkliststore.h @@ -28,11 +28,11 @@ extern "C" { #endif /* __cplusplus */ #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_CLASS(klass) (GTK_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_CLASS(klass) (GTK_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(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LIST_STORE, GtkListStore)) +#define GTK_LIST_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LIST_STORE, GtkListStoreClass)) +#define GTK_IS_LIST_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 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) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LIST_STORE, GtkListStoreClass)) typedef struct _GtkListStore GtkListStore; typedef struct _GtkListStoreClass 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_newv (gint n_columns, diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c index 301022ebc9..c09ac0683d 100644 --- a/gtk/gtktreedatalist.c +++ b/gtk/gtktreedatalist.c @@ -59,7 +59,7 @@ _gtk_tree_data_list_free (GtkTreeDataList *list, if (g_type_is_a (column_headers [i], G_TYPE_STRING)) g_free ((gchar *) tmp->data.v_pointer); 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) g_boxed_free (column_headers [i], (gpointer) tmp->data.v_pointer); @@ -279,7 +279,7 @@ _gtk_tree_data_list_node_copy (GtkTreeDataList *list, case G_TYPE_OBJECT: new_list->data.v_pointer = 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; case G_TYPE_BOXED: if (list->data.v_pointer) diff --git a/gtk/gtktreednd.c b/gtk/gtktreednd.c index 8fbeabb2d7..09718a799b 100644 --- a/gtk/gtktreednd.c +++ b/gtk/gtktreednd.c @@ -40,7 +40,8 @@ gtk_tree_drag_source_get_type (void) 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; diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c index f10f97438f..e765abca8a 100644 --- a/gtk/gtktreemodel.c +++ b/gtk/gtktreemodel.c @@ -26,7 +26,6 @@ #include "gtktreeview.h" #include "gtktreeprivate.h" #include "gtkmarshalers.h" -#include "gtksignal.h" #define INITIALIZE_TREE_ITER(Iter) \ @@ -47,10 +46,10 @@ struct _GtkTreePath static void gtk_tree_model_base_init (gpointer g_class); -GtkType +GType gtk_tree_model_get_type (void) { - static GtkType tree_model_type = 0; + static GType tree_model_type = 0; if (! tree_model_type) { @@ -67,7 +66,10 @@ gtk_tree_model_get_type (void) 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); } @@ -1546,17 +1548,17 @@ gtk_tree_row_ref_reordered_callback (GObject *object, static void connect_ref_callbacks (GtkTreeModel *model) { - g_signal_connect (G_OBJECT (model), + g_signal_connect (model, "row_inserted", - (GCallback) gtk_tree_row_ref_inserted_callback, + G_CALLBACK (gtk_tree_row_ref_inserted_callback), model); - g_signal_connect (G_OBJECT (model), + g_signal_connect (model, "row_deleted", - (GCallback) gtk_tree_row_ref_deleted_callback, + G_CALLBACK (gtk_tree_row_ref_deleted_callback), model); - g_signal_connect (G_OBJECT (model), + g_signal_connect (model, "rows_reordered", - (GCallback) gtk_tree_row_ref_reordered_callback, + G_CALLBACK (gtk_tree_row_ref_reordered_callback), model); } @@ -1597,20 +1599,20 @@ gtk_tree_row_reference_unref_path (GtkTreePath *path, static void disconnect_ref_callbacks (GtkTreeModel *model) { - g_signal_handlers_disconnect_matched (G_OBJECT (model), + g_signal_handlers_disconnect_matched (model, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, - (gpointer) gtk_tree_row_ref_inserted_callback, + gtk_tree_row_ref_inserted_callback, NULL); - g_signal_handlers_disconnect_matched (G_OBJECT (model), + g_signal_handlers_disconnect_matched (model, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, - (gpointer) gtk_tree_row_ref_deleted_callback, + gtk_tree_row_ref_deleted_callback, NULL); - g_signal_handlers_disconnect_matched (G_OBJECT (model), + g_signal_handlers_disconnect_matched (model, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, - (gpointer) gtk_tree_row_ref_reordered_callback, + gtk_tree_row_ref_reordered_callback, NULL); } diff --git a/gtk/gtktreemodel.h b/gtk/gtktreemodel.h index ff7d9e8656..7175688f97 100644 --- a/gtk/gtktreemodel.h +++ b/gtk/gtktreemodel.h @@ -20,7 +20,7 @@ #ifndef __GTK_TREE_MODEL_H__ #define __GTK_TREE_MODEL_H__ -#include <gtk/gtkobject.h> +#include <glib-object.h> G_BEGIN_DECLS @@ -173,7 +173,7 @@ GtkTreeIter * gtk_tree_iter_copy (GtkTreeIter *iter); void gtk_tree_iter_free (GtkTreeIter *iter); 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); gint gtk_tree_model_get_n_columns (GtkTreeModel *tree_model); GType gtk_tree_model_get_column_type (GtkTreeModel *tree_model, diff --git a/gtk/gtktreemodelsort.c b/gtk/gtktreemodelsort.c index 373edbb6b3..b153f40af2 100644 --- a/gtk/gtktreemodelsort.c +++ b/gtk/gtktreemodelsort.c @@ -37,12 +37,12 @@ * we warned you and we're not liable for any head injuries. */ +#include <string.h> + #include "gtktreemodelsort.h" #include "gtktreesortable.h" #include "gtktreestore.h" -#include "gtksignal.h" #include "gtktreedatalist.h" -#include <string.h> #include "gtkintl.h" typedef struct _SortElt SortElt; @@ -260,9 +260,10 @@ gtk_tree_model_sort_get_type (void) NULL }; - tree_model_sort_type = g_type_register_static (G_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, GTK_TYPE_TREE_MODEL, &tree_model_info); @@ -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); - 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); @@ -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)); if (child_model) - g_object_ref (G_OBJECT (child_model)); + g_object_ref (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); - 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); - 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); - 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); - 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); /* reset our state */ @@ -1757,7 +1758,7 @@ gtk_tree_model_sort_set_model (GtkTreeModelSort *tree_model_sort, tree_model_sort->root = NULL; _gtk_tree_data_list_header_free (tree_model_sort->sort_list); 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; diff --git a/gtk/gtktreemodelsort.h b/gtk/gtktreemodelsort.h index 5a0af05f9f..bfd24e90b9 100644 --- a/gtk/gtktreemodelsort.h +++ b/gtk/gtktreemodelsort.h @@ -26,11 +26,11 @@ G_BEGIN_DECLS #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_CLASS(klass) (GTK_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_CLASS(klass) (GTK_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(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_MODEL_SORT, GtkTreeModelSort)) +#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) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 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) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_MODEL_SORT, GtkTreeModelSortClass)) typedef struct _GtkTreeModelSort GtkTreeModelSort; typedef struct _GtkTreeModelSortClass GtkTreeModelSortClass; diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c index 88df17bcba..40546838c5 100644 --- a/gtk/gtktreeselection.c +++ b/gtk/gtktreeselection.c @@ -21,7 +21,6 @@ #include "gtktreeprivate.h" #include "gtkrbtree.h" #include "gtkmarshalers.h" -#include "gtksignal.h" static void gtk_tree_selection_init (GtkTreeSelection *selection); static void gtk_tree_selection_class_init (GtkTreeSelectionClass *class); @@ -43,10 +42,10 @@ enum static GObjectClass *parent_class = NULL; static guint tree_selection_signals [LAST_SIGNAL] = { 0 }; -GtkType +GType gtk_tree_selection_get_type (void) { - static GtkType selection_type = 0; + static GType selection_type = 0; if (!selection_type) { @@ -63,7 +62,9 @@ gtk_tree_selection_get_type (void) (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; @@ -81,12 +82,13 @@ gtk_tree_selection_class_init (GtkTreeSelectionClass *class) class->changed = NULL; tree_selection_signals[CHANGED] = - gtk_signal_new ("changed", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (GtkTreeSelectionClass, changed), - _gtk_marshal_VOID__VOID, - GTK_TYPE_NONE, 0); + g_signal_new ("changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (GtkTreeSelectionClass, changed), + NULL, NULL, + _gtk_marshal_VOID__VOID, + G_TYPE_NONE, 0); } static void @@ -125,7 +127,7 @@ _gtk_tree_selection_new (void) { GtkTreeSelection *selection; - selection = GTK_TREE_SELECTION (g_object_new (GTK_TYPE_TREE_SELECTION, NULL)); + selection = g_object_new (GTK_TYPE_TREE_SELECTION, NULL); return selection; } @@ -966,7 +968,7 @@ gtk_tree_selection_select_all (GtkTreeSelection *selection) g_return_if_fail (selection->type == GTK_SELECTION_MULTIPLE); if (gtk_tree_selection_real_select_all (selection)) - g_signal_emit (G_OBJECT (selection), tree_selection_signals[CHANGED], 0); + g_signal_emit (selection, tree_selection_signals[CHANGED], 0); } static void @@ -1069,7 +1071,7 @@ gtk_tree_selection_unselect_all (GtkTreeSelection *selection) return; if (gtk_tree_selection_real_unselect_all (selection)) - g_signal_emit (G_OBJECT (selection), tree_selection_signals[CHANGED], 0); + g_signal_emit (selection, tree_selection_signals[CHANGED], 0); } enum @@ -1170,7 +1172,7 @@ gtk_tree_selection_select_range (GtkTreeSelection *selection, g_return_if_fail (selection->tree_view != NULL); if (gtk_tree_selection_real_modify_range (selection, RANGE_SELECT, start_path, end_path)) - g_signal_emit (G_OBJECT (selection), tree_selection_signals[CHANGED], 0); + g_signal_emit (selection, tree_selection_signals[CHANGED], 0); } /** @@ -1191,7 +1193,7 @@ gtk_tree_selection_unselect_range (GtkTreeSelection *selection, g_return_if_fail (selection->tree_view != NULL); if (gtk_tree_selection_real_modify_range (selection, RANGE_UNSELECT, start_path, end_path)) - g_signal_emit (G_OBJECT (selection), tree_selection_signals[CHANGED], 0); + g_signal_emit (selection, tree_selection_signals[CHANGED], 0); } /* Called internally by gtktreeview.c It handles actually selecting the tree. @@ -1342,7 +1344,7 @@ _gtk_tree_selection_internal_select_node (GtkTreeSelection *selection, gtk_tree_path_free (anchor_path); if (dirty) - g_signal_emit (G_OBJECT (selection), tree_selection_signals[CHANGED], 0); + g_signal_emit (selection, tree_selection_signals[CHANGED], 0); } /* NOTE: Any {un,}selection ever done _MUST_ be done through this function! diff --git a/gtk/gtktreeselection.h b/gtk/gtktreeselection.h index be83cdbfc1..30b3541a02 100644 --- a/gtk/gtktreeselection.h +++ b/gtk/gtktreeselection.h @@ -20,7 +20,7 @@ #ifndef __GTK_TREE_SELECTION_H__ #define __GTK_TREE_SELECTION_H__ -#include <gtk/gtkobject.h> +#include <glib-object.h> #include <gtk/gtktreeview.h> #ifdef __cplusplus @@ -28,11 +28,11 @@ extern "C" { #endif /* __cplusplus */ #define GTK_TYPE_TREE_SELECTION (gtk_tree_selection_get_type ()) -#define GTK_TREE_SELECTION(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TREE_SELECTION, GtkTreeSelection)) -#define GTK_TREE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_SELECTION, GtkTreeSelectionClass)) -#define GTK_IS_TREE_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TREE_SELECTION)) -#define GTK_IS_TREE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_SELECTION)) -#define GTK_TREE_SELECTION_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_TREE_SELECTION, GtkTreeSelectionClass)) +#define GTK_TREE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_SELECTION, GtkTreeSelection)) +#define GTK_TREE_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_SELECTION, GtkTreeSelectionClass)) +#define GTK_IS_TREE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_SELECTION)) +#define GTK_IS_TREE_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_SELECTION)) +#define GTK_TREE_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_SELECTION, GtkTreeSelectionClass)) typedef gboolean (* GtkTreeSelectionFunc) (GtkTreeSelection *selection, GtkTreeModel *model, @@ -71,7 +71,7 @@ struct _GtkTreeSelectionClass }; -GtkType gtk_tree_selection_get_type (void); +GType gtk_tree_selection_get_type (void); void gtk_tree_selection_set_mode (GtkTreeSelection *selection, GtkSelectionMode type); diff --git a/gtk/gtktreesortable.c b/gtk/gtktreesortable.c index 7e4ce5ab32..f9ad6fb3b3 100644 --- a/gtk/gtktreesortable.c +++ b/gtk/gtktreesortable.c @@ -20,14 +20,13 @@ #include "gtktreesortable.h" #include "gtkmarshalers.h" -#include "gtksignal.h" static void gtk_tree_sortable_base_init (gpointer g_class); -GtkType +GType gtk_tree_sortable_get_type (void) { - static GtkType tree_sortable_type = 0; + static GType tree_sortable_type = 0; if (! tree_sortable_type) { @@ -43,7 +42,11 @@ gtk_tree_sortable_get_type (void) 0, NULL }; - tree_sortable_type = g_type_register_static (G_TYPE_INTERFACE, "GtkTreeSortable", &tree_sortable_info, 0); + + tree_sortable_type = + g_type_register_static (G_TYPE_INTERFACE, "GtkTreeSortable", + &tree_sortable_info, 0); + g_type_interface_add_prerequisite (tree_sortable_type, GTK_TYPE_TREE_MODEL); } @@ -79,8 +82,7 @@ gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable) { g_return_if_fail (GTK_IS_TREE_SORTABLE (sortable)); - g_signal_emit_by_name (G_OBJECT (sortable), - "sort_column_changed"); + g_signal_emit_by_name (sortable, "sort_column_changed"); } /** diff --git a/gtk/gtktreesortable.h b/gtk/gtktreesortable.h index 73df07b227..a84a664f81 100644 --- a/gtk/gtktreesortable.h +++ b/gtk/gtktreesortable.h @@ -20,7 +20,9 @@ #ifndef __GTK_TREE_SORTABLE_H__ #define __GTK_TREE_SORTABLE_H__ +#include <gtk/gtkenums.h> #include <gtk/gtktreemodel.h> +#include <gtk/gtktypeutils.h> G_BEGIN_DECLS |