Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion p3/app/term_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,11 @@ def _run_next_script(self):
self.vbox_main.button_run.set_image(Gtk.Image.new_from_icon_name("emblem-ok-symbolic", Gtk.IconSize.BUTTON))
self.vbox_main.progress_bar.set_text(done_text)
self.vbox_main.button_run.connect("clicked", self.on_done_clicked)

self.parent._script_running = False
self.vbox_main.button_run.set_sensitive(True)
return

self.parent._script_running = True
current_script = self.script_queue.pop(0)
self.vbox_main._update_header_labels(current_script)

Expand Down
4 changes: 3 additions & 1 deletion p3/app/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ def __init__(self, application, translations, *args, **kwargs):
# Initialize drag-and-drop but don't enable it by default
self._setup_drag_and_drop()

self._script_running = False

GLib.idle_add(self._check_updates)

def _check_updates(self):
Expand Down Expand Up @@ -1550,7 +1552,7 @@ def on_back_button_clicked(self, widget):
return

# Check if a script is currently running
if self.main_stack.get_visible_child_name() == "running_scripts":
if self._script_running:
# Show warning dialog before cancelling the running script
if not self._show_cancel_script_warning_dialog():
return # User cancelled the operation
Expand Down