Warnings: missing initializer for value_tables and function type cast (GObject)
[pspp] / src / ui / gui / psppire-data-editor.c
index d1b185c681e91f57062a3b5d546439c540d33f3e..150e92f311a2f797447048bd6f16e3b4bf579468 100644 (file)
 #include <gettext.h>
 #define _(msgid) gettext (msgid)
 
-static void psppire_data_editor_class_init          (PsppireDataEditorClass *klass);
-static void psppire_data_editor_init                (PsppireDataEditor      *de);
-
 static void refresh_entry (PsppireDataEditor *);
 
-GType
-psppire_data_editor_get_type (void)
-{
-  static GType de_type = 0;
-
-  if (!de_type)
-    {
-      static const GTypeInfo de_info =
-      {
-       sizeof (PsppireDataEditorClass),
-       NULL, /* base_init */
-        NULL, /* base_finalize */
-       (GClassInitFunc) psppire_data_editor_class_init,
-        NULL, /* class_finalize */
-       NULL, /* class_data */
-        sizeof (PsppireDataEditor),
-       0,
-       (GInstanceInitFunc) psppire_data_editor_init,
-      };
-
-      de_type = g_type_register_static (GTK_TYPE_NOTEBOOK, "PsppireDataEditor",
-                                       &de_info, 0);
-    }
-
-  return de_type;
-}
+G_DEFINE_TYPE (PsppireDataEditor, psppire_data_editor, GTK_TYPE_NOTEBOOK)
 
 static GObjectClass * parent_class = NULL;