summaryrefslogtreecommitdiff
path: root/gcr/gcr-parser.c
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2019-05-24 08:52:11 +0200
committerNiels De Graef <nielsdegraef@gmail.com>2019-05-24 09:11:03 +0200
commitb4a3774b661a4f54a3b18cf13ded628b6b2054a6 (patch)
treea199ff93abb290a916c53147386dd1d729b8e938 /gcr/gcr-parser.c
parentf5966efc51c8524c430ab6cea1d2920368969558 (diff)
downloadgcr-b4a3774b661a4f54a3b18cf13ded628b6b2054a6.tar.gz
gcr: g_type_class_add_private() is deprecated
Use `G_ADD_PRIVATE()` (or the convenience macro `G_DEFINE_TYPE_WITH_PRIVATE()`) instead.
Diffstat (limited to 'gcr/gcr-parser.c')
-rw-r--r--gcr/gcr-parser.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcr/gcr-parser.c b/gcr/gcr-parser.c
index cf5c44e..11c5fbb 100644
--- a/gcr/gcr-parser.c
+++ b/gcr/gcr-parser.c
@@ -138,7 +138,7 @@ struct _GcrParserPrivate {
gchar *filename;
};
-G_DEFINE_TYPE (GcrParser, gcr_parser, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (GcrParser, gcr_parser, G_TYPE_OBJECT);
typedef struct {
gint ask_state;
@@ -2347,7 +2347,7 @@ gcr_parser_constructor (GType type, guint n_props, GObjectConstructParam *props)
static void
gcr_parser_init (GcrParser *self)
{
- self->pv = G_TYPE_INSTANCE_GET_PRIVATE (self, GCR_TYPE_PARSER, GcrParserPrivate);
+ self->pv = gcr_parser_get_instance_private (self);
self->pv->passwords = g_ptr_array_new ();
self->pv->normal_formats = TRUE;
}
@@ -2438,8 +2438,6 @@ gcr_parser_class_init (GcrParserClass *klass)
* Get the attributes that make up the currently parsed item. This is
* generally only valid during a #GcrParser::parsed signal.
*/
- g_type_class_add_private (gobject_class, sizeof (GcrParserPrivate));
-
g_object_class_install_property (gobject_class, PROP_PARSED_ATTRIBUTES,
g_param_spec_boxed ("parsed-attributes", "Parsed Attributes", "Parsed PKCS#11 attributes",
GCK_TYPE_ATTRIBUTES, G_PARAM_READABLE));