Commit 86d63638 authored by Luci Stanescu's avatar Luci Stanescu

Replaced SessionItem.remote_party_name attribute with name

parent 97793a6d
...@@ -55,7 +55,6 @@ class SessionItem(QObject): ...@@ -55,7 +55,6 @@ class SessionItem(QObject):
super(SessionItem, self).__init__() super(SessionItem, self).__init__()
if (audio_stream, video_stream) == (None, None): if (audio_stream, video_stream) == (None, None):
raise ValueError('SessionItem must represent at least one audio or video stream') raise ValueError('SessionItem must represent at least one audio or video stream')
self.name = name
self.uri = uri self.uri = uri
self.session = session self.session = session
self.contact = contact self.contact = contact
...@@ -81,11 +80,11 @@ class SessionItem(QObject): ...@@ -81,11 +80,11 @@ class SessionItem(QObject):
if self.audio_stream is None: if self.audio_stream is None:
self.hold_tone = Null self.hold_tone = Null
self.remote_party_name = contact.name if contact else None self.name = contact.name if contact else None
if not self.remote_party_name: if not self.name:
address = '%s@%s' % (uri.user, uri.host) address = '%s@%s' % (uri.user, uri.host)
match = re.match(r'^(?P<number>(\+|00)[1-9][0-9]\d{5,15})@(\d{1,3}\.){3}\d{1,3}$', address) match = re.match(r'^(?P<number>(\+|00)[1-9][0-9]\d{5,15})@(\d{1,3}\.){3}\d{1,3}$', address)
self.remote_party_name = name or (match.group('number') if match else address) self.name = name or (match.group('number') if match else address)
self.timer.timeout.connect(self._SH_TimerFired) self.timer.timeout.connect(self._SH_TimerFired)
notification_center = NotificationCenter() notification_center = NotificationCenter()
...@@ -715,7 +714,7 @@ class SessionWidget(base_class, ui_class): ...@@ -715,7 +714,7 @@ class SessionWidget(base_class, ui_class):
self.mute_button.setEnabled(False) self.mute_button.setEnabled(False)
self.hold_button.setEnabled(False) self.hold_button.setEnabled(False)
self.record_button.setEnabled(False) self.record_button.setEnabled(False)
self.address_label.setText(session.remote_party_name) self.address_label.setText(session.name)
self.stream_info_label.session_type = session.type self.stream_info_label.session_type = session.type
self.stream_info_label.codec_info = session.codec_info self.stream_info_label.codec_info = session.codec_info
self.duration_label.value = session.duration self.duration_label.value = session.duration
......
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