Resolve conflict

This commit is contained in:
John Goerzen 2007-10-13 07:07:30 +01:00
commit 6949a31164
2 changed files with 12 additions and 5 deletions

View File

@ -129,6 +129,11 @@ footer = "\n"
# Note that this filter can be used only to further restrict mbnames # Note that this filter can be used only to further restrict mbnames
# to a subset of folders that pass the account's folderfilter. # to a subset of folders that pass the account's folderfilter.
[ui.Curses.Blinkenlights]
# Character used to indicate thread status.
statuschar = .
################################################## ##################################################
# Accounts # Accounts
################################################## ##################################################

View File

@ -126,10 +126,11 @@ class CursesUtil:
self.start() self.start()
class CursesAccountFrame: class CursesAccountFrame:
def __init__(s, master, accountname): def __init__(s, master, accountname, ui):
s.c = master s.c = master
s.children = [] s.children = []
s.accountname = accountname s.accountname = accountname
s.ui = ui
def drawleadstr(s, secs = None): def drawleadstr(s, secs = None):
if secs == None: if secs == None:
@ -150,7 +151,7 @@ class CursesAccountFrame:
s.location += 1 s.location += 1
def getnewthreadframe(s): def getnewthreadframe(s):
tf = CursesThreadFrame(s.c, s.window, 0, s.location) tf = CursesThreadFrame(s.c, s.ui, s.window, 0, s.location)
s.location += 1 s.location += 1
s.children.append(tf) s.children.append(tf)
return tf return tf
@ -180,9 +181,10 @@ class CursesAccountFrame:
s.sleeping_abort = 1 s.sleeping_abort = 1
class CursesThreadFrame: class CursesThreadFrame:
def __init__(s, master, window, y, x): def __init__(s, master, ui, window, y, x):
"""master should be a CursesUtil object.""" """master should be a CursesUtil object."""
s.c = master s.c = master
s.ui = ui
s.window = window s.window = window
s.x = x s.x = x
s.y = y s.y = y
@ -212,7 +214,7 @@ class CursesThreadFrame:
if self.getcolor() == 'black': if self.getcolor() == 'black':
self.window.addstr(self.y, self.x, ' ', self.color) self.window.addstr(self.y, self.x, ' ', self.color)
else: else:
self.window.addstr(self.y, self.x, '.', self.color) self.window.addstr(self.y, self.x, self.ui.config.getdefault("ui.Curses.Blinkenlights", "statuschar", '.'), self.color)
self.c.stdscr.move(self.c.height - 1, self.c.width - 1) self.c.stdscr.move(self.c.height - 1, self.c.width - 1)
self.window.refresh() self.window.refresh()
self.c.locked(lockedstuff) self.c.locked(lockedstuff)
@ -476,7 +478,7 @@ class Blinkenlights(BlinkenBase, UIBase):
return s.af[accountname] return s.af[accountname]
# New one. # New one.
s.af[accountname] = CursesAccountFrame(s.c, accountname) s.af[accountname] = CursesAccountFrame(s.c, accountname, s)
s.c.lock() s.c.lock()
try: try:
s.c.reset() s.c.reset()