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 492200 - LinkButton with single param does not behave
LinkButton with single param does not behave
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2007-10-31 23:22 UTC by Marko Anastasov
Modified: 2007-11-05 08:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case, with C widgets to compare (1.35 KB, text/plain)
2007-10-31 23:24 UTC, Marko Anastasov
  Details
linkbutton_constructor.patch (1.76 KB, patch)
2007-11-04 12:11 UTC, Murray Cumming
none Details | Review
patch for constructor with uri (1.92 KB, patch)
2007-11-04 17:33 UTC, Marko Anastasov
none Details | Review

Description Marko Anastasov 2007-10-31 23:22:52 UTC
There is something wrong about LinkButtons constructed with one parameter (uri, which should then be used both as uri and label). A Button (parent) does seem to get created, but 4 GTK+ warnings "Gtk-CRITICAL **: gtk_widget_modify_fg: assertion `GTK_IS_WIDGET (widget)' failed" are produced.
Comment 1 Marko Anastasov 2007-10-31 23:24:48 UTC
Created attachment 98288 [details]
test case, with C widgets to compare

I do not know the reason. Looking at the hg file, it seems that everything is ok.
Comment 2 Murray Cumming 2007-11-03 15:41:11 UTC
gtk_link_button_new(label) does this:
   retval = g_object_new (GTK_TYPE_LINK_BUTTON,
  			 "uri", uri,
  			 "label", utf8_uri,
  			 NULL);

So, I guess we need to do something similar in our constructor to create the label string.
Comment 3 Murray Cumming 2007-11-04 12:11:13 UTC
Created attachment 98507 [details] [review]
linkbutton_constructor.patch

Does this fix it for you?
Comment 4 Marko Anastasov 2007-11-04 17:33:03 UTC
Created attachment 98527 [details] [review]
patch for constructor with uri

Almost :). The fix should be for the constructor with uri, passing it as a label as well (the one with uri and label is fine).
Comment 5 Marko Anastasov 2007-11-04 17:34:13 UTC
To make it clear, the patch above solves the problem.
Comment 6 Murray Cumming 2007-11-05 08:49:01 UTC
Yes, I realized this afterwards but forgot to update the newer patch. Sorry.

It's committed now. Thanks.