G_ADD_PRIVATE() is too new; wrote in the correct form for GLib 2.32. Thanks to hergertme in irc.gimp.net/#gtk+.

This commit is contained in:
Pietro Gagliardi 2015-01-10 23:35:22 -05:00
parent 2ce4ae1a2e
commit 3d9254b0a8
1 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,7 @@ struct goDateTimePickerPrivate {
};
G_DEFINE_TYPE_WITH_CODE(goDateTimePicker, goDateTimePicker, GTK_TYPE_BOX,
G_ADD_PRIVATE(goDateTimePicker))
;)
// TODO figure out how to share these between C and Go
enum {
@ -27,7 +27,7 @@ enum {
static void goDateTimePicker_init(goDateTimePicker *dtp)
{
dtp->priv = goDateTimePicker_get_instance_private(dtp);
dtp->priv = G_TYPE_INSTANCE_GET_PRIVATE(dtp, goDateTimePicker_get_type(), goDateTimePickerPrivate);
}
static void goDateTimePicker_dispose(GObject *obj)
@ -103,6 +103,8 @@ static void goDateTimePicker_get_property(GObject *obj, guint prop, GValue *valu
static void goDateTimePicker_class_init(goDateTimePickerClass *class)
{
g_type_class_add_private(class, sizeof (goDateTimePickerPrivate));
G_OBJECT_CLASS(class)->dispose = goDateTimePicker_dispose;
G_OBJECT_CLASS(class)->finalize = goDateTimePicker_finalize;
G_OBJECT_CLASS(class)->set_property = goDateTimePicker_set_property;