Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Sophie Herold
gajim
Commits
c49f9d60
Commit
c49f9d60
authored
Apr 06, 2018
by
Yann Leboulanger
Committed by
Philipp Hörist
Aug 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix jingle negotiation from an XMPP point of view
parent
dfb7b4a0
Pipeline
#2093
passed with stages
in 2 minutes and 57 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
15 deletions
+13
-15
gajim/chat_control.py
gajim/chat_control.py
+10
-11
gajim/common/jingle_rtp.py
gajim/common/jingle_rtp.py
+1
-1
gajim/common/jingle_session.py
gajim/common/jingle_session.py
+1
-2
gajim/gui_interface.py
gajim/gui_interface.py
+1
-1
No files found.
gajim/chat_control.py
View file @
c49f9d60
...
...
@@ -264,17 +264,17 @@ class ChatControl(ChatControlBase):
act
.
connect
(
"activate"
,
func
)
self
.
parent_win
.
window
.
add_action
(
act
)
act
=
Gio
.
SimpleAction
.
new_stateful
(
self
.
audio_action
=
Gio
.
SimpleAction
.
new_stateful
(
'toggle-audio-'
+
self
.
control_id
,
None
,
GLib
.
Variant
.
new_boolean
(
False
))
act
.
connect
(
'change-state'
,
self
.
_on_audio
)
self
.
parent_win
.
window
.
add_action
(
act
)
self
.
audio_action
.
connect
(
'change-state'
,
self
.
_on_audio
)
self
.
parent_win
.
window
.
add_action
(
self
.
audio_action
)
act
=
Gio
.
SimpleAction
.
new_stateful
(
self
.
video_action
=
Gio
.
SimpleAction
.
new_stateful
(
'toggle-video-'
+
self
.
control_id
,
None
,
GLib
.
Variant
.
new_boolean
(
False
))
act
.
connect
(
'change-state'
,
self
.
_on_video
)
self
.
parent_win
.
window
.
add_action
(
act
)
self
.
video_action
.
connect
(
'change-state'
,
self
.
_on_video
)
self
.
parent_win
.
window
.
add_action
(
self
.
video_action
)
def
update_actions
(
self
):
win
=
self
.
parent_win
.
window
...
...
@@ -526,7 +526,8 @@ class ChatControl(ChatControlBase):
if
state
in
(
'connection_received'
,
'connecting'
):
setattr
(
self
,
jingle_type
+
'_sid'
,
sid
)
getattr
(
self
,
'_'
+
jingle_type
+
'_button'
).
set_active
(
jingle_state
!=
self
.
JINGLE_STATE_NULL
)
v
=
GLib
.
Variant
.
new_boolean
(
jingle_state
!=
self
.
JINGLE_STATE_NULL
)
getattr
(
self
,
jingle_type
+
'_action'
).
change_state
(
v
)
getattr
(
self
,
'update_'
+
jingle_type
)()
...
...
@@ -724,7 +725,8 @@ class ChatControl(ChatControlBase):
content
=
session
.
get_content
(
jingle_type
)
if
content
:
session
.
remove_content
(
content
.
creator
,
content
.
name
)
getattr
(
self
,
'_'
+
jingle_type
+
'_button'
).
set_active
(
False
)
v
=
GLib
.
Variant
.
new_boolean
(
False
)
getattr
(
self
,
jingle_type
+
'_action'
).
change_state
(
v
)
getattr
(
self
,
'update_'
+
jingle_type
)()
def
on_jingle_button_toggled
(
self
,
state
,
jingle_type
):
...
...
@@ -768,9 +770,6 @@ class ChatControl(ChatControlBase):
fixed
.
set_no_show_all
(
True
)
self
.
close_jingle_content
(
jingle_type
)
img
=
getattr
(
self
,
'_'
+
jingle_type
+
'_button'
).
get_property
(
'image'
)
img
.
set_from_file
(
path_to_img
)
def
set_lock_image
(
self
):
loggable
=
self
.
session
and
self
.
session
.
is_loggable
()
...
...
gajim/common/jingle_rtp.py
View file @
c49f9d60
...
...
@@ -43,7 +43,7 @@ class JingleRTPContent(JingleContent):
def
__init__
(
self
,
session
,
media
,
transport
=
None
):
if
transport
is
None
:
transport
=
JingleTransportICEUDP
(
None
)
JingleContent
.
__init__
(
self
,
session
,
transport
)
JingleContent
.
__init__
(
self
,
session
,
transport
,
None
)
self
.
media
=
media
self
.
_dtmf_running
=
False
self
.
farstream_media
=
{
...
...
gajim/common/jingle_session.py
View file @
c49f9d60
...
...
@@ -633,8 +633,7 @@ class JingleSession:
if
content_type
:
try
:
if
transport
:
content
=
content_type
(
self
,
transport
=
transport
,
senders
=
senders
)
content
=
content_type
(
self
,
transport
=
transport
)
self
.
add_content
(
element
[
'name'
],
content
,
'peer'
)
contents
.
append
(
content
)
...
...
gajim/gui_interface.py
View file @
c49f9d60
...
...
@@ -1238,7 +1238,7 @@ class Interface:
# TODO: conditional blocking if peer is not in roster
account
=
obj
.
conn
.
name
content_types
=
obj
.
contents
.
media
content_types
=
[
obj
.
contents
.
media
]
# check type of jingle session
if
'audio'
in
content_types
or
'video'
in
content_types
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment