parent
5390ded5d0
commit
a3ef1000ad
|
@ -100,6 +100,10 @@ class Fundamental(Handler):
|
|||
completers = {}
|
||||
format = "%(flag)s %(bname)-18s (%(mname)s) %(indent)s %(cursor)s/%(mark)s %(perc)s"
|
||||
|
||||
header_size = 3
|
||||
header_fg = 'default'
|
||||
header_bg = 'blue'
|
||||
|
||||
## margins
|
||||
def _get_header(self): return self.get_setting('header')
|
||||
def _set_header(self, value): return self.set_setting('header', value)
|
||||
|
@ -287,7 +291,7 @@ class Fundamental(Handler):
|
|||
def showing_header(self):
|
||||
return self.header != 0
|
||||
def _enable_header(self):
|
||||
self.header = 1
|
||||
self.header = self.header_size
|
||||
def _disable_header(self):
|
||||
self.header = 0
|
||||
|
||||
|
@ -313,11 +317,8 @@ class Fundamental(Handler):
|
|||
self.lmargin = 0
|
||||
|
||||
# headers and margins
|
||||
#def get_header(self):
|
||||
# fg, bg = "default", "red"
|
||||
# return [RenderString(s='header', attrs=color.build(fg, bg))]
|
||||
def get_header(self):
|
||||
fg, bg = "default", "red"
|
||||
fg, bg = self.header_fg, self.header_bg
|
||||
|
||||
if self.tabber is None:
|
||||
s = "Header support is not available for this mode"
|
||||
|
|
|
@ -568,6 +568,7 @@ class Python(mode.Fundamental):
|
|||
|
||||
#format = "%(flag)s %(bname)-18s (%(mname)s) %(indent)s %(cursor)s/%(mark)s %(perc)s [%(name)s]"
|
||||
format = "%(flag)s %(bname)-18s (%(mname)s) %(indent)s %(cursor)s/%(first)s %(perc)s [%(name)s]"
|
||||
header_size = 3
|
||||
|
||||
def get_status_names(self):
|
||||
names = mode.Fundamental.get_status_names(self)
|
||||
|
@ -577,10 +578,6 @@ class Python(mode.Fundamental):
|
|||
return names
|
||||
|
||||
# xyz
|
||||
def _enable_header(self):
|
||||
self.header = 3
|
||||
def _disable_header(self):
|
||||
self.header = 0
|
||||
def get_header(self):
|
||||
fg, bg = "default", "red"
|
||||
|
||||
|
|
4
tab.py
4
tab.py
|
@ -310,10 +310,10 @@ class StackTabber2(Tabber):
|
|||
self.stack.pop()
|
||||
|
||||
def _append(self, name, type_, level, y=None):
|
||||
self.stack.append(Marker2(name, type_, level))
|
||||
self.stack.append(Marker2(name, type_, level, y))
|
||||
def _append_unless(self, name, type_, level, y=None):
|
||||
if self._nomatch(name):
|
||||
self.stack.append(Marker2(name, type_, level))
|
||||
self.stack.append(Marker2(name, type_, level, y))
|
||||
def _peek(self):
|
||||
if self.stack:
|
||||
return self.stack[-1]
|
||||
|
|
Loading…
Reference in New Issue