Rename top_theme_config to main_theme_config

Reason: preventing name conflict (top-level theme is a theme from #783).
This commit is contained in:
ZyX 2014-08-10 18:10:03 +04:00
parent 498da5362e
commit 3c243e1aa8
4 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,7 @@ class IpythonRenderer(ShellRenderer):
except KeyError:
match['theme'] = Theme(
theme_config=match['config'],
top_theme_config=self.theme_config,
main_theme_config=self.theme_config,
**self.theme_kwargs
)
return match['theme']

View File

@ -57,7 +57,7 @@ class VimRenderer(Renderer):
try:
return match['theme']
except KeyError:
match['theme'] = Theme(theme_config=match['config'], top_theme_config=self.theme_config, **self.theme_kwargs)
match['theme'] = Theme(theme_config=match['config'], main_theme_config=self.theme_config, **self.theme_kwargs)
return match['theme']
def get_theme(self, matcher_info):

View File

@ -51,7 +51,7 @@ class ZshPromptRenderer(ShellRenderer):
except KeyError:
match['theme'] = Theme(
theme_config=match['config'],
top_theme_config=self.theme_config,
main_theme_config=self.theme_config,
**self.theme_kwargs
)
return match['theme']

View File

@ -28,7 +28,7 @@ class Theme(object):
theme_config,
common_config,
pl,
top_theme_config=None,
main_theme_config=None,
run_once=False,
shutdown_event=None):
self.dividers = theme_config['dividers']
@ -45,8 +45,8 @@ class Theme(object):
}
self.pl = pl
theme_configs = [theme_config]
if top_theme_config:
theme_configs.append(top_theme_config)
if main_theme_config:
theme_configs.append(main_theme_config)
get_segment = gen_segment_getter(pl, ext, common_config, theme_configs, theme_config.get('default_module'))
for segdict in itertools.chain((theme_config['segments'],),
theme_config['segments'].get('above', ())):