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 317455 - Problem copying GtkTextAttributes boxed values
Problem copying GtkTextAttributes boxed values
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-09-28 17:42 UTC by Gustavo Carneiro
Modified: 2005-09-30 22:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test program (462 bytes, text/x-csrc)
2005-09-28 17:43 UTC, Gustavo Carneiro
  Details
fix (922 bytes, patch)
2005-09-28 17:52 UTC, Gustavo Carneiro
none Details | Review

Description Gustavo Carneiro 2005-09-28 17:42:29 UTC
This causes invalid data:
    attrs_copy = g_boxed_copy(GTK_TYPE_TEXT_ATTRIBUTES, attrs);
Comment 1 Gustavo Carneiro 2005-09-28 17:43:27 UTC
Created attachment 52780 [details]
test program

This test program prints:
** Message: scale: 1
** Message: copy: scale: 1.39612e-309
Comment 2 Gustavo Carneiro 2005-09-28 17:52:20 UTC
Created attachment 52781 [details] [review]
fix

Problem was that gtk_text_attributes_ref returns void.
Comment 3 Matthias Clasen 2005-09-28 20:32:14 UTC
2005-09-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktexttag.h: 
	* gtk/gtktexttag.c (gtk_text_attributes_ref): Return the attributes
	to make this function work as boxed copy function.  (#317455,
	Gustavo Carneiro)
Comment 4 Gustavo Carneiro 2005-09-30 22:09:03 UTC
Just one comment for future reference:  there's a workaround for this in PyGTK
CVS, it will be in PyGTK 2.8.1.