Don't pass list to ui.adding/deletingflags

We only have one "dstfolder" at a time when deleting/adding flags, so no
need to pass in a list of those to the ui functions that output the log
info.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth 2011-03-06 20:03:07 +01:00 committed by Nicolas Sebrecht
parent 387fbf3aaa
commit 7a2a02254e
4 changed files with 16 additions and 19 deletions

View File

@ -421,12 +421,12 @@ class BaseFolder:
delflaglist[flag].append(uid) delflaglist[flag].append(uid)
for flag in addflaglist.keys(): for flag in addflaglist.keys():
self.ui.addingflags(addflaglist[flag], flag, [dstfolder]) self.ui.addingflags(addflaglist[flag], flag, dstfolder)
dstfolder.addmessagesflags(addflaglist[flag], [flag]) dstfolder.addmessagesflags(addflaglist[flag], [flag])
statusfolder.addmessagesflags(addflaglist[flag], [flag]) statusfolder.addmessagesflags(addflaglist[flag], [flag])
for flag in delflaglist.keys(): for flag in delflaglist.keys():
self.ui.deletingflags(delflaglist[flag], flag, [dstfolder]) self.ui.deletingflags(delflaglist[flag], flag, dstfolder)
dstfolder.deletemessagesflags(delflaglist[flag], [flag]) dstfolder.deletemessagesflags(delflaglist[flag], [flag])
statusfolder.deletemessagesflags(delflaglist[flag], [flag]) statusfolder.deletemessagesflags(delflaglist[flag], [flag])

View File

@ -66,13 +66,13 @@ class BlinkenBase:
s.gettf().setcolor('red') s.gettf().setcolor('red')
s.__class__.__bases__[-1].deletingmessage(s, uid, destlist) s.__class__.__bases__[-1].deletingmessage(s, uid, destlist)
def addingflags(s, uidlist, flags, destlist): def addingflags(s, uidlist, flags, dest):
s.gettf().setcolor('yellow') s.gettf().setcolor('yellow')
s.__class__.__bases__[-1].addingflags(s, uidlist, flags, destlist) s.__class__.__bases__[-1].addingflags(s, uidlist, flags, dest)
def deletingflags(s, uidlist, flags, destlist): def deletingflags(s, uidlist, flags, dest):
s.gettf().setcolor('pink') s.gettf().setcolor('pink')
s.__class__.__bases__[-1].deletingflags(s, uidlist, flags, destlist) s.__class__.__bases__[-1].deletingflags(s, uidlist, flags, dest)
def warn(s, msg, minor = 0): def warn(s, msg, minor = 0):
if minor: if minor:

View File

@ -126,17 +126,15 @@ class MachineUI(UIBase):
ds = s.folderlist(destlist) ds = s.folderlist(destlist)
s._printData('deletingmessages', "%s\n%s" % (s.uidlist(uidlist), ds)) s._printData('deletingmessages', "%s\n%s" % (s.uidlist(uidlist), ds))
def addingflags(s, uidlist, flags, destlist): def addingflags(s, uidlist, flags, dest):
ds = s.folderlist(destlist)
s._printData("addingflags", "%s\n%s\n%s" % (s.uidlist(uidlist), s._printData("addingflags", "%s\n%s\n%s" % (s.uidlist(uidlist),
"\f".join(flags), "\f".join(flags),
ds)) dest))
def deletingflags(s, uidlist, flags, destlist): def deletingflags(s, uidlist, flags, dest):
ds = s.folderlist(destlist)
s._printData('deletingflags', "%s\n%s\n%s" % (s.uidlist(uidlist), s._printData('deletingflags', "%s\n%s\n%s" % (s.uidlist(uidlist),
"\f".join(flags), "\f".join(flags),
ds)) dest))
def threadException(s, thread): def threadException(s, thread):
print s.getThreadExceptionString(thread) print s.getThreadExceptionString(thread)

View File

@ -261,17 +261,16 @@ class UIBase:
", ".join([str(u) for u in uidlist]), ", ".join([str(u) for u in uidlist]),
ds)) ds))
def addingflags(s, uidlist, flags, destlist): def addingflags(s, uidlist, flags, dest):
if s.verbose >= 0: if s.verbose >= 0:
ds = s.folderlist(destlist) s._msg("Adding flag %s to %d messages on %s" % \
s._msg("Adding flags %s to %d messages on %s" % \ (", ".join(flags), len(uidlist), dest))
(", ".join(flags), len(uidlist), ds))
def deletingflags(s, uidlist, flags, destlist): def deletingflags(s, uidlist, flags, dest):
if s.verbose >= 0: if s.verbose >= 0:
ds = s.folderlist(destlist) ds = s.folderlist(destlist)
s._msg("Deleting flags %s to %d messages on %s" % \ s._msg("Deleting flag %s from %d messages on %s" % \
(", ".join(flags), len(uidlist), ds)) (", ".join(flags), len(uidlist), dest))
################################################## Threads ################################################## Threads