Re: GtkBuilder partial tree construction
- From: Johan Dahlin <jdahlin async com br>
- To: Murray Cumming <murrayc murrayc com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: GtkBuilder partial tree construction
- Date: Wed, 27 Jun 2007 11:36:46 -0300
Murray Cumming wrote:
> On Wed, 2007-06-27 at 11:12 -0300, Johan Dahlin wrote:
>> Murray Cumming wrote:
>>> By the way, if GtkBuilder can't be used for multiple top-level widgets,
>>> we should probably check that gtk_builder_add_from_*() are not called
>>> twice on the same instance.
>>> Or does "merge" mean something special in
>>> "
>>> Parses a file containing a <link linkend="BUILDER-UI">GtkBuilder UI
>>> definition</link> and merges it with the current contents of @builder.
>>> "
>>> ?
>> Yes, you're able to create xml definitions which refers to object created by
>> previous calls to gtk_builder_add_*.
>
> But I guess that's not implemented at all yet, right, or is it just
> "XUL-style overlays" that are not implemented?
The former, you can already do this;
(in the not yet wrapped python API)
builder = gtk.Builder()
builder.add_from_string("""
<interface>
<object class="GtkListStore" id="liststore1"/>
</interface>""")
builder.add_from_string("""
<interface>
<object class="GtkWindow" id="window1">
<child>
<object class="GtkComboBox" id="combobox1">
<property name="model">liststore1</property>
</object>
</child>
</object>
</interface>""")
The first call will create the tree model.
The second one will create an combobox in a window using the model.
--
Johan Dahlin <jdahlin async com br>
Async Open Source
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]