summaryrefslogtreecommitdiff
path: root/libslab/nameplate-tile.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-05-22 12:03:03 +0800
committerraveit65 <[email protected]>2019-06-06 14:33:45 +0200
commit9dc5fef7fcf9a1040c95055c324f18a551060072 (patch)
tree03288d451a1ee888a6b368e52522c30f960f7a5c /libslab/nameplate-tile.c
parent47220bd4a0b39a07292cc76882b8e5bd7958a567 (diff)
downloadmate-control-center-9dc5fef7fcf9a1040c95055c324f18a551060072.tar.bz2
mate-control-center-9dc5fef7fcf9a1040c95055c324f18a551060072.tar.xz
libslab: avoid deprecated g_type_class_add_private
Diffstat (limited to 'libslab/nameplate-tile.c')
-rw-r--r--libslab/nameplate-tile.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libslab/nameplate-tile.c b/libslab/nameplate-tile.c
index 8e282ab6..cdf3c50b 100644
--- a/libslab/nameplate-tile.c
+++ b/libslab/nameplate-tile.c
@@ -37,8 +37,6 @@ typedef struct
GtkContainer *subheader_ctnr;
} NameplateTilePrivate;
-#define NAMEPLATE_TILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NAMEPLATE_TILE_TYPE, NameplateTilePrivate))
-
enum
{
PROP_0,
@@ -47,7 +45,7 @@ enum
PROP_NAMEPLATE_SUBHEADER,
};
-G_DEFINE_TYPE (NameplateTile, nameplate_tile, TILE_TYPE)
+G_DEFINE_TYPE_WITH_PRIVATE (NameplateTile, nameplate_tile, TILE_TYPE)
GtkWidget *nameplate_tile_new (const gchar * uri, GtkWidget * image, GtkWidget * header,
GtkWidget * subheader)
@@ -73,8 +71,6 @@ nameplate_tile_class_init (NameplateTileClass * this_class)
widget_class->drag_begin = nameplate_tile_drag_begin;
- g_type_class_add_private (this_class, sizeof (NameplateTilePrivate));
-
g_object_class_install_property (g_obj_class, PROP_NAMEPLATE_IMAGE,
g_param_spec_object ("nameplate-image", "nameplate-image", "nameplate image",
GTK_TYPE_WIDGET, G_PARAM_READWRITE));
@@ -133,7 +129,7 @@ nameplate_tile_set_property (GObject * g_object, guint prop_id, const GValue * v
GParamSpec * param_spec)
{
NameplateTile *this = NAMEPLATE_TILE (g_object);
- NameplateTilePrivate *priv = NAMEPLATE_TILE_GET_PRIVATE (this);
+ NameplateTilePrivate *priv = nameplate_tile_get_instance_private (this);
GObject *widget_obj = NULL;
@@ -208,7 +204,7 @@ nameplate_tile_set_property (GObject * g_object, guint prop_id, const GValue * v
static void
nameplate_tile_setup (NameplateTile *this)
{
- NameplateTilePrivate *priv = NAMEPLATE_TILE_GET_PRIVATE (this);
+ NameplateTilePrivate *priv = nameplate_tile_get_instance_private (this);
GtkWidget *hbox;
GtkWidget *vbox;