Source

gtkarchitect-main / gtkarchitect / utils / debug.py

Full commit

import gtk

from lxml.etree import tostring

from ..view.base import Slave

class DebugSlave(Slave):


    def create_ui(self):
        t = self.get_toplevel()
        buttons = gtk.HBox()
        t.pack_start(buttons, expand=False)

        self.dump_button = gtk.Button('Dump')
        buttons.pack_start(self.dump_button, expand=False)

    def set_main(self, mainview):
        self.main = mainview

    def on_dump_button__clicked(self, button):
        p = self.main.project
        print p
        print tostring(p.tree)