Remove filler segment type

It was replaced with `"width": "auto"` and is not used anywhere. I do not even 
know whether it works.
This commit is contained in:
ZyX 2014-08-30 16:08:30 +04:00
parent d714fb0d88
commit f320fb3df3
4 changed files with 7 additions and 14 deletions

View File

@ -370,8 +370,8 @@ ascii Theme without any unicode characters at all
Each segment dictionary has the following options: Each segment dictionary has the following options:
``type`` ``type``
The segment type. Can be one of ``function`` (default), ``string``, The segment type. Can be one of ``function`` (default), ``string`` or
``filler`` or ``segments_list``: ``segments_list``:
``function`` ``function``
The segment contents is the return value of the function defined in The segment contents is the return value of the function defined in

View File

@ -810,13 +810,11 @@ generic_keys = set((
type_keys = { type_keys = {
'function': set(('function', 'args', 'draw_inner_divider')), 'function': set(('function', 'args', 'draw_inner_divider')),
'string': set(('contents', 'type', 'highlight_group', 'divider_highlight_group')), 'string': set(('contents', 'type', 'highlight_group', 'divider_highlight_group')),
'filler': set(('type', 'highlight_group', 'divider_highlight_group')),
'segment_list': set(('function', 'segments', 'args', 'type')), 'segment_list': set(('function', 'segments', 'args', 'type')),
} }
required_keys = { required_keys = {
'function': set(('function',)), 'function': set(('function',)),
'string': set(()), 'string': set(()),
'filler': set(),
'segment_list': set(('function', 'segments',)), 'segment_list': set(('function', 'segments',)),
} }
highlight_keys = set(('highlight_group', 'name')) highlight_keys = set(('highlight_group', 'name'))

View File

@ -186,11 +186,11 @@ class Renderer(object):
def render(self, mode=None, width=None, side=None, line=0, output_raw=False, output_width=False, segment_info=None, matcher_info=None): def render(self, mode=None, width=None, side=None, line=0, output_raw=False, output_width=False, segment_info=None, matcher_info=None):
'''Render all segments. '''Render all segments.
When a width is provided, low-priority segments are dropped one at When a width is provided, low-priority segments are dropped one at
a time until the line is shorter than the width, or only segments a time until the line is shorter than the width, or only segments
with a negative priority are left. If one or more filler segments are with a negative priority are left. If one or more segments with
provided they will fill the remaining space until the desired width is ``"width": "auto"`` are provided they will fill the remaining space
reached. until the desired width is reached.
:param str mode: :param str mode:
Mode string. Affects contents (colors and the set of segments) of Mode string. Affects contents (colors and the set of segments) of

View File

@ -75,14 +75,9 @@ def get_string(data, segment):
return data['get_key'](False, segment, None, None, name, 'contents'), None, None, None, name return data['get_key'](False, segment, None, None, name, 'contents'), None, None, None, name
def get_filler(data, segment):
return None, None, None, None, None
segment_getters = { segment_getters = {
'function': get_function, 'function': get_function,
'string': get_string, 'string': get_string,
'filler': get_filler,
'segment_list': get_function, 'segment_list': get_function,
} }