rev 323 - offlineimap/head/offlineimap/ui

[email protected] Mon, 6 Jan 2003 14:21:47 -0600 (CST)
Newsgroups gmane.mail.imap.offlineimap.subversion
Message-ID <[email protected]>
Author: jgoerzen
Date: 2003-01-06 14:21:46 -0600 (Mon, 06 Jan 2003)
New Revision: 323

Modified:
   offlineimap/head/offlineimap/ui/TTY.py
Log:
Due to possibly having one account sleep while another is reading a
password, and other tricky situations, support for nice updating and
cancelling of a sleep in TTY.TTYUI has been removed.

However, this is not going to be a huge problem because the new Curses
Blinkenlights interface has this support, and does it a lot better than
TTY.TTYUI ever could have.


Modified: offlineimap/head/offlineimap/ui/TTY.py
==============================================================================
--- offlineimap/head/offlineimap/ui/TTY.py	(original)
+++ offlineimap/head/offlineimap/ui/TTY.py	Mon Jan  6 14:21:47 2003
@@ -52,13 +52,6 @@
         finally:
             s.outputlock.release()
 
-    def sleep(s, sleepsecs):
-        s.iswaiting = 1
-        try:
-            UIBase.sleep(s, sleepsecs)
-        finally:
-            s.iswaiting = 0
-
     def mainException(s):
         if isinstance(sys.exc_info()[1], KeyboardInterrupt) and \
            s.iswaiting:
@@ -67,18 +60,3 @@
         else:
             UIBase.mainException(s)
 
-    def sleeping(s, sleepsecs, remainingsecs):
-        if remainingsecs > 0:
-            sys.stdout.write("Next sync in %d:%02d (press Enter to sync now, Ctrl-C to abort)   \r" % \
-                             (remainingsecs / 60, remainingsecs % 60))
-            sys.stdout.flush()
-        else:
-            sys.stdout.write("Wait done, proceeding with sync....                                \n")
-
-        if sleepsecs > 0:
-            if len(select.select([sys.stdin], [], [], sleepsecs)[0]):
-                sys.stdin.readline()
-                return 1
-        return 0
-            
-