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 722574 - GtkAboutDialog doesn't get headerbars when used from JS
GtkAboutDialog doesn't get headerbars when used from JS
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.11.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-01-19 22:33 UTC by Cosimo Cecchi
Modified: 2014-01-24 20:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
aboutdialog: make use-header-bar override work from bindings (2.62 KB, patch)
2014-01-19 22:50 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2014-01-19 22:33:32 UTC
GtkAboutDialog calls g_object_new() with "use-header-bar = TRUE" in gtk_about_dialog_new().
While this works fine for C applications calling that function, it doesn't work when GtkAboutDialog is used from JS (and other bindings), as in that case g_object_new() will be called by the binding without the correct property value.
It shouldn't be necessary for a JS application to manually specify use-header-bar = TRUE in order to get the new style.
Comment 1 Cosimo Cecchi 2014-01-19 22:50:19 UTC
Created attachment 266685 [details] [review]
aboutdialog: make use-header-bar override work from bindings

Instead of setting "use-header-bar" from gtk_about_dialog_new(),
override its default value by inspecting the properties at constructor()
time. This makes it work from bindings as well, since they don't use the
convenience C constructor.

--

This is not very pretty, but I couldn't think of another way of overriding this cleanly.
Comment 2 Matthias Clasen 2014-01-23 05:26:55 UTC
Review of attachment 266685 [details] [review]:

Ugh, ughly. But ok, lets do that, now that we've started down this road...
Comment 3 Matthias Clasen 2014-01-24 20:57:22 UTC
Attachment 266685 [details] pushed as 22bcd62 - aboutdialog: make use-header-bar override work from bindings