Skip to content
Permalink
Browse files

caja-share-bar: avoid deprecated 'g_type_class_add_private'

  • Loading branch information...
sc0w committed Dec 15, 2018
1 parent 4602ece commit 064c2ba27c61c7351cd27cc7a022a2e598e8b81f
Showing with 2 additions and 6 deletions.
  1. +2 −6 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));

0 comments on commit 064c2ba

Please sign in to comment.
You can’t perform that action at this time.