# Cannot use files created with glade 3.10

**URL:** <https://www.ruby-forum.com/t/cannot-use-files-created-with-glade-3-10/210844>\
**Category:** Ruby-Gnome 2\
**Created:** [August 18, 2011, 5:52pm UTC](https://www.ruby-forum.com/t/cannot-use-files-created-with-glade-3-10/210844 "2011-08-18T17:52:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [August 18, 2011, 5:52pm UTC](https://www.ruby-forum.com/t/cannot-use-files-created-with-glade-3-10/210844/1 "2011-08-18T17:52:42Z")

</div>

Hello

glade 3.10 (as opposed to 3.7) now creates files with GtkBox with  
property direction (as opposed to GtkHBox and GtkVBox). The same with  
GtkButtonBox (and probably split).

ruby-gtk2 1.0.0-1 crashes on reading those.

GLib-GObject-WARNING \*\*:cannot create instance of abstract  
(non-instantiatable) type `GtkButtonBox’  
testcombo.rb:24: [BUG] Segmentation fault  
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86\_64-linux]

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [August 19, 2011, 10:09am UTC](https://www.ruby-forum.com/t/cannot-use-files-created-with-glade-3-10/210844/2 "2011-08-19T10:09:27Z")

</div>

Michal S. wrote in post #1017321:

> Hello
> 
> glade 3.10 (as opposed to 3.7) now creates files with GtkBox with  
> property direction (as opposed to GtkHBox and GtkVBox). The same with  
> GtkButtonBox (and probably split).
> 
> ruby-gtk2 1.0.0-1 crashes on reading those.
> 
> GLib-GObject-WARNING \*\*:cannot create instance of abstract  
> (non-instantiatable) type `GtkButtonBox’  
> testcombo.rb:24: [BUG] Segmentation fault  
> ruby 1.8.7 (2011-06-30 patchlevel 352) [x86\_64-linux]

It’s a glade bug.

It has ben reported here and there, but not upstream, afaik.

> **[712924 – Glade creates GtkBox instead of GtkHBox or GtkVBox](https://bugzilla.redhat.com/show_bug.cgi?id=712924)**

> **[Bug #822861 “glade creates GtkBox instead of GtkHBox or GtkVBox” : Bugs :...](https://bugs.launchpad.net/ubuntu/+source/glade/+bug/822861)**
>
> Glade creates instances of abstract (non-instantiatable) types, e.g. GtkBox instead of GtkHBox/GtkVBox, GtkPaned instead of GTKHPaned/GtkVPaned, etc.
> 
> When loading such a ui file from builder, I get this error message:
> "Warning: cannot create...

I reverted to glade 3.8 for the time being.

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [August 19, 2011, 1:27pm UTC](https://www.ruby-forum.com/t/cannot-use-files-created-with-glade-3-10/210844/3 "2011-08-19T13:27:01Z")

</div>

On 19 August 2011 11:34, Simon A.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> So you have 2 options :
> 
> - Use glade 3.8
> - Make ruby-gnome2 GTK3 compatible

Not sure what the latter would take.

Is the xml read in Ruby or passed verbatim to some gtk function?

Preprocessing the V/H boxes should be easy enough but there might be  
other changes I did not hit so far.

Thanks

Michal

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [August 19, 2011, 11:34am UTC](https://www.ruby-forum.com/t/cannot-use-files-created-with-glade-3-10/210844/4 "2011-08-19T11:34:10Z")

</div>

Simon A. wrote in post #1017458:

> It has ben reported here and there, but not upstream, afaik.

I found the upstream bug :

> **[Bug 652673 – Project versions are ignored](https://bugzilla.gnome.org/show_bug.cgi?id=652673)**

However, they are basically saying that glade 3.10 is for GTK3, and that  
it won’t be fixed.

So you have 2 options :

- Use glade 3.8
- Make ruby-gnome2 GTK3 compatible

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [August 19, 2011, 6:13pm UTC](https://www.ruby-forum.com/t/cannot-use-files-created-with-glade-3-10/210844/5 "2011-08-19T18:13:04Z")

</div>

> So you have 2 options:

Third option: abandon glade.

🙂

But kidding aside, I myself abandoned the XML world and won’t go back to  
it again. I think it was a good choice.

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [August 19, 2011, 6:34pm UTC](https://www.ruby-forum.com/t/cannot-use-files-created-with-glade-3-10/210844/6 "2011-08-19T18:34:54Z")

</div>

On 19 August 2011 18:13, Marc H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > So you have 2 options:
> 
> Third option: abandon glade.
> 
> 🙂
> 
> But kidding aside, I myself abandoned the XML world and won’t go back to  
> it again. I think it was a good choice.

I am not _looking_ at the xml representation of the UI.

Well, I lie. In fact I am right now because it broke.

But I don’t care what format it is so long as it is static data that I  
can tune outside of my code and just load in.

Generating the UI dynamically on the fly from the program has its uses  
but should not be the standard way to display an UI.

Thanks

Michal

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [August 23, 2011, 3:52pm UTC](https://www.ruby-forum.com/t/cannot-use-files-created-with-glade-3-10/210844/7 "2011-08-23T15:52:21Z")

</div>

On 19 August 2011 11:34, Simon A.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> So you have 2 options :
> 
> - Use glade 3.8
> - Make ruby-gnome2 GTK3 compatible

FWIW I wrote something like the glade 3.10 glade-previewer in ruby  
which can read the glade3 layouts, at least for me.

It uses Nokogiri to change the layout so that it can be instantiated  
using ruby-gnome2.

Obviously, not all elements are straightforward to update and there  
are some I don’t use so they might not work with some options or at  
all.

Attaching the script.

Thanks

Michal

---

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [November 30, 2012, 2:13pm UTC](https://www.ruby-forum.com/t/cannot-use-files-created-with-glade-3-10/210844/8 "2012-11-30T14:13:54Z")

</div>

Michal S. wrote in post #1018053:

> FWIW I wrote something like the glade 3.10 glade-previewer in ruby  
> which can read the glade3 layouts, at least for me.
> 
> It uses Nokogiri to change the layout so that it can be instantiated  
> using ruby-gnome2.
> 
> Obviously, not all elements are straightforward to update and there  
> are some I don’t use so they might not work with some options or at  
> all.

thank you very much ; it does the job very nicely.
