diff options
Diffstat (limited to 'mateweather/mateweather-pref.c')
-rw-r--r-- | mateweather/mateweather-pref.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mateweather/mateweather-pref.c b/mateweather/mateweather-pref.c index 0446faad..a03afca8 100644 --- a/mateweather/mateweather-pref.c +++ b/mateweather/mateweather-pref.c @@ -72,11 +72,7 @@ enum { PROP_MATEWEATHER_APPLET, }; -G_DEFINE_TYPE(MateWeatherPref, mateweather_pref, GTK_TYPE_DIALOG); - -#define MATEWEATHER_PREF_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), MATEWEATHER_TYPE_PREF, MateWeatherPrefPrivate)) - +G_DEFINE_TYPE_WITH_PRIVATE (MateWeatherPref, mateweather_pref, GTK_TYPE_DIALOG); /* set sensitive and setup NEVER_SENSITIVE appropriately */ static void hard_set_sensitive(GtkWidget* w, gboolean sensitivity) @@ -1186,7 +1182,7 @@ static void mateweather_pref_get_property(GObject* object, guint prop_id, GValue static void mateweather_pref_init(MateWeatherPref* self) { - self->priv = MATEWEATHER_PREF_GET_PRIVATE(self); + self->priv = mateweather_pref_get_instance_private(self); } @@ -1235,8 +1231,6 @@ static void mateweather_pref_class_init(MateWeatherPrefClass* klass) /* This becomes an OBJECT property when MateWeatherApplet is redone */ g_object_class_install_property(object_class, PROP_MATEWEATHER_APPLET, g_param_spec_pointer("mateweather-applet", "MateWeather Applet", "The MateWeather Applet", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - - g_type_class_add_private(klass, sizeof(MateWeatherPrefPrivate)); } |