Add some more debugging to layout creation

This commit is contained in:
Chris Jones 2010-06-15 15:19:05 +01:00
parent a30ae88e2b
commit 5b5739df0e
6 changed files with 6 additions and 0 deletions

View File

@ -55,6 +55,7 @@ if __name__ == '__main__':
TERMINATOR.set_origcwd(ORIGCWD)
TERMINATOR.reconfigure()
try:
dbg('Creating a terminal with layout: %s' % OPTIONS.layout)
TERMINATOR.create_layout(OPTIONS.layout)
except (KeyError,ValueError), ex:
err('layout creation failed, creating a window ("%s")' % ex)

View File

@ -74,6 +74,7 @@ class Notebook(Container, gtk.Notebook):
for child_key in keys:
child = children[child_key]
dbg('Making a child of type: %s' % child['type'])
if child['type'] == 'Terminal':
continue
elif child['type'] == 'VPaned':

View File

@ -225,6 +225,7 @@ class Paned(Container):
num = 0
for child_key in keys:
child = children[child_key]
dbg('Making a child of type: %s' % child['type'])
if child['type'] == 'Terminal':
pass
elif child['type'] == 'VPaned':

View File

@ -1302,6 +1302,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
def create_layout(self, layout):
"""Apply our layout"""
dbg('Setting layout')
if layout.has_key('command') and layout['command'] != '':
self.layout_command = layout['command']
if layout.has_key('profile') and layout['profile'] != '':

View File

@ -212,6 +212,7 @@ class Terminator(Borg):
if layout[windef]['type'] != 'Window':
err('invalid layout format. %s' % layout)
raise(ValueError)
dbg('Creating a window')
window, terminal = self.new_window()
window.create_layout(layout[windef])
if layout[windef].has_key('position'):

View File

@ -652,6 +652,7 @@ class Window(Container, gtk.Window):
child = children[children.keys()[0]]
terminal = self.get_children()[0]
dbg('Making a child of type: %s' % child['type'])
if child['type'] == 'VPaned':
self.split_axis(terminal, True)
elif child['type'] == 'HPaned':