summaryrefslogtreecommitdiff
path: root/plugins/smartcard
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-19 14:42:17 +0200
committerVictor Kareh <[email protected]>2019-08-20 09:01:31 -0400
commitfe967a0403a2fa82dfa2af3c40a8fc181241947a (patch)
tree820c4131f392da4e9e7781b97031c57be8795d76 /plugins/smartcard
parent4023bf3b605d4dca13fd9edd5fb6df607e90d410 (diff)
downloadmate-settings-daemon-fe967a0403a2fa82dfa2af3c40a8fc181241947a.tar.bz2
mate-settings-daemon-fe967a0403a2fa82dfa2af3c40a8fc181241947a.tar.xz
msd-smartcard: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins/smartcard')
-rw-r--r--plugins/smartcard/msd-smartcard.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/smartcard/msd-smartcard.c b/plugins/smartcard/msd-smartcard.c
index bfc0334..9316cfd 100644
--- a/plugins/smartcard/msd-smartcard.c
+++ b/plugins/smartcard/msd-smartcard.c
@@ -97,7 +97,7 @@ enum {
static guint msd_smartcard_signals[NUMBER_OF_SIGNALS] = { 0 };
-G_DEFINE_TYPE (MsdSmartcard, msd_smartcard, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (MsdSmartcard, msd_smartcard, G_TYPE_OBJECT);
static void
msd_smartcard_class_init (MsdSmartcardClass *card_class)
@@ -110,9 +110,6 @@ msd_smartcard_class_init (MsdSmartcardClass *card_class)
msd_smartcard_class_install_signals (card_class);
msd_smartcard_class_install_properties (card_class);
-
- g_type_class_add_private (card_class,
- sizeof (MsdSmartcardPrivate));
}
static void
@@ -393,9 +390,7 @@ msd_smartcard_init (MsdSmartcard *card)
g_debug ("initializing smartcard ");
- card->priv = G_TYPE_INSTANCE_GET_PRIVATE (card,
- MSD_TYPE_SMARTCARD,
- MsdSmartcardPrivate);
+ card->priv = msd_smartcard_get_instance_private (card);
if (card->priv->slot != NULL) {
card->priv->name = g_strdup (PK11_GetTokenName (card->priv->slot));