Add some more debugging to layout creation
This commit is contained in:
parent
a30ae88e2b
commit
5b5739df0e
@ -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)
|
||||
|
@ -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':
|
||||
|
@ -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':
|
||||
|
@ -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'] != '':
|
||||
|
@ -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'):
|
||||
|
@ -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':
|
||||
|
Loading…
Reference in New Issue
Block a user