From 08c28c4e7fe814f39e742fd8cd617b42daa1534e Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Tue, 6 May 2008 07:33:22 +0000 Subject: Updating deprecated type calls. (bzr r5617) --- src/helper/unit-menu.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/helper/unit-menu.cpp') diff --git a/src/helper/unit-menu.cpp b/src/helper/unit-menu.cpp index 34a2b6344..809d8f929 100644 --- a/src/helper/unit-menu.cpp +++ b/src/helper/unit-menu.cpp @@ -58,20 +58,23 @@ static void sp_unit_selector_finalize(GObject *object); static GtkHBoxClass *unit_selector_parent_class; static guint signals[LAST_SIGNAL] = {0}; -GtkType -sp_unit_selector_get_type(void) +GType sp_unit_selector_get_type(void) { - static GtkType type = 0; + static GType type = 0; if (!type) { - static GtkTypeInfo const info = { - "SPUnitSelector", - sizeof(SPUnitSelector), + GTypeInfo info = { sizeof(SPUnitSelectorClass), - (GtkClassInitFunc) sp_unit_selector_class_init, - (GtkObjectInitFunc) sp_unit_selector_init, - NULL, NULL, NULL + 0, // base_init + 0, // base_finalize + (GClassInitFunc)sp_unit_selector_class_init, + 0, // class_finalize + 0, // class_data + sizeof(SPUnitSelector), + 0, // n_preallocs + (GInstanceInitFunc)sp_unit_selector_init, + 0 // value_table }; - type = gtk_type_unique(GTK_TYPE_HBOX, &info); + type = g_type_register_static(GTK_TYPE_HBOX, "SPUnitSelector", &info, static_cast(0)); } return type; } -- cgit v1.2.3