summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-25 04:26:46 +0200
committerlukefromdc <[email protected]>2019-08-29 20:39:27 +0000
commitc0cbd749131558ae197b05dac18bfef01fd95e32 (patch)
tree66a5978c881f238513edf1e3c34a146d36883a01
parentadd12c82dbcec1562ea391b524ec2f2820ebf603 (diff)
downloadmate-terminal-c0cbd749131558ae197b05dac18bfef01fd95e32.tar.bz2
mate-terminal-c0cbd749131558ae197b05dac18bfef01fd95e32.tar.xz
terminal-tab-label: avoid 'g_type_class_add_private'
-rw-r--r--src/terminal-tab-label.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/terminal-tab-label.c b/src/terminal-tab-label.c
index 05355a7..c7ec6cb 100644
--- a/src/terminal-tab-label.c
+++ b/src/terminal-tab-label.c
@@ -25,8 +25,6 @@
#include "terminal-tab-label.h"
#include "terminal-close-button.h"
-#define TERMINAL_TAB_LABEL_GET_PRIVATE(tab_label)(G_TYPE_INSTANCE_GET_PRIVATE ((tab_label), TERMINAL_TYPE_TAB_LABEL, TerminalTabLabelPrivate))
-
#define SPACING (4)
struct _TerminalTabLabelPrivate
@@ -51,7 +49,7 @@ enum
static guint signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (TerminalTabLabel, terminal_tab_label, GTK_TYPE_BOX);
+G_DEFINE_TYPE_WITH_PRIVATE (TerminalTabLabel, terminal_tab_label, GTK_TYPE_BOX);
/* helper functions */
@@ -95,7 +93,7 @@ terminal_tab_label_parent_set (GtkWidget *widget,
static void
terminal_tab_label_init (TerminalTabLabel *tab_label)
{
- tab_label->priv = TERMINAL_TAB_LABEL_GET_PRIVATE (tab_label);
+ tab_label->priv = terminal_tab_label_get_instance_private (tab_label);
}
static GObject *
@@ -220,8 +218,6 @@ terminal_tab_label_class_init (TerminalTabLabelClass *klass)
TERMINAL_TYPE_SCREEN,
G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
G_PARAM_CONSTRUCT_ONLY));
-
- g_type_class_add_private (gobject_class, sizeof (TerminalTabLabelPrivate));
}
/* public API */