diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-04-25 00:09:41 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-04-25 00:09:41 +0200 |
commit | 2c23546ba90ff1a44789e9281d8fc952f0b40af5 (patch) | |
tree | 01469c18b6dd610d0fa9391752b1538f54a7c93d /gtk/gtktexthandle.c | |
parent | 9ed579505d40fb5283c8d31e096130dbe260e093 (diff) | |
download | gtk+-2c23546ba90ff1a44789e9281d8fc952f0b40af5.tar.gz |
gtktexthandle: Set parent through API call
The GtkWidget::parent property went readonly, use the API call
to ensure the text handle has a parent set.
Diffstat (limited to 'gtk/gtktexthandle.c')
-rw-r--r-- | gtk/gtktexthandle.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c index c38c3c08b5..fda579ca52 100644 --- a/gtk/gtktexthandle.c +++ b/gtk/gtktexthandle.c @@ -459,10 +459,14 @@ gtk_text_handle_init (GtkTextHandle *widget) GtkTextHandle * gtk_text_handle_new (GtkWidget *parent) { - return g_object_new (GTK_TYPE_TEXT_HANDLE, - "parent", parent, - "css-name", I_("cursor-handle"), - NULL); + GtkTextHandle *handle; + + handle = g_object_new (GTK_TYPE_TEXT_HANDLE, + "css-name", I_("cursor-handle"), + NULL); + gtk_widget_set_parent (GTK_WIDGET (handle), parent); + + return handle; } void |