Merge pull request #736 from rkashinin/issue-676

Fix for issue #676: title field not seem to be working with JSON profile
This commit is contained in:
Matt Rose 2023-08-26 21:49:12 -04:00 committed by GitHub
commit a6a0eca553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 4 deletions

View File

@ -55,14 +55,23 @@ class ConfigJson(object):
def build_terminal_layout(self, layoutjson, children, parent, order):
dbg ('Building a terminal from json: %s' % layoutjson)
def from_json(layout_name, json_name=None):
if json_name is None:
json_name = layout_name
if json_name in layoutjson:
children[parent + "." + str(order)][layout_name] = layoutjson[json_name]
children[parent + "." + str(order)] = {
'type': 'Terminal',
'order': order,
'parent': parent,
'profile': self.profile_to_use,
'command': layoutjson['command']
'profile': self.profile_to_use
}
from_json('command')
from_json('title')
def build_container_layout(self, layoutjson, children, parent, order, vertical):
if len(layoutjson) == 1:
layoutjson = layoutjson[0]