[gnome-bluetooth/wip/fixes] settings-widget: use G_DEFINE_TYPE_WITH_PRIVATE



commit f5416f43f9a7e454eaee957f3dd3fc0842829545
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Fri Dec 19 14:12:36 2014 +0100

    settings-widget: use G_DEFINE_TYPE_WITH_PRIVATE

 lib/bluetooth-settings-widget.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index d0c210d..a9fab14 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]