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.set_origcwd(ORIGCWD)
|
||||||
TERMINATOR.reconfigure()
|
TERMINATOR.reconfigure()
|
||||||
try:
|
try:
|
||||||
|
dbg('Creating a terminal with layout: %s' % OPTIONS.layout)
|
||||||
TERMINATOR.create_layout(OPTIONS.layout)
|
TERMINATOR.create_layout(OPTIONS.layout)
|
||||||
except (KeyError,ValueError), ex:
|
except (KeyError,ValueError), ex:
|
||||||
err('layout creation failed, creating a window ("%s")' % ex)
|
err('layout creation failed, creating a window ("%s")' % ex)
|
||||||
|
@ -74,6 +74,7 @@ class Notebook(Container, gtk.Notebook):
|
|||||||
|
|
||||||
for child_key in keys:
|
for child_key in keys:
|
||||||
child = children[child_key]
|
child = children[child_key]
|
||||||
|
dbg('Making a child of type: %s' % child['type'])
|
||||||
if child['type'] == 'Terminal':
|
if child['type'] == 'Terminal':
|
||||||
continue
|
continue
|
||||||
elif child['type'] == 'VPaned':
|
elif child['type'] == 'VPaned':
|
||||||
|
@ -225,6 +225,7 @@ class Paned(Container):
|
|||||||
num = 0
|
num = 0
|
||||||
for child_key in keys:
|
for child_key in keys:
|
||||||
child = children[child_key]
|
child = children[child_key]
|
||||||
|
dbg('Making a child of type: %s' % child['type'])
|
||||||
if child['type'] == 'Terminal':
|
if child['type'] == 'Terminal':
|
||||||
pass
|
pass
|
||||||
elif child['type'] == 'VPaned':
|
elif child['type'] == 'VPaned':
|
||||||
|
@ -1302,6 +1302,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
|||||||
|
|
||||||
def create_layout(self, layout):
|
def create_layout(self, layout):
|
||||||
"""Apply our layout"""
|
"""Apply our layout"""
|
||||||
|
dbg('Setting layout')
|
||||||
if layout.has_key('command') and layout['command'] != '':
|
if layout.has_key('command') and layout['command'] != '':
|
||||||
self.layout_command = layout['command']
|
self.layout_command = layout['command']
|
||||||
if layout.has_key('profile') and layout['profile'] != '':
|
if layout.has_key('profile') and layout['profile'] != '':
|
||||||
|
@ -212,6 +212,7 @@ class Terminator(Borg):
|
|||||||
if layout[windef]['type'] != 'Window':
|
if layout[windef]['type'] != 'Window':
|
||||||
err('invalid layout format. %s' % layout)
|
err('invalid layout format. %s' % layout)
|
||||||
raise(ValueError)
|
raise(ValueError)
|
||||||
|
dbg('Creating a window')
|
||||||
window, terminal = self.new_window()
|
window, terminal = self.new_window()
|
||||||
window.create_layout(layout[windef])
|
window.create_layout(layout[windef])
|
||||||
if layout[windef].has_key('position'):
|
if layout[windef].has_key('position'):
|
||||||
|
@ -652,6 +652,7 @@ class Window(Container, gtk.Window):
|
|||||||
|
|
||||||
child = children[children.keys()[0]]
|
child = children[children.keys()[0]]
|
||||||
terminal = self.get_children()[0]
|
terminal = self.get_children()[0]
|
||||||
|
dbg('Making a child of type: %s' % child['type'])
|
||||||
if child['type'] == 'VPaned':
|
if child['type'] == 'VPaned':
|
||||||
self.split_axis(terminal, True)
|
self.split_axis(terminal, True)
|
||||||
elif child['type'] == 'HPaned':
|
elif child['type'] == 'HPaned':
|
||||||
|
Loading…
Reference in New Issue
Block a user