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/widgets/button.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'src/widgets/button.cpp') diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp index 95d5859e8..6769fa389 100644 --- a/src/widgets/button.cpp +++ b/src/widgets/button.cpp @@ -56,22 +56,25 @@ SPActionEventVector button_event_vector = { NULL }; -GtkType -sp_button_get_type (void) +GType sp_button_get_type(void) { - static GtkType type = 0; - if (!type) { - GtkTypeInfo info = { - "SPButton", - sizeof (SPButton), - sizeof (SPButtonClass), - (GtkClassInitFunc) sp_button_class_init, - (GtkObjectInitFunc) sp_button_init, - NULL, NULL, NULL - }; - type = gtk_type_unique (GTK_TYPE_TOGGLE_BUTTON, &info); - } - return type; + static GType type = 0; + if (!type) { + GTypeInfo info = { + sizeof(SPButtonClass), + 0, // base_init + 0, // base_finalize + (GClassInitFunc)sp_button_class_init, + 0, // class_finalize + 0, // class_data + sizeof(SPButton), + 0, // n_preallocs + (GInstanceInitFunc)sp_button_init, + 0 // value_table + }; + type = g_type_register_static(GTK_TYPE_TOGGLE_BUTTON, "SPButton", &info, static_cast(0)); + } + return type; } static void -- cgit v1.2.3