[telepathy-butterfly/master] MailNotification: Fixed method naming convention and added doc
Nicolas Dufresne
nicolas.dufresne at collabora.co.uk
Fri Jan 15 07:32:09 PST 2010
Signed-off-by: Nicolas Dufresne <nicolas.dufresne at collabora.co.uk>
---
butterfly/connection.py | 2 +-
butterfly/mail_notification.py | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/butterfly/connection.py b/butterfly/connection.py
index 81044d9..a226a57 100644
--- a/butterfly/connection.py
+++ b/butterfly/connection.py
@@ -269,7 +269,7 @@ class ButterflyConnection(telepathy.server.Connection,
self._client.profile.presence,
self._client.profile.personal_message)
if self._client.profile.profile['EmailEnabled'] == '1':
- self.EnableMailNotification()
+ self.enable_mail_notification_interface()
elif state == papyon.event.ClientState.CLOSED:
self.StatusChanged(telepathy.CONNECTION_STATUS_DISCONNECTED,
self.__disconnect_reason)
diff --git a/butterfly/mail_notification.py b/butterfly/mail_notification.py
index 2331402..3e599a2 100644
--- a/butterfly/mail_notification.py
+++ b/butterfly/mail_notification.py
@@ -71,7 +71,13 @@ class ButterflyMailNotification(
'UnreadMailCount': lambda: self.unread_mail_count,})
- def EnableMailNotification(self):
+ def enable_mail_notification_interface(self):
+ """Add MailNotification to the list of interfaces so
+ Connection.GetInterfaces() returns it when called. This should be
+ called before the connection is fully connected and only if the MSN
+ Account support e-mail notification (see 'EmailEnabled' feild in
+ client profile)."""
+
self._interfaces.add(CONN_IFACE_MAIL_NOTIFICATION)
--
1.5.6.5
More information about the telepathy-commits
mailing list