Cannot use files created with glade 3.10

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]

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.
https://bugzilla.redhat.com/show_bug.cgi?id=712924
https://bugs.launchpad.net/ubuntu/+source/glade/+bug/822861

I reverted to glade 3.8 for the time being.

On 19 August 2011 11:34, Simon A.
[email protected] 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

Simon A. wrote in post #1017458:

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

I found the upstream bug :

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

So you have 2 options:

Third option: abandon glade.

:slight_smile:

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

On 19 August 2011 18:13, Marc H. [email protected]
wrote:

So you have 2 options:

Third option: abandon glade.

:slight_smile:

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

On 19 August 2011 11:34, Simon A.
[email protected] 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

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs