Commit 67e772f8 authored by Dan Pascu's avatar Dan Pascu

Renamed desktop sharing to screen sharing and fixed stream type name

parent 4e9102ef
...@@ -243,7 +243,7 @@ class MainWindow(base_class, ui_class): ...@@ -243,7 +243,7 @@ class MainWindow(base_class, ui_class):
def enable_call_buttons(self, enabled): def enable_call_buttons(self, enabled):
self.audio_call_button.setEnabled(enabled) self.audio_call_button.setEnabled(enabled)
self.im_session_button.setEnabled(False) self.im_session_button.setEnabled(False)
self.ds_session_button.setEnabled(False) self.ss_session_button.setEnabled(False)
def load_audio_devices(self): def load_audio_devices(self):
settings = SIPSimpleSettings() settings = SIPSimpleSettings()
......
...@@ -1525,8 +1525,8 @@ class IncomingDialog(base_class, ui_class): ...@@ -1525,8 +1525,8 @@ class IncomingDialog(base_class, ui_class):
stream.toggled.connect(self._update_accept_button) stream.toggled.connect(self._update_accept_button)
stream.hidden.connect(self._update_streams_layout) stream.hidden.connect(self._update_streams_layout)
stream.shown.connect(self._update_streams_layout) stream.shown.connect(self._update_streams_layout)
self.desktopsharing_stream.hidden.connect(self.desktopsharing_label.hide) self.screensharing_stream.hidden.connect(self.screensharing_label.hide)
self.desktopsharing_stream.shown.connect(self.desktopsharing_label.show) self.screensharing_stream.shown.connect(self.screensharing_label.show)
for stream in self.streams: for stream in self.streams:
stream.hide() stream.hide()
self.position = None self.position = None
...@@ -1563,7 +1563,7 @@ class IncomingDialog(base_class, ui_class): ...@@ -1563,7 +1563,7 @@ class IncomingDialog(base_class, ui_class):
@property @property
def streams(self): def streams(self):
return (self.audio_stream, self.chat_stream, self.desktopsharing_stream, self.video_stream) return (self.audio_stream, self.chat_stream, self.screensharing_stream, self.video_stream)
@property @property
def accepted_streams(self): def accepted_streams(self):
...@@ -1585,13 +1585,13 @@ class IncomingDialog(base_class, ui_class): ...@@ -1585,13 +1585,13 @@ class IncomingDialog(base_class, ui_class):
if len([stream for stream in self.streams if stream.in_use]) > 1: if len([stream for stream in self.streams if stream.in_use]) > 1:
self.audio_stream.active = True self.audio_stream.active = True
self.chat_stream.active = True self.chat_stream.active = True
self.desktopsharing_stream.active = True self.screensharing_stream.active = True
self.video_stream.active = True self.video_stream.active = True
self.note_label.setText(u'To refuse a stream click its icon') self.note_label.setText(u'To refuse a stream click its icon')
else: else:
self.audio_stream.active = False self.audio_stream.active = False
self.chat_stream.active = False self.chat_stream.active = False
self.desktopsharing_stream.active = False self.screensharing_stream.active = False
self.video_stream.active = False self.video_stream.active = False
if self.audio_stream.in_use: if self.audio_stream.in_use:
self.note_label.setText(u'Audio call') self.note_label.setText(u'Audio call')
...@@ -1599,8 +1599,8 @@ class IncomingDialog(base_class, ui_class): ...@@ -1599,8 +1599,8 @@ class IncomingDialog(base_class, ui_class):
self.note_label.setText(u'Chat session') self.note_label.setText(u'Chat session')
elif self.video_stream.in_use: elif self.video_stream.in_use:
self.note_label.setText(u'Video call') self.note_label.setText(u'Video call')
elif self.desktopsharing_stream.in_use: elif self.screensharing_stream.in_use:
self.note_label.setText(u'Desktop sharing request') self.note_label.setText(u'Screen sharing request')
else: else:
self.note_label.setText(u'') self.note_label.setText(u'')
self._update_accept_button() self._update_accept_button()
...@@ -1612,7 +1612,7 @@ class IncomingSession(QObject): ...@@ -1612,7 +1612,7 @@ class IncomingSession(QObject):
accepted = pyqtSignal() accepted = pyqtSignal()
rejected = pyqtSignal(str) rejected = pyqtSignal(str)
def __init__(self, dialog, session, contact=None, proposal=False, audio_stream=None, video_stream=None, chat_stream=None, desktopsharing_stream=None): def __init__(self, dialog, session, contact=None, proposal=False, audio_stream=None, video_stream=None, chat_stream=None, screensharing_stream=None):
super(IncomingSession, self).__init__() super(IncomingSession, self).__init__()
self.dialog = dialog self.dialog = dialog
self.session = session self.session = session
...@@ -1621,7 +1621,7 @@ class IncomingSession(QObject): ...@@ -1621,7 +1621,7 @@ class IncomingSession(QObject):
self.audio_stream = audio_stream self.audio_stream = audio_stream
self.video_stream = video_stream self.video_stream = video_stream
self.chat_stream = chat_stream self.chat_stream = chat_stream
self.desktopsharing_stream = desktopsharing_stream self.screensharing_stream = screensharing_stream
if proposal: if proposal:
self.dialog.setWindowTitle(u'Incoming Session Update') self.dialog.setWindowTitle(u'Incoming Session Update')
...@@ -1644,13 +1644,13 @@ class IncomingSession(QObject): ...@@ -1644,13 +1644,13 @@ class IncomingSession(QObject):
if self.chat_stream: if self.chat_stream:
self.dialog.chat_stream.accepted = False # Remove when implemented later -Luci self.dialog.chat_stream.accepted = False # Remove when implemented later -Luci
self.dialog.chat_stream.show() self.dialog.chat_stream.show()
if self.desktopsharing_stream: if self.screensharing_stream:
if self.desktopsharing_stream.handler.type == 'active': if self.screensharing_stream.handler.type == 'active':
self.dialog.desktopsharing_label.setText(u'is offering to share his desktop') self.dialog.screensharing_label.setText(u'is offering to share his screen')
else: else:
self.dialog.desktopsharing_label.setText(u'is asking to share your desktop') self.dialog.screensharing_label.setText(u'is asking to share your screen')
self.dialog.desktopsharing_stream.accepted = False # Remove when implemented later -Luci self.dialog.screensharing_stream.accepted = False # Remove when implemented later -Luci
self.dialog.desktopsharing_stream.show() self.dialog.screensharing_stream.show()
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.accepted.connect(self._SH_DialogAccepted) self.dialog.accepted.connect(self._SH_DialogAccepted)
...@@ -1683,8 +1683,8 @@ class IncomingSession(QObject): ...@@ -1683,8 +1683,8 @@ class IncomingSession(QObject):
streams.append(self.video_stream) streams.append(self.video_stream)
if self.chat_accepted: if self.chat_accepted:
streams.append(self.chat_stream) streams.append(self.chat_stream)
if self.desktopsharing_accepted: if self.screensharing_accepted:
streams.append(self.desktopsharing_stream) streams.append(self.screensharing_stream)
return streams return streams
@property @property
...@@ -1700,8 +1700,8 @@ class IncomingSession(QObject): ...@@ -1700,8 +1700,8 @@ class IncomingSession(QObject):
return self.dialog.chat_stream.in_use and self.dialog.chat_stream.accepted return self.dialog.chat_stream.in_use and self.dialog.chat_stream.accepted
@property @property
def desktopsharing_accepted(self): def screensharing_accepted(self):
return self.dialog.desktopsharing_stream.in_use and self.dialog.desktopsharing_stream.accepted return self.dialog.screensharing_stream.in_use and self.dialog.screensharing_stream.accepted
@property @property
def priority(self): def priority(self):
...@@ -1709,7 +1709,7 @@ class IncomingSession(QObject): ...@@ -1709,7 +1709,7 @@ class IncomingSession(QObject):
return 0 return 0
elif self.video_stream: elif self.video_stream:
return 1 return 1
elif self.desktopsharing_stream: elif self.screensharing_stream:
return 2 return 2
elif self.chat_stream: elif self.chat_stream:
return 3 return 3
...@@ -1719,7 +1719,7 @@ class IncomingSession(QObject): ...@@ -1719,7 +1719,7 @@ class IncomingSession(QObject):
@property @property
def ringtone(self): def ringtone(self):
if 'ringtone' not in self.__dict__: if 'ringtone' not in self.__dict__:
if self.audio_stream or self.video_stream or self.desktopsharing_stream: if self.audio_stream or self.video_stream or self.screensharing_stream:
sound_file = self.session.account.sounds.inbound_ringtone sound_file = self.session.account.sounds.inbound_ringtone
if sound_file is not None and sound_file.path is DefaultPath: if sound_file is not None and sound_file.path is DefaultPath:
settings = SIPSimpleSettings() settings = SIPSimpleSettings()
...@@ -1963,8 +1963,8 @@ class SessionManager(object): ...@@ -1963,8 +1963,8 @@ class SessionManager(object):
accepted_streams = incoming_session.accepted_streams accepted_streams = incoming_session.accepted_streams
if incoming_session.chat_stream in accepted_streams: if incoming_session.chat_stream in accepted_streams:
accepted_streams.remove(incoming_session.chat_stream) accepted_streams.remove(incoming_session.chat_stream)
if incoming_session.desktopsharing_stream in accepted_streams: if incoming_session.screensharing_stream in accepted_streams:
accepted_streams.remove(incoming_session.desktopsharing_stream) accepted_streams.remove(incoming_session.screensharing_stream)
if incoming_session.proposal: if incoming_session.proposal:
session.accept_proposal(accepted_streams) session.accept_proposal(accepted_streams)
else: else:
...@@ -2023,12 +2023,12 @@ class SessionManager(object): ...@@ -2023,12 +2023,12 @@ class SessionManager(object):
audio_streams = [stream for stream in notification.data.streams if stream.type=='audio'] audio_streams = [stream for stream in notification.data.streams if stream.type=='audio']
video_streams = [stream for stream in notification.data.streams if stream.type=='video'] video_streams = [stream for stream in notification.data.streams if stream.type=='video']
chat_streams = [stream for stream in notification.data.streams if stream.type=='chat'] chat_streams = [stream for stream in notification.data.streams if stream.type=='chat']
desktopsharing_streams = [stream for stream in notification.data.streams if stream.type=='desktop-sharing'] screensharing_streams = [stream for stream in notification.data.streams if stream.type=='screen-sharing']
filetransfer_streams = [stream for stream in notification.data.streams if stream.type=='file-transfer'] filetransfer_streams = [stream for stream in notification.data.streams if stream.type=='file-transfer']
if not audio_streams and not video_streams and not chat_streams and not desktopsharing_streams and not filetransfer_streams: if not audio_streams and not video_streams and not chat_streams and not screensharing_streams and not filetransfer_streams:
session.reject(488) session.reject(488)
return return
if filetransfer_streams and (audio_streams or video_streams or chat_streams or desktopsharing_streams): if filetransfer_streams and (audio_streams or video_streams or chat_streams or screensharing_streams):
session.reject(488) session.reject(488)
return return
session.send_ring_indication() session.send_ring_indication()
...@@ -2050,9 +2050,9 @@ class SessionManager(object): ...@@ -2050,9 +2050,9 @@ class SessionManager(object):
audio_stream = audio_streams[0] if audio_streams else None audio_stream = audio_streams[0] if audio_streams else None
video_stream = video_streams[0] if video_streams else None video_stream = video_streams[0] if video_streams else None
chat_stream = chat_streams[0] if chat_streams else None chat_stream = chat_streams[0] if chat_streams else None
desktopsharing_stream = desktopsharing_streams[0] if desktopsharing_streams else None screensharing_stream = screensharing_streams[0] if screensharing_streams else None
dialog = IncomingDialog() # The dialog is constructed without the main window as parent so that on Linux it is displayed on the current workspace rather than the one on which the main window resides. dialog = IncomingDialog() # The dialog is constructed without the main window as parent so that on Linux it is displayed on the current workspace rather than the one on which the main window resides.
incoming_session = IncomingSession(dialog, session, contact, proposal=False, audio_stream=audio_stream, video_stream=video_stream, chat_stream=chat_stream, desktopsharing_stream=desktopsharing_stream) incoming_session = IncomingSession(dialog, session, contact, proposal=False, audio_stream=audio_stream, video_stream=video_stream, chat_stream=chat_stream, screensharing_stream=screensharing_stream)
bisect.insort_right(self.incoming_sessions, incoming_session) bisect.insort_right(self.incoming_sessions, incoming_session)
incoming_session.accepted.connect(partial(self._SH_IncomingSessionAccepted, incoming_session)) incoming_session.accepted.connect(partial(self._SH_IncomingSessionAccepted, incoming_session))
incoming_session.rejected.connect(partial(self._SH_IncomingSessionRejected, incoming_session)) incoming_session.rejected.connect(partial(self._SH_IncomingSessionRejected, incoming_session))
...@@ -2068,12 +2068,12 @@ class SessionManager(object): ...@@ -2068,12 +2068,12 @@ class SessionManager(object):
audio_streams = [stream for stream in notification.data.streams if stream.type=='audio'] audio_streams = [stream for stream in notification.data.streams if stream.type=='audio']
video_streams = [stream for stream in notification.data.streams if stream.type=='video'] video_streams = [stream for stream in notification.data.streams if stream.type=='video']
chat_streams = [stream for stream in notification.data.streams if stream.type=='chat'] chat_streams = [stream for stream in notification.data.streams if stream.type=='chat']
desktopsharing_streams = [stream for stream in notification.data.streams if stream.type=='desktop-sharing'] screensharing_streams = [stream for stream in notification.data.streams if stream.type=='screen-sharing']
filetransfer_streams = [stream for stream in notification.data.streams if stream.type=='file-transfer'] filetransfer_streams = [stream for stream in notification.data.streams if stream.type=='file-transfer']
if not audio_streams and not video_streams and not chat_streams and not desktopsharing_streams and not filetransfer_streams: if not audio_streams and not video_streams and not chat_streams and not screensharing_streams and not filetransfer_streams:
session.reject_proposal(488) session.reject_proposal(488)
return return
if filetransfer_streams and (audio_streams or video_streams or chat_streams or desktopsharing_streams): if filetransfer_streams and (audio_streams or video_streams or chat_streams or screensharing_streams):
session.reject_proposal(488) session.reject_proposal(488)
return return
session.send_ring_indication() session.send_ring_indication()
...@@ -2089,9 +2089,9 @@ class SessionManager(object): ...@@ -2089,9 +2089,9 @@ class SessionManager(object):
audio_stream = audio_streams[0] if audio_streams else None audio_stream = audio_streams[0] if audio_streams else None
video_stream = video_streams[0] if video_streams else None video_stream = video_streams[0] if video_streams else None
chat_stream = chat_streams[0] if chat_streams else None chat_stream = chat_streams[0] if chat_streams else None
desktopsharing_stream = desktopsharing_streams[0] if desktopsharing_streams else None screensharing_stream = screensharing_streams[0] if screensharing_streams else None
dialog = IncomingDialog() # The dialog is constructed without the main window as parent so that on Linux it is displayed on the current workspace rather than the one on which the main window resides. dialog = IncomingDialog() # The dialog is constructed without the main window as parent so that on Linux it is displayed on the current workspace rather than the one on which the main window resides.
incoming_session = IncomingSession(dialog, session, contact, proposal=True, audio_stream=audio_stream, video_stream=video_stream, chat_stream=chat_stream, desktopsharing_stream=desktopsharing_stream) incoming_session = IncomingSession(dialog, session, contact, proposal=True, audio_stream=audio_stream, video_stream=video_stream, chat_stream=chat_stream, screensharing_stream=screensharing_stream)
bisect.insort_right(self.incoming_sessions, incoming_session) bisect.insort_right(self.incoming_sessions, incoming_session)
incoming_session.accepted.connect(partial(self._SH_IncomingSessionAccepted, incoming_session)) incoming_session.accepted.connect(partial(self._SH_IncomingSessionAccepted, incoming_session))
incoming_session.rejected.connect(partial(self._SH_IncomingSessionRejected, incoming_session)) incoming_session.rejected.connect(partial(self._SH_IncomingSessionRejected, incoming_session))
......
...@@ -685,7 +685,7 @@ padding: 2px;</string> ...@@ -685,7 +685,7 @@ padding: 2px;</string>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="ToolButton" name="ds_session_button"> <widget class="ToolButton" name="ss_session_button">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>29</width> <width>29</width>
...@@ -699,7 +699,7 @@ padding: 2px;</string> ...@@ -699,7 +699,7 @@ padding: 2px;</string>
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Start desktop sharing </string> <string>Start screen sharing</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset>
...@@ -1295,6 +1295,11 @@ padding: 2px;</string> ...@@ -1295,6 +1295,11 @@ padding: 2px;</string>
</action> </action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>ToolButton</class>
<extends>QToolButton</extends>
<header>blink.widgets.buttons</header>
</customwidget>
<customwidget> <customwidget>
<class>LineEdit</class> <class>LineEdit</class>
<extends>QLineEdit</extends> <extends>QLineEdit</extends>
...@@ -1320,11 +1325,6 @@ padding: 2px;</string> ...@@ -1320,11 +1325,6 @@ padding: 2px;</string>
<extends>QComboBox</extends> <extends>QComboBox</extends>
<header>blink.accounts</header> <header>blink.accounts</header>
</customwidget> </customwidget>
<customwidget>
<class>ToolButton</class>
<extends>QToolButton</extends>
<header>blink.widgets.buttons</header>
</customwidget>
<customwidget> <customwidget>
<class>SessionListView</class> <class>SessionListView</class>
<extends>QListView</extends> <extends>QListView</extends>
...@@ -1360,7 +1360,7 @@ padding: 2px;</string> ...@@ -1360,7 +1360,7 @@ padding: 2px;</string>
<tabstop>add_contact_button</tabstop> <tabstop>add_contact_button</tabstop>
<tabstop>audio_call_button</tabstop> <tabstop>audio_call_button</tabstop>
<tabstop>im_session_button</tabstop> <tabstop>im_session_button</tabstop>
<tabstop>ds_session_button</tabstop> <tabstop>ss_session_button</tabstop>
<tabstop>silent_button</tabstop> <tabstop>silent_button</tabstop>
<tabstop>session_list</tabstop> <tabstop>session_list</tabstop>
<tabstop>hangup_all_button</tabstop> <tabstop>hangup_all_button</tabstop>
......
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StreamButton" name="desktopsharing_stream"> <widget class="StreamButton" name="screensharing_stream">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>26</width> <width>26</width>
...@@ -302,11 +302,11 @@ ...@@ -302,11 +302,11 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset>
<normaloff>icons/desktopsharing.png</normaloff> <normaloff>icons/screensharing.png</normaloff>
<normalon>icons/desktopsharing-rejected.png</normalon> <normalon>icons/screensharing-rejected.png</normalon>
<disabledoff>icons/desktopsharing.png</disabledoff> <disabledoff>icons/screensharing.png</disabledoff>
<disabledon>icons/desktopsharing-rejected.png</disabledon> <disabledon>icons/screensharing-rejected.png</disabledon>
<selectedon>icons/desktopsharing-auto-rejected.png</selectedon>icons/desktopsharing.png</iconset> <selectedon>icons/screensharing-auto-rejected.png</selectedon>icons/screensharing.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
...@@ -473,7 +473,7 @@ ...@@ -473,7 +473,7 @@
</spacer> </spacer>
</item> </item>
<item row="3" column="0" colspan="3"> <item row="3" column="0" colspan="3">
<widget class="QLabel" name="desktopsharing_label"> <widget class="QLabel" name="screensharing_label">
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
...@@ -539,7 +539,7 @@ ...@@ -539,7 +539,7 @@
</palette> </palette>
</property> </property>
<property name="text"> <property name="text">
<string extracomment="is offering to share his desktop">is asking to share your desktop</string> <string extracomment="is offering to share his screen">is asking to share your screen</string>
</property> </property>
<property name="indent"> <property name="indent">
<number>3</number> <number>3</number>
......
...@@ -2068,7 +2068,7 @@ ...@@ -2068,7 +2068,7 @@
<item row="1" column="0" colspan="5"> <item row="1" column="0" colspan="5">
<widget class="QCheckBox" name="trace_msrp_button"> <widget class="QCheckBox" name="trace_msrp_button">
<property name="text"> <property name="text">
<string>Trace MSRP (used for chat, file transfer and desktop sharing)</string> <string>Trace MSRP (used for chat, file transfer and screen sharing)</string>
</property> </property>
</widget> </widget>
</item> </item>
......
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