Don't pass a list to ui.copyingmessage()
We only copy to a single folder anyway, so clean up the code to only pass in a single folder. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
38b1d7b085
commit
6f9b171ffd
@ -244,7 +244,7 @@ class BaseFolder(object):
|
||||
statusfolder.savemessage(uid, None, flags, rtime)
|
||||
return
|
||||
|
||||
self.ui.copyingmessage(uid, self, [dstfolder])
|
||||
self.ui.copyingmessage(uid, self, dstfolder)
|
||||
# If any of the destinations actually stores the message body,
|
||||
# load it up.
|
||||
if dstfolder.storesmessages():
|
||||
@ -254,6 +254,7 @@ class BaseFolder(object):
|
||||
#UID. If newid is 0, saving succeeded, but we could not
|
||||
#retrieve the new UID. Ignore message in this case.
|
||||
newuid = dstfolder.savemessage(uid, message, flags, rtime)
|
||||
|
||||
if newuid > 0:
|
||||
if newuid != uid:
|
||||
# Got new UID, change the local uid.
|
||||
|
@ -54,9 +54,9 @@ class BlinkenBase:
|
||||
s.gettf().setcolor('blue')
|
||||
s.__class__.__bases__[-1].syncingmessages(s, sr, sf, dr, df)
|
||||
|
||||
def copyingmessage(s, uid, src, destlist):
|
||||
def copyingmessage(s, uid, src, destfolder):
|
||||
s.gettf().setcolor('orange')
|
||||
s.__class__.__bases__[-1].copyingmessage(s, uid, src, destlist)
|
||||
s.__class__.__bases__[-1].copyingmessage(s, uid, src, destfolder)
|
||||
|
||||
def deletingmessages(s, uidlist, destlist):
|
||||
s.gettf().setcolor('red')
|
||||
|
@ -108,10 +108,10 @@ class MachineUI(UIBase):
|
||||
(s.getnicename(sr), sf.getname(), s.getnicename(dr),
|
||||
df.getname()))
|
||||
|
||||
def copyingmessage(s, uid, src, destlist):
|
||||
ds = s.folderlist(destlist)
|
||||
s._printData('copyingmessage', "%d\n%s\n%s\n%s" % \
|
||||
(uid, s.getnicename(src), src.getname(), ds))
|
||||
def copyingmessage(s, uid, src, destfolder):
|
||||
s._printData('copyingmessage', "%d\n%s\n%s\n%s[%s]" % \
|
||||
(uid, s.getnicename(src), src.getname(),
|
||||
destfolder.getnicename(), destfolder))
|
||||
|
||||
def folderlist(s, list):
|
||||
return ("\f".join(["%s\t%s" % (s.getnicename(x), x.getname()) for x in list]))
|
||||
|
@ -285,11 +285,12 @@ class UIBase:
|
||||
s.getnicename(dr),
|
||||
df.getname()))
|
||||
|
||||
def copyingmessage(s, uid, src, destlist):
|
||||
if s.verbose >= 0:
|
||||
ds = s.folderlist(destlist)
|
||||
s._msg("Copy message %d %s[%s] -> %s" % (uid, s.getnicename(src),
|
||||
src.getname(), ds))
|
||||
def copyingmessage(self, uid, src, destfolder):
|
||||
"""Output a log line stating which message we copy"""
|
||||
if self.verbose >= 0:
|
||||
self._msg("Copy message %d %s[%s] -> %s[%s]" % \
|
||||
(uid, self.getnicename(src), src,
|
||||
self.getnicename(destfolder), destfolder))
|
||||
|
||||
def deletingmessage(s, uid, destlist):
|
||||
if s.verbose >= 0:
|
||||
|
Loading…
Reference in New Issue
Block a user