tags:

views:

46

answers:

1

I'm working on a project where someone wrote a PyGTK GUI that uses docks from GDL. He has the GUI saved as an XML file:

<?xml version="1.0"?>
<interface>
  <requires lib="gtk+" version="2.16"/>
  <object class="GtkUIManager" id="uimanager"/>
  <object class="GtkWindow" id="mainWindow">
    <property name="title" translatable="yes">Title</property>
...

The code calls

self.dock_layout.load_from_file("gui_layout.xml")

I need to remove the GDL dependency. Can I still use the XML layout? If so, how?

A: 

This seems to be a GtkBuilder file. You can use it, e.g.

builder = gtk.Builder()
builder.add_from_file("gui_layout.xml")

window = builder.get_object("mainWindow")
Johannes Sasongko