diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp
index 95d5859e83b93aef9b2aff596d258ae090638006..6769fa389d9f1889e29f24e925053f0adb3d8f0f 100644 (file)
--- a/src/widgets/button.cpp
+++ b/src/widgets/button.cpp
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<GTypeFlags>(0));
+ }
+ return type;
}
static void