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
b36ebb63
Commit
b36ebb63
authored
Feb 02, 2016
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reordered some notification handlers
parent
e05fb8e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
sessions.py
blink/sessions.py
+18
-18
No files found.
blink/sessions.py
View file @
b36ebb63
...
...
@@ -5203,11 +5203,11 @@ class SessionManager(object):
notification_center
.
add_observer
(
self
,
name
=
'BlinkFileTransferDidEnd'
)
notification_center
.
add_observer
(
self
,
name
=
'BlinkFileTransferWillRetry'
)
notification_center
.
add_observer
(
self
,
name
=
'BlinkSessionDidEnd'
)
notification_center
.
add_observer
(
self
,
name
=
'BlinkSessionWasDeleted'
)
notification_center
.
add_observer
(
self
,
name
=
'BlinkSessionDidChangeState'
)
notification_center
.
add_observer
(
self
,
name
=
'BlinkSessionDidChangeHoldState'
)
notification_center
.
add_observer
(
self
,
name
=
'BlinkSessionDidRemoveStream'
)
notification_center
.
add_observer
(
self
,
name
=
'BlinkSessionDidEnd'
)
notification_center
.
add_observer
(
self
,
name
=
'BlinkSessionWasDeleted'
)
notification_center
.
add_observer
(
self
,
name
=
'BlinkSessionListSelectionChanged'
)
...
...
@@ -5500,6 +5500,22 @@ class SessionManager(object):
def
_NH_BlinkSessionWasDeleted
(
self
,
notification
):
self
.
sessions
.
remove
(
notification
.
sender
)
def
_NH_BlinkFileTransferDidChangeState
(
self
,
notification
):
new_state
=
notification
.
data
.
new_state
if
new_state
in
(
'connecting/ringing'
,
'connected'
,
'ending'
):
self
.
update_ringtone
()
def
_NH_BlinkFileTransferWillRetry
(
self
,
notification
):
self
.
file_transfers
.
append
(
notification
.
sender
)
def
_NH_BlinkFileTransferDidEnd
(
self
,
notification
):
self
.
file_transfers
.
remove
(
notification
.
sender
)
if
not
notification
.
data
.
error
and
not
self
.
_filetransfer_tone_timer
.
isActive
():
self
.
_filetransfer_tone_timer
.
start
()
player
=
WavePlayer
(
SIPApplication
.
voice_audio_bridge
.
mixer
,
Resources
.
get
(
'sounds/file_transfer.wav'
),
volume
=
30
)
SIPApplication
.
voice_audio_bridge
.
add
(
player
)
player
.
start
()
def
_NH_BlinkSessionListSelectionChanged
(
self
,
notification
):
selected_session
=
notification
.
data
.
selected_session
deselected_session
=
notification
.
data
.
deselected_session
...
...
@@ -5529,19 +5545,3 @@ class SessionManager(object):
self
.
active_session
=
selected_session
notification
.
center
.
post_notification
(
'BlinkActiveSessionDidChange'
,
sender
=
self
,
data
=
NotificationData
(
previous_active_session
=
old_active_session
or
None
,
active_session
=
selected_session
))
def
_NH_BlinkFileTransferDidChangeState
(
self
,
notification
):
new_state
=
notification
.
data
.
new_state
if
new_state
in
(
'connecting/ringing'
,
'connected'
,
'ending'
):
self
.
update_ringtone
()
def
_NH_BlinkFileTransferWillRetry
(
self
,
notification
):
self
.
file_transfers
.
append
(
notification
.
sender
)
def
_NH_BlinkFileTransferDidEnd
(
self
,
notification
):
self
.
file_transfers
.
remove
(
notification
.
sender
)
if
not
notification
.
data
.
error
and
not
self
.
_filetransfer_tone_timer
.
isActive
():
self
.
_filetransfer_tone_timer
.
start
()
player
=
WavePlayer
(
SIPApplication
.
voice_audio_bridge
.
mixer
,
Resources
.
get
(
'sounds/file_transfer.wav'
),
volume
=
30
)
SIPApplication
.
voice_audio_bridge
.
add
(
player
)
player
.
start
()
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