summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-26 18:57:12 +0200
committerlukefromdc <[email protected]>2019-08-29 20:39:27 +0000
commit3745b0e978e7488f4d2fbedc071ae70861219d3c (patch)
tree63b5ef1111cdbb4f76d7437ac176089ba6fc993a /src
parentcd3ff31b7e9092a1fcc178295389e480bc0b41cf (diff)
downloadmate-terminal-3745b0e978e7488f4d2fbedc071ae70861219d3c.tar.bz2
mate-terminal-3745b0e978e7488f4d2fbedc071ae70861219d3c.tar.xz
terminal-screen-container: avoid 'g_type_class_add_private'
Diffstat (limited to 'src')
-rw-r--r--src/terminal-screen-container.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/terminal-screen-container.c b/src/terminal-screen-container.c
index 2963edf..8e7418a 100644
--- a/src/terminal-screen-container.c
+++ b/src/terminal-screen-container.c
@@ -25,8 +25,6 @@
#include <gtk/gtk.h>
-#define TERMINAL_SCREEN_CONTAINER_GET_PRIVATE(screen_container)(G_TYPE_INSTANCE_GET_PRIVATE ((screen_container), TERMINAL_TYPE_SCREEN_CONTAINER, TerminalScreenContainerPrivate))
-
struct _TerminalScreenContainerPrivate
{
TerminalScreen *screen;
@@ -52,7 +50,7 @@ enum
PROP_WINDOW_PLACEMENT_SET
};
-G_DEFINE_TYPE (TerminalScreenContainer, terminal_screen_container, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (TerminalScreenContainer, terminal_screen_container, GTK_TYPE_BOX)
/* helper functions */
@@ -117,7 +115,7 @@ terminal_screen_container_init (TerminalScreenContainer *container)
{
TerminalScreenContainerPrivate *priv;
- priv = container->priv = TERMINAL_SCREEN_CONTAINER_GET_PRIVATE (container);
+ priv = container->priv = terminal_screen_container_get_instance_private (container);
priv->hscrollbar_policy = GTK_POLICY_AUTOMATIC;
priv->vscrollbar_policy = GTK_POLICY_AUTOMATIC;
@@ -251,8 +249,6 @@ terminal_screen_container_class_init (TerminalScreenContainerClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (gobject_class, sizeof (TerminalScreenContainerPrivate));
-
gobject_class->constructor = terminal_screen_container_constructor;
gobject_class->get_property = terminal_screen_container_get_property;
gobject_class->set_property = terminal_screen_container_set_property;