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 159184 - Defining a translation domain without a root element in Gtk2::GladeXML->new throws an error
Defining a translation domain without a root element in Gtk2::GladeXML->new t...
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: Gtk2::GladeXML
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2004-11-23 11:26 UTC by Martin G.
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin G. 2004-11-23 11:26:57 UTC
Try to load glade-file and define a translation domain as the last parameter,
but you don't specify a root-widget (second parameter). See this snipped below:

use Gtk2 -init;
use Gtk2::GladeXML;

our $gladexml =
Gtk2::GladeXML->new('myuserinterface.glade',undef,"myuserinterface");

This throws an error:
(userinterface.pl:25060): libglade-CRITICAL **: file glade-xml.c: line 1198
(glade_xml_build_interface): assertion `wid != NULL' failed

The above snipped should be fine, it should be possible to specify a translation
domain without defining a root element. If I use this:

our $gladexml =
Gtk2::GladeXML->new('myuserinterface.glade','mainWindow","myuserinterface");

everything works fine.
I found also a ruby-example, which uses my syntax:

@glade = GladeXML.new('myapp.glade', nil, 'myapp') ...
Comment 1 Torsten Schoenfeld 2004-11-25 17:21:03 UTC
Yeah, looks like all those constructors need to use _ornull for `root´ and
`domain´.  Ross, what do you think?
Comment 2 R. McFarland 2004-11-25 21:26:01 UTC
i'm not able to check into this at the moment, but that was my first thought. i
should be able to get to it later in the week/end.
Comment 3 R. McFarland 2004-11-28 17:25:11 UTC
was a bug, also present in several other functions. fixed and commited just now.
will be in subsequent releases starting with the next. (not yet planned)
workaround is to go ahead and specify the root widget. it is probably best to do
this anyway since older versions of Gtk2::GladeXML will require it and apps may
be run with them.