Apply nametrans to all Foldertypes
getvisiblename() was only defined on IMAP(derived) foldertypes, but we want it on eg. Maildirs too, so we define it centrally in Folder.Base.py rather than only in folder.IMAP.py. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
7d34060217
commit
6b2ec956cf
@ -38,6 +38,7 @@ class BaseFolder(object):
|
||||
self.ui = getglobalui()
|
||||
self.name = name
|
||||
self.repository = repository
|
||||
self.visiblename = repository.nametrans(name)
|
||||
self.config = repository.getconfig()
|
||||
|
||||
def getname(self):
|
||||
@ -69,7 +70,8 @@ class BaseFolder(object):
|
||||
return 1
|
||||
|
||||
def getvisiblename(self):
|
||||
return self.name
|
||||
"""The nametrans-transposed name of the folder's name"""
|
||||
return self.visiblename
|
||||
|
||||
def getrepository(self):
|
||||
"""Returns the repository object that this folder is within."""
|
||||
|
@ -40,7 +40,6 @@ class IMAPFolder(BaseFolder):
|
||||
self.sep = imapserver.delim
|
||||
self.imapserver = imapserver
|
||||
self.messagelist = None
|
||||
self.visiblename = repository.nametrans(name)
|
||||
self.randomgenerator = random.Random()
|
||||
#self.ui is set in BaseFolder
|
||||
|
||||
@ -67,9 +66,6 @@ class IMAPFolder(BaseFolder):
|
||||
def getcopyinstancelimit(self):
|
||||
return 'MSGCOPY_' + self.repository.getname()
|
||||
|
||||
def getvisiblename(self):
|
||||
return self.visiblename
|
||||
|
||||
def getuidvalidity(self):
|
||||
imapobj = self.imapserver.acquireconnection()
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user