GNOME Bugzilla – Bug 70227
GtkTextBuffer::tag_table property shouldn't be construct-only
Last modified: 2014-03-22 19:54:10 UTC
Currently there's no way for gtkmm (and maybe other language bindings) to initialize a GtkTextBuffer with an already created GtkTextTagTable, like gtk_text_buffer_new() does. This could be solved by adding a construct-only property ::tag_table to the GtkTextBuffer class.
Created attachment 6571 [details] [review] patch adding the ::tag_table property
And aside from the property there should maybe be a gtk_text_buffer_set_tag_table(), there's no reason this should be construct-only. Doh. Well, one for 2.2.
The patch looks basically OK, except that it would be better to do: g_object_new (GTK_TYPE_TEXT_BUFFER, "tag_table", table, NULL); In the _new() function. (This prevents an extra call to set_property for the tag_table property with table == NULL.)
Looks fine to commit to me.
Committed, with the change Owen suggested. Havoc, you said there's no reason for this property to be construct-only. Thus I'm leaving the bug open for now, though personally I don't care much about this.
Retitling. It seems like a fair bit of work to make this property not construct only if there are already tags in the buffer, you'd have to remove them or something.
closing out old bugs