50
50
# Doesn't set a parent for the dialog..
51
51
if response == gtk.RESPONSE_NO:
53
assert self.branch.nick is not None
53
54
loom_branch.loomify(self.branch)
54
55
return super(LoomDialog, self).run()
56
57
def _construct(self):
58
self._threads_scroller = gtk.ScrolledWindow()
59
self._threads_scroller.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
57
60
self._threads_view = gtk.TreeView()
58
61
self._threads_view.show()
59
self.vbox.pack_start(self._threads_view)
62
self._threads_scroller.add(self._threads_view)
63
self._threads_scroller.set_shadow_type(gtk.SHADOW_IN)
64
self._threads_scroller.show()
65
self.vbox.pack_start(self._threads_scroller)
67
self._threads_store = gtk.ListStore(
68
gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_PYOBJECT)
69
self._threads_view.set_model(self._threads_store)
70
self._threads_view.append_column(gtk.TreeViewColumn("Name", gtk.CellRendererText(), text=0))
61
72
# Buttons: combine-thread, export-loom, revert-loom, up-thread
73
self.set_default_size(200, 350)
77
def _load_threads(self):
78
self._threads_store.clear()
80
self.branch.lock_read()
82
threads = self.branch.get_loom_state().get_threads()
83
for thread in reversed(threads):
84
self._threads_store.append(thread)