/offlineimap/head: changeset 297

Changed to a more account-centric behavior. The refresh time is now a
per-account variable. Implemented new account classes. User interfaces
must now be updated to take advantage of this.
This commit is contained in:
jgoerzen
2003-01-04 05:57:46 +01:00
parent 1691cdbf0f
commit 854eaf3055
11 changed files with 789 additions and 204 deletions

View File

@@ -20,7 +20,7 @@ import sys, time
from UIBase import UIBase
class Basic(UIBase):
def getpass(s, accountname, config):
def getpass(s, accountname, config, errmsg = None):
raise NotImplementedError, "Prompting for a password is not supported in noninteractive mode."
def _msg(s, msg):

View File

@@ -140,6 +140,10 @@ class UIBase:
if s.verbose >= 0:
s._msg("***** Processing account %s" % accountname)
def acctdone(s, accountname):
if s.verbose >= 0:
s._msg("***** Finished processing account " + accountname)
def syncfolders(s, srcrepos, destrepos):
if s.verbose >= 0:
s._msg("Copying folder structure from %s to %s" % \

View File

@@ -19,7 +19,7 @@
import offlineimap.ui
import sys
def findUI(config, localeval, chosenUI=None):
def findUI(config, chosenUI=None):
uistrlist = ['Tk.Blinkenlights', 'Tk.VerboseUI', 'TTY.TTYUI',
'Noninteractive.Basic', 'Noninteractive.Quiet']
namespace={}
@@ -34,7 +34,7 @@ def findUI(config, localeval, chosenUI=None):
uistrlist = config.get("general", "ui").replace(" ", "").split(",")
for uistr in uistrlist:
uimod = getUImod(uistr, localeval, namespace)
uimod = getUImod(uistr, config.getlocaleval(), namespace)
if uimod:
uiinstance = uimod(config)
if uiinstance.isusable():