[Glade-devel] porting code from glade 1.2 version to 2.0 version



Dear Tristan,
I have defined a custom widget which is calling another glade xml
lsdstw.glade as defined below.

<widget class="Custom" id="well_select">
<property name="visible">True</property>
<property name="creation_function">glade_subtree</property>
<property name="string1">lsdstw.glade</property>
<property name="string2">dialog-elements</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Tue, 05 Mar 2002 18:06:16 GMT</property>
</widget>

Now how can I register the widgets of lsdstw.glade so that we see the
complete UI which consists of the main glade xml and the widgets of
lsdstw.glade.
What is the significance of the property "creation_function".
Individually both the xml are openning perfectlly.

Thanks in Advance
Avtar

On 11/28/06, Tristan Van Berkom <tvb at gnome.org> wrote:
Avtar Singh wrote:
Dear Tristan,

Thanks for your prompt reply.
I am a novice to glade. Can you please elaborate as how we can load custom
widget using IMO or some place where I can find examples of its
implementation.

Heh,
   IMO is "In My Opinion" :) you should look at the libglade tarball,
libglade is what you'll be using to load your glade file at runtime.

in the libglade tarball, look specificly at libglade/glade/glade-gtk.c,
in that file, glade_xml_register_widget() is called on all widget types
supported from gtk+, you can use that file as an example of what you
want to do in your app before loading a glade file containing your custom
type.

Cheers,
                       -Tristan






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]