From 94b79d8f2242fd9a6967cd330f2d80a294125f6f Mon Sep 17 00:00:00 2001 From: Jarred Wilson Date: Tue, 26 Nov 2024 23:28:45 +0000 Subject: [PATCH] Force partition confirmation after auto and manual partitioning --- vanilla_installer/defaults/disk.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vanilla_installer/defaults/disk.py b/vanilla_installer/defaults/disk.py index 7fb0bc64..462c0615 100644 --- a/vanilla_installer/defaults/disk.py +++ b/vanilla_installer/defaults/disk.py @@ -702,9 +702,10 @@ def __init__(self, window, distro_info, key, step, **kwargs): def get_finals(self): return {"disk": self.__partition_recipe} - def __on_modal_close_request(self, *args): + def __on_close_default_disk_part_modal(self, *args): self.btn_next.set_visible(self.__partition_recipe is not None) self.btn_next.set_sensitive(self.__partition_recipe is not None) + self.confirm_partition_changes() def __on_auto_clicked(self, button): pvs_to_remove = [] @@ -726,12 +727,11 @@ def __on_auto_clicked(self, button): "pvs_to_remove": pvs_to_remove, } } - modal = VanillaDefaultDiskConfirmModal(self.__window, self.__partition_recipe) - modal.present() + self.confirm_partition_changes() def __on_manual_clicked(self, button): modal = VanillaDefaultDiskPartModal(self.__window, self, self.__selected_disks) - modal.connect("partitioning-set", self.__on_modal_close_request) + modal.connect("partitioning-set", self.__on_close_default_disk_part_modal) modal.present() def on_disk_entry_toggled(self, widget, disk): @@ -758,5 +758,8 @@ def set_partition_recipe(self, recipe): self.__partition_recipe = recipe def __on_btn_next_clicked(self, button): + self.confirm_partition_changes() + + def confirm_partition_changes(self): modal = VanillaDefaultDiskConfirmModal(self.__window, self.__partition_recipe) modal.present()