summaryrefslogtreecommitdiff
path: root/src/connection.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-03-05 21:42:56 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-03-05 21:42:56 +0100
commitfb40ac54fc6e9fe79f29fd99e836187e95bb0509 (patch)
tree19bced4c4e2fb557b150553b66335b14bdc1ab85 /src/connection.py
parent9c291d1368f004828b123edca65f11c4f6e96dfc (diff)
downloadpoezio-fb40ac54fc6e9fe79f29fd99e836187e95bb0509.tar.gz
poezio-fb40ac54fc6e9fe79f29fd99e836187e95bb0509.tar.bz2
poezio-fb40ac54fc6e9fe79f29fd99e836187e95bb0509.tar.xz
poezio-fb40ac54fc6e9fe79f29fd99e836187e95bb0509.zip
Kind of big cleanup.
Core and Connection classes are now used as singletons, we do not need to pass them to each Tab and Win. This remove a lot of arguments to varius methods.
Diffstat (limited to 'src/connection.py')
-rw-r--r--src/connection.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/connection.py b/src/connection.py
index c12680b8..089c43b8 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -37,10 +37,11 @@ class Connection(sleekxmpp.ClientXMPP):
Receives everything from Jabber and emits the
appropriate signals
"""
+ __init = False
def __init__(self):
resource = config.get('resource', '')
if config.get('jid', ''):
- self.anon = False # Field used to know if we are anonymous or not.
+ self.anon = False # Field used to know if we are anonymous or not.
# many features will be handled diferently
# depending on this setting
jid = '%s/%s' % (config.get('jid', ''), resource)
@@ -79,6 +80,3 @@ class Connection(sleekxmpp.ClientXMPP):
return False
self.process(threaded=True)
return True
-
-# Global connection object
-connection = Connection()