rename utime_from_message to utime_from_header

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2015-03-27 16:50:17 +01:00
parent 05fa311878
commit 5a4e4fd0c2

View File

@ -48,11 +48,11 @@ class BaseFolder(object):
self.visiblename = '' self.visiblename = ''
self.config = repository.getconfig() self.config = repository.getconfig()
utime_from_message_global = self.config.getdefaultboolean( utime_from_header_global = self.config.getdefaultboolean(
"general", "utime_from_message", False) "general", "utime_from_header", False)
repo = "Repository " + repository.name repo = "Repository " + repository.name
self._utime_from_message = self.config.getdefaultboolean(repo, self._utime_from_header = self.config.getdefaultboolean(repo,
"utime_from_message", utime_from_message_global) "utime_from_header", utime_from_header_global)
# Determine if we're running static or dynamic folder filtering # Determine if we're running static or dynamic folder filtering
# and check filtering status # and check filtering status
@ -95,8 +95,8 @@ class BaseFolder(object):
return self.repository.should_sync_folder(self.ffilter_name) return self.repository.should_sync_folder(self.ffilter_name)
@property @property
def utime_from_message(self): def utime_from_header(self):
return self._utime_from_message return self._utime_from_header
def suggeststhreads(self): def suggeststhreads(self):
"""Returns true if this folder suggests using threads for actions; """Returns true if this folder suggests using threads for actions;
@ -692,7 +692,7 @@ class BaseFolder(object):
message = None message = None
flags = self.getmessageflags(uid) flags = self.getmessageflags(uid)
rtime = self.getmessagetime(uid) rtime = self.getmessagetime(uid)
if dstfolder.utime_from_message: if dstfolder.utime_from_header:
content = self.getmessage(uid) content = self.getmessage(uid)
rtime = emailutil.get_message_date(content, 'Date') rtime = emailutil.get_message_date(content, 'Date')
@ -766,7 +766,7 @@ class BaseFolder(object):
# dst has message with that UID already, only update status # dst has message with that UID already, only update status
flags = self.getmessageflags(uid) flags = self.getmessageflags(uid)
rtime = self.getmessagetime(uid) rtime = self.getmessagetime(uid)
if dstfolder.utime_from_message: if dstfolder.utime_from_header:
content = self.getmessage(uid) content = self.getmessage(uid)
rtime = emailutil.get_message_date(content, 'Date') rtime = emailutil.get_message_date(content, 'Date')
statusfolder.savemessage(uid, None, flags, rtime) statusfolder.savemessage(uid, None, flags, rtime)