summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-27 00:20:00 +0200
committerlukefromdc <[email protected]>2019-07-26 23:00:36 +0000
commit1f01f6f7462c7691ecda7b9aec7eca01d4984cba (patch)
tree3f00abdda8bd279a0550fd4044abf8c344ebaed5
parent13ed8ee74870c8cfe9e07619002b3aad26abf957 (diff)
downloadpluma-1f01f6f7462c7691ecda7b9aec7eca01d4984cba.tar.bz2
pluma-1f01f6f7462c7691ecda7b9aec7eca01d4984cba.tar.xz
pluma-tab: avoid 'g_type_class_add_private'
-rw-r--r--pluma/pluma-tab.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/pluma/pluma-tab.c b/pluma/pluma-tab.c
index d98fce29..daff4dd0 100644
--- a/pluma/pluma-tab.c
+++ b/pluma/pluma-tab.c
@@ -45,8 +45,6 @@
#include "pluma-prefs-manager-app.h"
#include "pluma-enum-types.h"
-#define PLUMA_TAB_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_TAB, PlumaTabPrivate))
-
#define PLUMA_TAB_KEY "PLUMA_TAB_KEY"
struct _PlumaTabPrivate
@@ -84,7 +82,7 @@ struct _PlumaTabPrivate
guint idle_scroll;
};
-G_DEFINE_TYPE(PlumaTab, pluma_tab, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (PlumaTab, pluma_tab, GTK_TYPE_BOX)
enum
{
@@ -291,8 +289,6 @@ pluma_tab_class_init (PlumaTabClass *klass)
0,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
-
- g_type_class_add_private (object_class, sizeof (PlumaTabPrivate));
}
/**
@@ -1488,7 +1484,7 @@ pluma_tab_init (PlumaTab *tab)
PlumaDocument *doc;
PlumaLockdownMask lockdown;
- tab->priv = PLUMA_TAB_GET_PRIVATE (tab);
+ tab->priv = pluma_tab_get_instance_private (tab);
tab->priv->state = PLUMA_TAB_STATE_NORMAL;