diff options
author | Ignacio Casal Quinteiro <icq@gnome.org> | 2014-12-19 14:12:36 +0100 |
---|---|---|
committer | Ignacio Casal Quinteiro <icq@gnome.org> | 2015-01-05 11:44:42 +0100 |
commit | 92bedfc9192b2d381dcb25e0ea4ddc44b07ccfe9 (patch) | |
tree | 0a33e50788e8adc4230969356b82d0c27ffb5ccd | |
parent | 14a5ac7b72cebf0a8737fa7c19d6d3791cf5de08 (diff) | |
download | gnome-bluetooth-92bedfc9192b2d381dcb25e0ea4ddc44b07ccfe9.tar.gz |
settings-widget: use G_DEFINE_TYPE_WITH_PRIVATE
https://bugzilla.gnome.org/show_bug.cgi?id=742359
-rw-r--r-- | lib/bluetooth-settings-widget.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c index d0c210d0..9303c3a7 100644 --- a/lib/bluetooth-settings-widget.c +++ b/lib/bluetooth-settings-widget.c @@ -39,7 +39,7 @@ #include "pin.h" #define BLUETOOTH_SETTINGS_WIDGET_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), BLUETOOTH_TYPE_SETTINGS_WIDGET, BluetoothSettingsWidgetPrivate)) + (bluetooth_settings_widget_get_instance_private (obj)) typedef struct _BluetoothSettingsWidgetPrivate BluetoothSettingsWidgetPrivate; @@ -77,7 +77,7 @@ struct _BluetoothSettingsWidgetPrivate { GtkWidget *visible_label; }; -G_DEFINE_TYPE(BluetoothSettingsWidget, bluetooth_settings_widget, GTK_TYPE_BOX) +G_DEFINE_TYPE_WITH_PRIVATE(BluetoothSettingsWidget, bluetooth_settings_widget, GTK_TYPE_BOX) enum { PANEL_CHANGED, @@ -1814,7 +1814,8 @@ bluetooth_settings_widget_init (BluetoothSettingsWidget *self) static void bluetooth_settings_widget_finalize (GObject *object) { - BluetoothSettingsWidgetPrivate *priv = BLUETOOTH_SETTINGS_WIDGET_GET_PRIVATE (object); + BluetoothSettingsWidget *widget = BLUETOOTH_SETTINGS_WIDGET(object); + BluetoothSettingsWidgetPrivate *priv = BLUETOOTH_SETTINGS_WIDGET_GET_PRIVATE (widget); g_clear_object (&priv->agent); g_clear_pointer (&priv->properties_dialog, gtk_widget_destroy); @@ -1846,8 +1847,6 @@ bluetooth_settings_widget_class_init (BluetoothSettingsWidgetClass *klass) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); - g_type_class_add_private (klass, sizeof (BluetoothSettingsWidgetPrivate)); - G_OBJECT_CLASS (klass)->finalize = bluetooth_settings_widget_finalize; /** |