Commit 916e542f authored by Luci Stanescu's avatar Luci Stanescu

Improved contact matching capabilities

parent c5af3468
...@@ -1124,7 +1124,7 @@ class ContactListView(QListView): ...@@ -1124,7 +1124,7 @@ class ContactListView(QListView):
if not isinstance(contact, Contact): if not isinstance(contact, Contact):
return return
session_manager = SessionManager() session_manager = SessionManager()
session_manager.start_call(contact.name, contact.uri, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None) session_manager.start_call(contact.name, contact.uri, contact=contact, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None)
else: else:
super(ContactListView, self).keyPressEvent(event) super(ContactListView, self).keyPressEvent(event)
...@@ -1177,7 +1177,7 @@ class ContactListView(QListView): ...@@ -1177,7 +1177,7 @@ class ContactListView(QListView):
def _AH_StartAudioCall(self): def _AH_StartAudioCall(self):
contact = self.model().data(self.selectionModel().selectedIndexes()[0]) contact = self.model().data(self.selectionModel().selectedIndexes()[0])
session_manager = SessionManager() session_manager = SessionManager()
session_manager.start_call(contact.name, contact.uri, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None) session_manager.start_call(contact.name, contact.uri, contact=contact, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None)
def _AH_StartChatSession(self): def _AH_StartChatSession(self):
contact = self.model().data(self.selectionModel().selectedIndexes()[0]) contact = self.model().data(self.selectionModel().selectedIndexes()[0])
...@@ -1451,7 +1451,7 @@ class ContactSearchListView(QListView): ...@@ -1451,7 +1451,7 @@ class ContactSearchListView(QListView):
if not isinstance(contact, Contact): if not isinstance(contact, Contact):
return return
session_manager = SessionManager() session_manager = SessionManager()
session_manager.start_call(contact.name, contact.uri, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None) session_manager.start_call(contact.name, contact.uri, contact=contact, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None)
else: else:
super(ContactSearchListView, self).keyPressEvent(event) super(ContactSearchListView, self).keyPressEvent(event)
...@@ -1474,7 +1474,7 @@ class ContactSearchListView(QListView): ...@@ -1474,7 +1474,7 @@ class ContactSearchListView(QListView):
def _AH_StartAudioCall(self): def _AH_StartAudioCall(self):
contact = self.model().data(self.selectionModel().selectedIndexes()[0]) contact = self.model().data(self.selectionModel().selectedIndexes()[0])
session_manager = SessionManager() session_manager = SessionManager()
session_manager.start_call(contact.name, contact.uri, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None) session_manager.start_call(contact.name, contact.uri, contact=contact, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None)
def _AH_StartChatSession(self): def _AH_StartChatSession(self):
contact = self.model().data(self.selectionModel().selectedIndexes()[0]) contact = self.model().data(self.selectionModel().selectedIndexes()[0])
......
...@@ -167,7 +167,7 @@ class MainWindow(base_class, ui_class): ...@@ -167,7 +167,7 @@ class MainWindow(base_class, ui_class):
address = contact.uri or unicode(self.search_box.text()) address = contact.uri or unicode(self.search_box.text())
name = contact.name or None name = contact.name or None
session_manager = SessionManager() session_manager = SessionManager()
session_manager.start_call(name, address, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None) session_manager.start_call(name, address, contact=contact, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None)
def _SH_BreakConference(self): def _SH_BreakConference(self):
active_session = self.session_model.data(self.session_list.selectionModel().selectedIndexes()[0]) active_session = self.session_model.data(self.session_list.selectionModel().selectedIndexes()[0])
...@@ -178,7 +178,7 @@ class MainWindow(base_class, ui_class): ...@@ -178,7 +178,7 @@ class MainWindow(base_class, ui_class):
if not isinstance(contact, Contact): if not isinstance(contact, Contact):
return return
session_manager = SessionManager() session_manager = SessionManager()
session_manager.start_call(contact.name, contact.uri, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None) session_manager.start_call(contact.name, contact.uri, contact=contact, account=BonjourAccount() if isinstance(contact, BonjourNeighbour) else None)
def _SH_ContactListSelectionChanged(self, selected, deselected): def _SH_ContactListSelectionChanged(self, selected, deselected):
account_manager = AccountManager() account_manager = AccountManager()
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment