summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-07-02 13:07:14 +0800
committerraveit65 <[email protected]>2019-07-05 09:35:37 +0200
commit2cc76c5ff9fa7bc5dd9a883effd5c3c8e8b704d6 (patch)
tree8f14307cfddf2ce8bb4be85762cf9cebdb762c87
parente2f12046bc3e7f252b11e8193e2417103622185d (diff)
downloadmate-polkit-2cc76c5ff9fa7bc5dd9a883effd5c3c8e8b704d6.tar.bz2
mate-polkit-2cc76c5ff9fa7bc5dd9a883effd5c3c8e8b704d6.tar.xz
Avoid deprecated g_type_class_add_private
-rw-r--r--src/polkitmateauthenticationdialog.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/polkitmateauthenticationdialog.c b/src/polkitmateauthenticationdialog.c
index 31837be..7e08674 100644
--- a/src/polkitmateauthenticationdialog.c
+++ b/src/polkitmateauthenticationdialog.c
@@ -66,7 +66,7 @@ struct _PolkitMateAuthenticationDialogPrivate
GtkListStore *store;
};
-G_DEFINE_TYPE (PolkitMateAuthenticationDialog, polkit_mate_authentication_dialog, GTK_TYPE_DIALOG);
+G_DEFINE_TYPE_WITH_PRIVATE (PolkitMateAuthenticationDialog, polkit_mate_authentication_dialog, GTK_TYPE_DIALOG);
enum {
PROP_0,
@@ -587,9 +587,7 @@ out:
static void
polkit_mate_authentication_dialog_init (PolkitMateAuthenticationDialog *dialog)
{
- dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog,
- POLKIT_MATE_TYPE_AUTHENTICATION_DIALOG,
- PolkitMateAuthenticationDialogPrivate);
+ dialog->priv = polkit_mate_authentication_dialog_get_instance_private (dialog);
}
static void
@@ -882,8 +880,6 @@ polkit_mate_authentication_dialog_class_init (PolkitMateAuthenticationDialogClas
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (PolkitMateAuthenticationDialogPrivate));
-
gobject_class->finalize = polkit_mate_authentication_dialog_finalize;
gobject_class->get_property = polkit_mate_authentication_dialog_get_property;
gobject_class->set_property = polkit_mate_authentication_dialog_set_property;