From 22d98530593230e98e3d78a6d96a196215fe57db Mon Sep 17 00:00:00 2001 From: Kacper Paczos Date: Sun, 23 Aug 2026 21:48:39 +0200 Subject: [PATCH] feat: disable Clone Box while the box is running distrobox refuses to clone a running container, and BoxBuddy got round that by stopping the box behind the user's back before `create --clone`. The row is now greyed out while the box is up, the same way Delete Box is, and comes back once it is stopped - the Stop button sits right above it. The defensive stop in clone_box stays as a safety net for a box that comes up between the render and the click. --- src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.rs b/src/main.rs index a20908a..b2f49f7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -551,6 +551,12 @@ fn make_box_tab(dbox: &DBox, window: &ApplicationWindow, tab_num: u32) -> gtk::B let win_clone = window.clone(); clone_row.connect_activated(move |_row| on_clone_clicked(&win_clone, clone_bn.clone())); + // distrobox refuses to clone a running container, and the app used to get + // round that by stopping the box behind the user's back. Like Delete, the + // row is simply unavailable until the box is stopped - the Stop button is + // right there in the header. + clone_row.set_sensitive(!dbox.is_running); + // put all into list boxed_list.append(&open_terminal_row); boxed_list.append(&upgrade_row);