mirror of
https://github.com/powerline/powerline.git
synced 2025-07-27 07:44:36 +02:00
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:
parent
498da5362e
commit
3c243e1aa8
@ -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']
|
||||
|
@ -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):
|
||||
|
@ -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']
|
||||
|
@ -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', ())):
|
||||
|
Loading…
x
Reference in New Issue
Block a user