Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
3d7f3467
Commit
3d7f3467
authored
Sep 04, 2014
by
Saul Ibarra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt to changes in streams API
parent
13ea1fc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
chatwindow.py
blink/chatwindow.py
+9
-0
sessions.py
blink/sessions.py
+3
-2
No files found.
blink/chatwindow.py
View file @
3d7f3467
...
@@ -700,6 +700,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -700,6 +700,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
notification_center
.
add_observer
(
self
,
name
=
'ChatStreamDidDeliverMessage'
)
notification_center
.
add_observer
(
self
,
name
=
'ChatStreamDidDeliverMessage'
)
notification_center
.
add_observer
(
self
,
name
=
'ChatStreamDidNotDeliverMessage'
)
notification_center
.
add_observer
(
self
,
name
=
'ChatStreamDidNotDeliverMessage'
)
notification_center
.
add_observer
(
self
,
name
=
'MediaStreamDidInitialize'
)
notification_center
.
add_observer
(
self
,
name
=
'MediaStreamDidInitialize'
)
notification_center
.
add_observer
(
self
,
name
=
'MediaStreamDidNotInitialize'
)
notification_center
.
add_observer
(
self
,
name
=
'MediaStreamDidStart'
)
notification_center
.
add_observer
(
self
,
name
=
'MediaStreamDidStart'
)
notification_center
.
add_observer
(
self
,
name
=
'MediaStreamDidFail'
)
notification_center
.
add_observer
(
self
,
name
=
'MediaStreamDidFail'
)
notification_center
.
add_observer
(
self
,
name
=
'MediaStreamDidEnd'
)
notification_center
.
add_observer
(
self
,
name
=
'MediaStreamDidEnd'
)
...
@@ -1292,6 +1293,14 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -1292,6 +1293,14 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
notification
.
sender
.
_blink_fail_reason
=
None
notification
.
sender
.
_blink_fail_reason
=
None
#session.chat_widget.add_message(ChatStatus('Connecting...')) # disable it until we can replace it in the DOM -Dan
#session.chat_widget.add_message(ChatStatus('Connecting...')) # disable it until we can replace it in the DOM -Dan
def
_NH_MediaStreamDidNotInitialize
(
self
,
notification
):
if
notification
.
sender
.
type
!=
'chat'
:
return
session
=
notification
.
sender
.
blink_session
.
items
.
chat
if
session
is
None
:
return
session
.
chat_widget
.
add_message
(
ChatStatus
(
'Failed to initialize chat:
%
s'
%
notification
.
data
.
reason
))
def
_NH_MediaStreamDidStart
(
self
,
notification
):
def
_NH_MediaStreamDidStart
(
self
,
notification
):
if
notification
.
sender
.
type
!=
'chat'
:
if
notification
.
sender
.
type
!=
'chat'
:
return
return
...
...
blink/sessions.py
View file @
3d7f3467
...
@@ -3711,8 +3711,9 @@ class FileTransfer(object):
...
@@ -3711,8 +3711,9 @@ class FileTransfer(object):
self
.
_terminate
()
self
.
_terminate
()
def
_NH_MediaStreamDidFail
(
self
,
notification
):
def
_NH_MediaStreamDidFail
(
self
,
notification
):
if
self
.
state
==
'connected'
:
# In principle the Session will end itself because this is the only stream,
self
.
end
()
# but lets be explicit about it -Saul
self
.
end
()
def
_NH_MediaStreamDidEnd
(
self
,
notification
):
def
_NH_MediaStreamDidEnd
(
self
,
notification
):
if
self
.
direction
==
'incoming'
:
if
self
.
direction
==
'incoming'
:
...
...
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