summaryrefslogtreecommitdiff
path: root/src/caja-share-bar.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-12-15 16:56:51 +0100
committerZenWalker <[email protected]>2019-01-19 01:04:05 +0100
commit064c2ba27c61c7351cd27cc7a022a2e598e8b81f (patch)
tree86171614ac0cc6e56f04af8bd9051de7dad82b32 /src/caja-share-bar.c
parent4602ece9e4bc15581fe87cb632652257cf503c65 (diff)
downloadmate-user-share-064c2ba27c61c7351cd27cc7a022a2e598e8b81f.tar.bz2
mate-user-share-064c2ba27c61c7351cd27cc7a022a2e598e8b81f.tar.xz
caja-share-bar: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'src/caja-share-bar.c')
-rw-r--r--src/caja-share-bar.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/caja-share-bar.c b/src/caja-share-bar.c
index 6c62a26..8f76cae 100644
--- a/src/caja-share-bar.c
+++ b/src/caja-share-bar.c
@@ -27,8 +27,6 @@
#include "caja-share-bar.h"
-#define CAJA_SHARE_BAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CAJA_TYPE_SHARE_BAR, CajaShareBarPrivate))
-
struct CajaShareBarPrivate
{
GtkWidget *label;
@@ -39,7 +37,7 @@ enum {
PROP_LABEL
};
-G_DEFINE_TYPE (CajaShareBar, caja_share_bar, GTK_TYPE_INFO_BAR)
+G_DEFINE_TYPE_WITH_PRIVATE (CajaShareBar, caja_share_bar, GTK_TYPE_INFO_BAR)
static void
caja_share_bar_set_property (GObject *object,
@@ -70,8 +68,6 @@ caja_share_bar_class_init (CajaShareBarClass *klass)
object_class->set_property = caja_share_bar_set_property;
- g_type_class_add_private (klass, sizeof (CajaShareBarPrivate));
-
g_object_class_install_property (G_OBJECT_CLASS(klass), PROP_LABEL,
g_param_spec_string ("label", "label",
"The widget's main label",
@@ -89,7 +85,7 @@ caja_share_bar_init (CajaShareBar *bar)
GtkWidget *button;
PangoAttrList *attrs;
- bar->priv = CAJA_SHARE_BAR_GET_PRIVATE (bar);
+ bar->priv = caja_share_bar_get_instance_private (bar);
content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (bar));
action_area = gtk_info_bar_get_action_area (GTK_INFO_BAR (bar));