projects
/
theonering
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Lots of work in prep for conversations to work
[theonering]
/
src
/
channel
/
contact_list.py
diff --git
a/src/channel/contact_list.py
b/src/channel/contact_list.py
index
c753f0b
..
970b809
100644
(file)
--- a/
src/channel/contact_list.py
+++ b/
src/channel/contact_list.py
@@
-4,6
+4,7
@@
import telepathy
import util.go_utils as gobject_utils
import util.coroutines as coroutines
import util.go_utils as gobject_utils
import util.coroutines as coroutines
+import gtk_toolbox
import handle
import handle
@@
-39,16
+40,18
@@
class AllContactsListChannel(AbstractListChannel):
contacts = addressbook.get_contacts()
self._process_refresh(addressbook, contacts, [])
contacts = addressbook.get_contacts()
self._process_refresh(addressbook, contacts, [])
+ @gtk_toolbox.log_exception(_moduleLogger)
+ def Close(self):
+ telepathy.server.ChannelTypeContactList.Close(self)
+ self.remove_from_connection()
+ self._session.addressbook.updateSignalHandler.unregister_sink(
+ self._on_contacts_refreshed
+ )
+
@coroutines.func_sink
@coroutines.expand_positional
@gobject_utils.async
def _on_contacts_refreshed(self, addressbook, added, removed, changed):
@coroutines.func_sink
@coroutines.expand_positional
@gobject_utils.async
def _on_contacts_refreshed(self, addressbook, added, removed, changed):
- """
- @todo This currently filters out people not yet added to the contact
- list. Something needs to be done about those
- @todo This currently does not handle people with multiple phone
- numbers, yay that'll be annoying to resolve
- """
self._process_refresh(addressbook, added, removed)
def _process_refresh(self, addressbook, added, removed):
self._process_refresh(addressbook, added, removed)
def _process_refresh(self, addressbook, added, removed):
@@
-56,13
+59,11
@@
class AllContactsListChannel(AbstractListChannel):
handlesAdded = [
handle.create_handle(connection, "contact", contactId, phoneNumber)
for contactId in added
handlesAdded = [
handle.create_handle(connection, "contact", contactId, phoneNumber)
for contactId in added
- if contactId
for (phoneType, phoneNumber) in addressbook.get_contact_details(contactId)
]
handlesRemoved = [
handle.create_handle(connection, "contact", contactId, phoneNumber)
for contactId in removed
for (phoneType, phoneNumber) in addressbook.get_contact_details(contactId)
]
handlesRemoved = [
handle.create_handle(connection, "contact", contactId, phoneNumber)
for contactId in removed
- if contactId
for (phoneType, phoneNumber) in addressbook.get_contact_details(contactId)
]
message = ""
for (phoneType, phoneNumber) in addressbook.get_contact_details(contactId)
]
message = ""