diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 39063355ec..bbdf7efb68 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -146,8 +146,6 @@ #define SPACE_FOR_CURSOR 1 #define CURSOR_ASPECT_RATIO (0.04) -#define GTK_TEXT_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_TEXT_VIEW, GtkTextViewPrivate)) - typedef struct _GtkTextWindow GtkTextWindow; typedef struct _GtkTextPendingScroll GtkTextPendingScroll; diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c index e7571b88c2..6232043f10 100644 --- a/gtk/gtktoolbutton.c +++ b/gtk/gtktoolbutton.c @@ -279,6 +279,10 @@ gtk_tool_button_init (GtkToolButton *button, { GtkToolItem *toolitem = GTK_TOOL_ITEM (button); + /* We still need to use G_TYPE_INSTANCE_GET_PRIVATE() because GtkToolButton + need to access the class pointer inside instance_init + See a detailed explanation of this at + https://gitlab.gnome.org/GNOME/gtk/merge_requests/402#note_361210 */ button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button, GTK_TYPE_TOOL_BUTTON, GtkToolButtonPrivate);