diff options
author | Krzysztof Klinikowski <kkszysiu@gmail.com> | 2010-01-24 13:25:48 +0100 |
---|---|---|
committer | Krzysztof Klinikowski <kkszysiu@gmail.com> | 2010-01-24 13:25:48 +0100 |
commit | abb9c98ae71d4cd569f12aead48a992abc0e3be1 (patch) | |
tree | 05df61bca3e8303de9a5467d012854a1ccd869ea /sunshine/connection.py | |
parent | eecc35863f17d131a5e4d1385ab9e9cc7560d5ca (diff) |
Aliasing feature implemented.
Diffstat (limited to 'sunshine/connection.py')
-rw-r--r-- | sunshine/connection.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sunshine/connection.py b/sunshine/connection.py index 2dd7cf6..c251256 100644 --- a/sunshine/connection.py +++ b/sunshine/connection.py @@ -72,6 +72,7 @@ class SunshineConfig(object): main_xml.write(os.path.join(path, 'profile.xml'), encoding="UTF-8") self.path = os.path.join(path, 'profile.xml') + self.path2 = os.path.join(path, 'alias') return os.path.join(path, 'profile.xml') def get_contacts(self): @@ -90,6 +91,18 @@ class SunshineConfig(object): return self.roster + def get_self_alias(self): + if os.path.exists(self.path2): + file = open(self.path2, "r") + alias = file.read() + file.close() + return alias + + def save_self_alias(self, alias): + file = open(self.path2, "w") + file.write(alias) + file.close() + def make_contacts_file(self, groups, contacts): contactbook_xml = ET.Element("ContactBook") @@ -223,7 +236,6 @@ class SunshineConnection(telepathy.server.Connection, telepathy.server.Connection.__init__(self, 'gadugadu', account, 'sunshine') telepathy.server.ConnectionInterfaceRequests.__init__(self) SunshinePresence.__init__(self) - SunshineAvatars.__init__(self) SunshineCapabilities.__init__(self) SunshineContacts.__init__(self) @@ -500,7 +512,7 @@ class SunshineConnection(telepathy.server.Connection, # logger.info("Status noticies received.") def on_loginFailed(self): - logger.info("Method on_loginFailed called.") + logger.info("Login failed.") self._status = telepathy.CONNECTION_STATUS_DISCONNECTED self.StatusChanged(telepathy.CONNECTION_STATUS_DISCONNECTED, telepathy.CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED) |