diff options
author | Pablo Barciela <[email protected]> | 2019-08-22 00:18:59 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-09-02 23:58:10 +0000 |
commit | 70fc5182630b02a1fb73623e5bc50c67ecbe1e4e (patch) | |
tree | 45ed28ffa3ef6131ec6c646108c0803eec7474b2 | |
parent | 96015c29268970ba1d58160c3a252a9e8a20dd25 (diff) | |
download | mate-utils-70fc5182630b02a1fb73623e5bc50c67ecbe1e4e.tar.bz2 mate-utils-70fc5182630b02a1fb73623e5bc50c67ecbe1e4e.tar.xz |
gdict-applet: avoid 'g_type_class_add_private'
-rw-r--r-- | mate-dictionary/src/gdict-applet.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mate-dictionary/src/gdict-applet.c b/mate-dictionary/src/gdict-applet.c index 8dba6ec3..4b2c87e2 100644 --- a/mate-dictionary/src/gdict-applet.c +++ b/mate-dictionary/src/gdict-applet.c @@ -46,8 +46,6 @@ struct _GdictAppletClass MatePanelAppletClass parent_class; }; -#define GDICT_APPLET_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDICT_TYPE_APPLET, GdictAppletPrivate)) - struct _GdictAppletPrivate { guint size; @@ -95,7 +93,7 @@ struct _GdictAppletPrivate #define WINDOW_NUM_COLUMNS 47 #define WINDOW_NUM_ROWS 20 -G_DEFINE_TYPE (GdictApplet, gdict_applet, PANEL_TYPE_APPLET); +G_DEFINE_TYPE_WITH_PRIVATE (GdictApplet, gdict_applet, PANEL_TYPE_APPLET); static const GtkTargetEntry drop_types[] = @@ -1101,8 +1099,6 @@ gdict_applet_class_init (GdictAppletClass *klass) widget_class->style_set = gdict_applet_style_set; applet_class->change_orient = gdict_applet_change_orient; - - g_type_class_add_private (gobject_class, sizeof (GdictAppletPrivate)); } static void @@ -1111,7 +1107,7 @@ gdict_applet_init (GdictApplet *applet) GdictAppletPrivate *priv; gchar *data_dir; - priv = GDICT_APPLET_GET_PRIVATE (applet); + priv = gdict_applet_get_instance_private (applet); applet->priv = priv; if (!priv->loader) |