Commit 5c4d4bb8 authored by Dan Pascu's avatar Dan Pascu

Fixed processing of the incoming dialog signals

parent 2c7d24ff
...@@ -5041,8 +5041,6 @@ class IncomingRequest(QObject): ...@@ -5041,8 +5041,6 @@ class IncomingRequest(QObject):
self.dialog.audio_device_label.setText(u'Selected audio device is: %s' % SIPApplication.voice_audio_bridge.mixer.real_output_device) self.dialog.audio_device_label.setText(u'Selected audio device is: %s' % SIPApplication.voice_audio_bridge.mixer.real_output_device)
self.dialog.finished.connect(self._SH_DialogFinished) self.dialog.finished.connect(self._SH_DialogFinished)
self.dialog.accepted.connect(self._SH_DialogAccepted)
self.dialog.rejected.connect(self._SH_DialogRejected)
def __eq__(self, other): def __eq__(self, other):
return self is other return self is other
...@@ -5108,13 +5106,11 @@ class IncomingRequest(QObject): ...@@ -5108,13 +5106,11 @@ class IncomingRequest(QObject):
def stream_types(self): def stream_types(self):
return {stream.type for stream in (self.audio_stream, self.video_stream, self.screensharing_stream, self.chat_stream) if stream is not None} return {stream.type for stream in (self.audio_stream, self.video_stream, self.screensharing_stream, self.chat_stream) if stream is not None}
def _SH_DialogFinished(self): def _SH_DialogFinished(self, result):
self.finished.emit(self) self.finished.emit(self)
if result == QDialog.Accepted:
def _SH_DialogAccepted(self):
self.accepted.emit(self) self.accepted.emit(self)
elif result == QDialog.Rejected:
def _SH_DialogRejected(self):
self.rejected.emit(self, self.dialog.reject_mode) self.rejected.emit(self, self.dialog.reject_mode)
...@@ -5179,8 +5175,6 @@ class IncomingFileTransferRequest(QObject): ...@@ -5179,8 +5175,6 @@ class IncomingFileTransferRequest(QObject):
self.dialog.file_label.setText(u'File: %s' % filename) self.dialog.file_label.setText(u'File: %s' % filename)
self.dialog.finished.connect(self._SH_DialogFinished) self.dialog.finished.connect(self._SH_DialogFinished)
self.dialog.accepted.connect(self._SH_DialogAccepted)
self.dialog.rejected.connect(self._SH_DialogRejected)
def __eq__(self, other): def __eq__(self, other):
return self is other return self is other
...@@ -5200,13 +5194,11 @@ class IncomingFileTransferRequest(QObject): ...@@ -5200,13 +5194,11 @@ class IncomingFileTransferRequest(QObject):
def __ge__(self, other): def __ge__(self, other):
return self.priority >= other.priority return self.priority >= other.priority
def _SH_DialogFinished(self): def _SH_DialogFinished(self, result):
self.finished.emit(self) self.finished.emit(self)
if result == QDialog.Accepted:
def _SH_DialogAccepted(self):
self.accepted.emit(self) self.accepted.emit(self)
elif result == QDialog.Rejected:
def _SH_DialogRejected(self):
self.rejected.emit(self, self.dialog.reject_mode) self.rejected.emit(self, self.dialog.reject_mode)
...@@ -5261,8 +5253,6 @@ class IncomingCallTransferRequest(QObject): ...@@ -5261,8 +5253,6 @@ class IncomingCallTransferRequest(QObject):
self.dialog.transfer_label.setText(u'would like to transfer you to {.uri}'.format(contact_uri)) self.dialog.transfer_label.setText(u'would like to transfer you to {.uri}'.format(contact_uri))
self.dialog.finished.connect(self._SH_DialogFinished) self.dialog.finished.connect(self._SH_DialogFinished)
self.dialog.accepted.connect(self._SH_DialogAccepted)
self.dialog.rejected.connect(self._SH_DialogRejected)
def __eq__(self, other): def __eq__(self, other):
return self is other return self is other
...@@ -5282,13 +5272,11 @@ class IncomingCallTransferRequest(QObject): ...@@ -5282,13 +5272,11 @@ class IncomingCallTransferRequest(QObject):
def __ge__(self, other): def __ge__(self, other):
return self.priority >= other.priority return self.priority >= other.priority
def _SH_DialogFinished(self): def _SH_DialogFinished(self, result):
self.finished.emit(self) self.finished.emit(self)
if result == QDialog.Accepted:
def _SH_DialogAccepted(self):
self.accepted.emit(self) self.accepted.emit(self)
elif result == QDialog.Rejected:
def _SH_DialogRejected(self):
self.rejected.emit(self, self.dialog.reject_mode) self.rejected.emit(self, self.dialog.reject_mode)
......
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