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
24dfd3a0
Commit
24dfd3a0
authored
Feb 09, 2016
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified logic of resetting statuses with limited lifetimes
parent
f988d6c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
sessions.py
blink/sessions.py
+4
-4
No files found.
blink/sessions.py
View file @
24dfd3a0
...
@@ -1804,8 +1804,8 @@ class AudioSessionItem(object):
...
@@ -1804,8 +1804,8 @@ class AudioSessionItem(object):
self
.
widget
.
record_button
.
setEnabled
(
False
)
self
.
widget
.
record_button
.
setEnabled
(
False
)
self
.
widget
.
hangup_button
.
setEnabled
(
False
)
self
.
widget
.
hangup_button
.
setEnabled
(
False
)
def
_reset_status
(
self
):
def
_reset_status
(
self
,
expected_status
):
if
not
self
.
__deleted__
and
not
self
.
blink_session
.
on_hold
:
if
self
.
status
==
expected_status
:
self
.
status
=
None
self
.
status
=
None
def
_SH_HangupButtonClicked
(
self
):
def
_SH_HangupButtonClicked
(
self
):
...
@@ -1891,7 +1891,7 @@ class AudioSessionItem(object):
...
@@ -1891,7 +1891,7 @@ class AudioSessionItem(object):
self
.
widget
.
record_button
.
setEnabled
(
True
)
self
.
widget
.
record_button
.
setEnabled
(
True
)
self
.
widget
.
hangup_button
.
setEnabled
(
True
)
self
.
widget
.
hangup_button
.
setEnabled
(
True
)
self
.
status
=
Status
(
'Connected'
)
self
.
status
=
Status
(
'Connected'
)
call_later
(
3
,
self
.
_reset_status
)
call_later
(
3
,
self
.
_reset_status
,
self
.
status
)
# reset status 3 seconds later if it hasn't changed until then
else
:
else
:
self
.
status
=
Status
(
'Audio refused'
,
color
=
'#900000'
)
self
.
status
=
Status
(
'Audio refused'
,
color
=
'#900000'
)
self
.
_cleanup
()
self
.
_cleanup
()
...
@@ -1903,7 +1903,7 @@ class AudioSessionItem(object):
...
@@ -1903,7 +1903,7 @@ class AudioSessionItem(object):
self
.
widget
.
record_button
.
setEnabled
(
True
)
self
.
widget
.
record_button
.
setEnabled
(
True
)
self
.
widget
.
hangup_button
.
setEnabled
(
True
)
self
.
widget
.
hangup_button
.
setEnabled
(
True
)
self
.
status
=
Status
(
'Connected'
)
self
.
status
=
Status
(
'Connected'
)
call_later
(
3
,
self
.
_reset_status
)
call_later
(
3
,
self
.
_reset_status
,
self
.
status
)
# reset status 3 seconds later if it hasn't changed until then
def
_NH_BlinkSessionDidNotAddStream
(
self
,
notification
):
def
_NH_BlinkSessionDidNotAddStream
(
self
,
notification
):
if
notification
.
data
.
stream
.
type
==
'audio'
:
if
notification
.
data
.
stream
.
type
==
'audio'
:
...
...
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