diff options
author | Pablo Barciela <[email protected]> | 2019-07-28 05:30:18 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-07-29 00:42:12 +0000 |
commit | 6266a98800e5f0d571d8617a0d2265a3a7524f33 (patch) | |
tree | 00ad6067bed66a51cb322a6a833f06389c8398d0 /pluma | |
parent | ddf34a5cac67ca0a189fc44089121c77423f6d6c (diff) | |
download | pluma-6266a98800e5f0d571d8617a0d2265a3a7524f33.tar.bz2 pluma-6266a98800e5f0d571d8617a0d2265a3a7524f33.tar.xz |
pluma-view: avoid 'g_type_class_add_private'
Diffstat (limited to 'pluma')
-rw-r--r-- | pluma/pluma-view.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pluma/pluma-view.c b/pluma/pluma-view.c index cb115574..82546206 100644 --- a/pluma/pluma-view.c +++ b/pluma/pluma-view.c @@ -54,8 +54,6 @@ #define MIN_SEARCH_COMPLETION_KEY_LEN 3 -#define PLUMA_VIEW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_VIEW, PlumaViewPrivate)) - /* Local variables */ static gboolean middle_or_right_down = FALSE; @@ -152,7 +150,7 @@ static void pluma_view_delete_from_cursor (GtkTextView *text_view, GtkDeleteType type, gint count); -G_DEFINE_TYPE(PlumaView, pluma_view, GTK_SOURCE_TYPE_VIEW) +G_DEFINE_TYPE_WITH_PRIVATE (PlumaView, pluma_view, GTK_SOURCE_TYPE_VIEW) /* Signals */ enum @@ -300,8 +298,6 @@ pluma_view_class_init (PlumaViewClass *klass) g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, G_TYPE_STRV); - g_type_class_add_private (klass, sizeof (PlumaViewPrivate)); - binding_set = gtk_binding_set_by_class (klass); gtk_binding_entry_add_signal (binding_set, @@ -460,7 +456,7 @@ pluma_view_init (PlumaView *view) pluma_debug (DEBUG_VIEW); - view->priv = PLUMA_VIEW_GET_PRIVATE (view); + view->priv = pluma_view_get_instance_private (view); /* * Set tab, fonts, wrap mode, colors, etc. according |