summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-25 04:29:55 +0200
committerlukefromdc <[email protected]>2019-08-29 20:39:27 +0000
commitcd3ff31b7e9092a1fcc178295389e480bc0b41cf (patch)
tree42611126580380b668472d5200bc1393008ba421 /src
parentae83e2a4e6a5a563602049b8553cdffad83394f3 (diff)
downloadmate-terminal-cd3ff31b7e9092a1fcc178295389e480bc0b41cf.tar.bz2
mate-terminal-cd3ff31b7e9092a1fcc178295389e480bc0b41cf.tar.xz
terminal-screen: avoid 'g_type_class_add_private'
Diffstat (limited to 'src')
-rw-r--r--src/terminal-screen.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index bff5c92..aba6cb1 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -190,7 +190,7 @@ static guint n_skey_regexes;
static void terminal_screen_skey_match_remove (TerminalScreen *screen);
#endif /* ENABLE_SKEY */
-G_DEFINE_TYPE (TerminalScreen, terminal_screen, VTE_TYPE_TERMINAL)
+G_DEFINE_TYPE_WITH_PRIVATE (TerminalScreen, terminal_screen, VTE_TYPE_TERMINAL)
static char *
cwd_of_pid (int pid)
@@ -341,7 +341,7 @@ terminal_screen_init (TerminalScreen *screen)
GtkTargetEntry *targets;
int n_targets;
- priv = screen->priv = G_TYPE_INSTANCE_GET_PRIVATE (screen, TERMINAL_TYPE_SCREEN, TerminalScreenPrivate);
+ priv = screen->priv = terminal_screen_get_instance_private (screen);
vte_terminal_set_mouse_autohide (VTE_TERMINAL (screen), TRUE);
#if VTE_CHECK_VERSION (0, 52, 0)
@@ -568,8 +568,6 @@ terminal_screen_class_init (TerminalScreenClass *klass)
G_TYPE_STRV,
G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
- g_type_class_add_private (object_class, sizeof (TerminalScreenPrivate));
-
/* Precompile the regexes */
n_url_regexes = G_N_ELEMENTS (url_regex_patterns);
url_regexes = g_new0 (GRegex*, n_url_regexes);