Complete.Org: Mailing Lists: Archives: offlineimap: January 2009:
[PATCH] remove siglistener
Home

[PATCH] remove siglistener

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: [PATCH] remove siglistener
From: Christoph Höger <choeger@xxxxxxxxxxxxxxx>
Date: Fri, 16 Jan 2009 00:28:40 +0100

        * please add to gnomeui branch  
        * removed the siglistener parameter to sleep
        to fit GnomeUI to offlineimap 6.0.3
Signed-off-by: Christoph Höger <choeger@xxxxxxxxxxxxxxx>
---
 offlineimap/ui/Gnome.py |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/offlineimap/ui/Gnome.py b/offlineimap/ui/Gnome.py
index 72996de..ec2a926 100644
--- a/offlineimap/ui/Gnome.py
+++ b/offlineimap/ui/Gnome.py
@@ -618,7 +618,7 @@ class GnomeUI(UIBase):
                else:
                        self.ui.add_warning(str(msg))
 
-       def sleep(self, secs, siglistener):
+       def sleep(self, secs):
                self.ui.debug("GnomeUI.sleep(%i)" % secs)
                msg = "Sleeping for %d minutes" % (secs / 60)
                if secs % 60 > 0:
@@ -626,7 +626,7 @@ class GnomeUI(UIBase):
                self.ui.add_msg(msg)
                self.ui.icon.set_state(GnomeUIStatusIcon.STATE_IDLE)
                self.ui.stopsleep.clear()
-               UIBase.sleep(self, secs, siglistener)
+               UIBase.sleep(self, secs)
 
        def sleeping(self, secs, remainingsecs):
                # Return values
@@ -662,10 +662,8 @@ class GnomeUI(UIBase):
 
 if __name__ == '__main__':
        import time
-       from offlineimap.accounts import SigListener
        print "MAIN: Begin tests"
 
-       siglistener = SigListener()
 
        x = GnomeUI(None)
        x.init_banner()
@@ -681,7 +679,7 @@ if __name__ == '__main__':
        
        x.warn("Sleeping 999 secs")
        x.warn("Select \"Start Sync\" from status icon context menu to 
continue")
-       x.sleep(999, siglistener)
+       x.sleep(999)
 
        x.warn("Showing log window")
        x.ui.log.open()
@@ -691,7 +689,7 @@ if __name__ == '__main__':
                x.ui.add_msg("Line " + str(i + 1) + " of log text")
                time.sleep(1)
        x.warn("Sleeping 10 secs")
-       x.sleep(10, siglistener)
+       x.sleep(10)
 
        x.warn("Showing about - close to continue")
        x.ui.about.open()
@@ -705,7 +703,7 @@ if __name__ == '__main__':
                x.warn("No password given")
 
        x.warn("Sleeping 3 secs")
-       x.sleep(3, siglistener)
+       x.sleep(3)
        x.warn("Trying a password again with error message")
        password = x.ui.getpass("Test", None, "Error message")
        if password is not None:
-- 
1.6.0.6

-- Attached file included as plaintext by Ecartis --
-- File: signature.asc
-- Desc: Dies ist ein digital signierter Nachrichtenteil

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAklvxqUACgkQhMBO4cVSGS8aLgCeLqkeaaEDYaCRX9/JEHwEjt/j
iUcAoJZy1SaNdrwYHuTU+i1s6kAmgcDc
=NhT7
-----END PGP SIGNATURE-----




[Prev in Thread] Current Thread [Next in Thread]