X-Git-Url: http://git.scottworley.com/srec/blobdiff_plain/99c6dc78ff64331f53e626354c4900a3f539a25d..eebbdf01820ff750bbde555b56d07b78830a7ccb:/srec.py diff --git a/srec.py b/srec.py index 3490695..7ef4d46 100644 --- a/srec.py +++ b/srec.py @@ -126,7 +126,7 @@ def on_start_button(_: Gtk.Button, stack: Gtk.Stack) -> None: ['-f', 'pulse', '-ac', '2', '-i', 'default', filename]) -def on_stop_button(_: Gtk.Button, stack: Gtk.Stack) -> None: +def stop_streams() -> None: global recording, sharing # pylint: disable=global-statement assert recording is not None recording.stop() @@ -134,6 +134,10 @@ def on_stop_button(_: Gtk.Button, stack: Gtk.Stack) -> None: if sharing is not None: sharing.stop() sharing = None + + +def on_stop_button(_: Gtk.Button, stack: Gtk.Stack) -> None: + stop_streams() stack.set_visible_child_name("not_recording")