Skip to content

Commit

Permalink
Force partition confirmation after auto and manual partitioning
Browse files Browse the repository at this point in the history
  • Loading branch information
jardon committed Dec 3, 2024
1 parent 0de6e52 commit 94b79d8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions vanilla_installer/defaults/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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):
Expand All @@ -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()

0 comments on commit 94b79d8

Please sign in to comment.