From aa1a8f3554916e178752ff75db3c8cae9037230f Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Fri, 26 Jun 2026 19:09:51 +0100 Subject: [PATCH] Process tab remove all in remove_tab function --- src/Widgets/Sidebar.vala | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/Widgets/Sidebar.vala b/src/Widgets/Sidebar.vala index 619ec0b55..2322472b7 100644 --- a/src/Widgets/Sidebar.vala +++ b/src/Widgets/Sidebar.vala @@ -124,19 +124,6 @@ public class Code.Sidebar : Gtk.Grid { stack.show_all (); }); - stack.remove.connect (() => { - switch (stack.get_children ().length ()) { - case 0: - stack.no_show_all = true; - stack.hide (); - break; - case 1: - stack_switcher.no_show_all = true; - stack_switcher.hide (); - break; - } - }); - Gtk.TargetEntry uris = {"text/uri-list", 0, TargetType.URI_LIST}; Gtk.drag_dest_set (this, Gtk.DestDefaults.ALL, {uris}, Gdk.DragAction.COPY); drag_data_received.connect (drag_received); @@ -190,6 +177,16 @@ public class Code.Sidebar : Gtk.Grid { public void remove_tab (Code.PaneSwitcher tab) { stack.remove (tab); + switch (stack.get_children ().length ()) { + case 0: + stack.no_show_all = true; + stack.hide (); + break; + case 1: + stack_switcher.no_show_all = true; + stack_switcher.hide (); + break; + } } public void notify_cloning_success () {