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 790452 - Glade saves invalid GtkBuilder XML
Glade saves invalid GtkBuilder XML
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-11-16 16:44 UTC by Link Dupont
Modified: 2017-11-18 15:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
git repository demonstrating the error (113.51 KB, application/x-compressed-tar)
2017-11-16 16:44 UTC, Link Dupont
Details

Description Link Dupont 2017-11-16 16:44:12 UTC
Created attachment 363849 [details]
git repository demonstrating the error

# Description #

Glade saves changes to a GtkBuilder XML file that breaks the UI as loaded by the default GNOME Builder template.

# Steps to Reproduce #

1. Create a new GNOME application project using GNOME Builder
2. Build & Run
3. Open the .ui file in Glade & save
4. Build & Run again

# Expected Results #

The window to appear exactly as it does before saving the UI file.

# Actual Results #

UI elements are no longer visible.

# Notes #

I spoke with TingPing on IRC, it looks like it might be a problem with the way Glade handles 'true' versus 'True'.

https://github.com/GNOME/gtk/blob/master/gtk/gtkbuilder.c#L2371-L2401

https://github.com/GNOME/glade/blob/bdd647d57fb072edd083a0c6bb1e6ba55fb18288/gladeui/glade-xml-utils.c#L310-L351

I've attached a git repo containing a project that demonstrates the UI error.
Comment 1 Patrick Griffis (tingping) 2017-11-16 17:26:15 UTC
Builder will use the casing Glade expects in future releases: https://git.gnome.org/browse/gnome-builder/commit/?id=b852c8c
Comment 2 Juan Pablo Ugarte 2017-11-18 15:08:31 UTC
(In reply to Link Dupont from comment #0)
> 
> https://github.com/GNOME/glade/blob/bdd647d57fb072edd083a0c6bb1e6ba55fb18288/
> gladeui/glade-xml-utils.c#L310-L351

Thanks for the report!, thats not the only place where the conversion is done 

https://github.com/GNOME/glade/blob/bdd647d57fb072edd083a0c6bb1e6ba55fb18288/gladeui/glade-property-class.c#L868-L874

anyways, I added a new function to utils.c so that we can use it in both places

gboolean
glade_utils_boolean_from_string (const gchar *string, gboolean *value)


Fixed in master and 3.20 branch