[gnome-bluetooth/wip/fixes] pairing-dialog use G_DEFINE_WITH_PRIVATE
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/fixes] pairing-dialog use G_DEFINE_WITH_PRIVATE
- Date: Thu, 18 Dec 2014 19:21:16 +0000 (UTC)
commit 4fa164b657228540aa674f583b655168a61cc9a9
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Dec 18 20:20:56 2014 +0100
pairing-dialog use G_DEFINE_WITH_PRIVATE
lib/bluetooth-pairing-dialog.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/lib/bluetooth-pairing-dialog.c b/lib/bluetooth-pairing-dialog.c
index 46dd784..ec03b65 100644
--- a/lib/bluetooth-pairing-dialog.c
+++ b/lib/bluetooth-pairing-dialog.c
@@ -32,7 +32,7 @@
#include "bluetooth-settings-resources.h"
#define BLUETOOTH_PAIRING_DIALOG_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE((obj), BLUETOOTH_TYPE_PAIRING_DIALOG, BluetoothPairingDialogPrivate))
+ (bluetooth_pairing_dialog_get_instance_private (obj))
typedef struct _BluetoothPairingDialogPrivate BluetoothPairingDialogPrivate;
@@ -52,7 +52,7 @@ struct _BluetoothPairingDialogPrivate {
char *pin;
};
-G_DEFINE_TYPE(BluetoothPairingDialog, bluetooth_pairing_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE_WITH_PRIVATE(BluetoothPairingDialog, bluetooth_pairing_dialog, GTK_TYPE_DIALOG)
#define WID(s) GTK_WIDGET (gtk_builder_get_object (priv->builder, s))
@@ -334,7 +334,7 @@ bluetooth_pairing_dialog_constructed (GObject *object)
static void
bluetooth_pairing_dialog_finalize (GObject *object)
{
- BluetoothPairingDialogPrivate *priv = BLUETOOTH_PAIRING_DIALOG_GET_PRIVATE (object);
+ BluetoothPairingDialogPrivate *priv = BLUETOOTH_PAIRING_DIALOG_GET_PRIVATE (BLUETOOTH_PAIRING_DIALOG
(object));
g_clear_object (&priv->builder);
g_clear_pointer (&priv->pin, g_free);
@@ -349,8 +349,6 @@ bluetooth_pairing_dialog_class_init (BluetoothPairingDialogClass *klass)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- g_type_class_add_private (klass, sizeof (BluetoothPairingDialogPrivate));
-
object_class->constructed = bluetooth_pairing_dialog_constructed;
object_class->finalize = bluetooth_pairing_dialog_finalize;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]