Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guido Gunther
Stream
Commits
7c78cf88
Verified
Commit
7c78cf88
authored
Apr 15, 2021
by
Todd Weaver
Browse files
Adding uninhibit properly based on cookie returned from inhibit
Restoring pause back for active player
parent
d9d007db
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/results.py
View file @
7c78cf88
...
...
@@ -330,7 +330,7 @@ class ResultsBox(Gtk.Box):
@
Gtk
.
Template
.
Callback
()
def
play_button
(
self
,
button
):
# loop through all child results pausing them
self
.
app_window
.
pause_all
()
self
.
app_window
.
pause_all
(
self
)
self
.
play
.
set_visible
(
False
)
self
.
pause
.
set_visible
(
True
)
...
...
src/window.py
View file @
7c78cf88
...
...
@@ -176,25 +176,25 @@ class StreamWindow(Handy.ApplicationWindow):
if
key
==
"f"
:
self
.
fullscreen_toggle
(
focus_child
)
def
pause_all
(
self
):
def
pause_all
(
self
,
active_window
):
if
self
.
scroller_stack
:
scrollers
=
self
.
scroller_stack
.
get_children
()
for
scroller
in
scrollers
:
flowboxes
=
scroller
.
results_list
.
get_children
()
for
flowbox
in
flowboxes
:
flowbox
.
get_child
().
null_out_player
()
result_window
=
flowbox
.
get_child
()
if
result_window
!=
active_window
:
flowbox
.
get_child
().
null_out_player
()
def
inhibit_app
(
self
):
self
.
application
.
inhibit
(
self
,
self
.
inhibit_cookie
=
self
.
application
.
inhibit
(
self
,
Gtk
.
ApplicationInhibitFlags
.
IDLE
|
Gtk
.
ApplicationInhibitFlags
.
LOGOUT
,
"Stream-ing Video"
)
def
uninhibit_app
(
self
):
self
.
application
.
inhibit
(
self
,
Gtk
.
ApplicationInhibitFlags
.
IDLE
|
Gtk
.
ApplicationInhibitFlags
.
LOGOUT
,
"Stream-ing Video"
)
if
self
.
inhibit_cookie
:
self
.
application
.
uninhibit
(
self
.
inhibit_cookie
)
def
hide_error_box
(
self
):
self
.
error_box
.
set_visible
(
False
)
...
...
@@ -213,6 +213,7 @@ class StreamWindow(Handy.ApplicationWindow):
self
.
is_playing
=
False
self
.
is_fullscreen
=
False
self
.
inhibit_cookie
=
0
self
.
strong_instances
=
[]
instances
=
Instances
(
app_window
=
self
)
instances
.
get_strong_instances
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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