After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 172631 - GtkTextBuffer::text
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Blocks: gtkbuilder
Reported: 2005-04-04 18:51 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2005-04-04 23:30 UTC
See Also:
GNOME target: ---
GNOME version: ---

proposed patch (1.95 KB, patch)
2005-04-04 19:50 UTC, Johan (not receiving bugmail) Dahlin
none Details | Review
v2: updated comment (2.05 KB, patch)
2005-04-04 23:00 UTC, Johan (not receiving bugmail) Dahlin
none Details | Review

Description Johan (not receiving bugmail) Dahlin 2005-04-04 18:51:50 UTC
For UI Builders it's important to be able to set the text through GObject
Comment 1 Johan (not receiving bugmail) Dahlin 2005-04-04 19:50:55 UTC
Created attachment 39683 [details] [review]
proposed patch
Comment 2 Matthias Clasen 2005-04-04 21:18:27 UTC
Hmm. the documentation at least should mention that invisible text and
placeholders for images and child widgets are omitted. Maybe refer to
gtk_text_buffer_get_text() for details. It is unfortunate that
we can't guarantee that 

g_object_get (buffer, "text", text, NULL);
g_object_set (buffer, "text", text, NULL);

is a noop
Comment 3 Johan (not receiving bugmail) Dahlin 2005-04-04 23:00:14 UTC
Created attachment 39690 [details] [review]
v2: updated comment
Comment 4 Matthias Clasen 2005-04-04 23:05:19 UTC
Sorry to appear pedantic, but the PROP_TEXT is at the wrong spot in the enum
declaration, its under the /* Construct */ comment, but not a construct property.

And you should add a g_object_notify() call in the setter.

After doing these changes, feel free to commit.
Comment 5 Johan (not receiving bugmail) Dahlin 2005-04-04 23:30:19 UTC
Checking in ChangeLog;
/cvs/gnome/gtk+/ChangeLog,v  <--  ChangeLog
new revision: 1.6499; previous revision: 1.6498
Checking in gtk/gtktextbuffer.c;
/cvs/gnome/gtk+/gtk/gtktextbuffer.c,v  <--  gtktextbuffer.c
new revision: 1.101; previous revision: 1.100