Partition screen

This commit is contained in:
2026-02-01 21:00:44 +01:00
parent 17eac3de50
commit 62e1276881
3 changed files with 344 additions and 66 deletions

View File

@@ -61,11 +61,17 @@ class InstallerWindow(Adw.ApplicationWindow):
self.page_ids = []
self.current_page_index = 0
# Initialize Pages
self.welcome_page = WelcomePage()
self.storage_page = StoragePage()
self.partitioning_page = PartitioningPage()
self.user_page = UserPage()
# Add Pages
self.add_page(WelcomePage(), "welcome")
self.add_page(StoragePage(), "storage")
self.add_page(PartitioningPage(), "partitioning")
self.add_page(UserPage(), "user")
self.add_page(self.welcome_page, "welcome")
self.add_page(self.storage_page, "storage")
self.add_page(self.partitioning_page, "partitioning")
self.add_page(self.user_page, "user")
# Initialize view
if self.page_ids:
@@ -96,6 +102,18 @@ class InstallerWindow(Adw.ApplicationWindow):
self.update_buttons()
def on_next_clicked(self, button):
# Logic before transition
current_page_name = self.page_ids[self.current_page_index]
if current_page_name == "storage":
# Pass selected disk to partitioning page
selected_disk = self.storage_page.get_selected_disk()
if selected_disk:
self.partitioning_page.load_partitions(selected_disk)
else:
# Optionally handle no disk selected (alert user)
pass
if self.current_page_index < len(self.page_ids) - 1:
self.current_page_index += 1
self.stack.set_visible_child_name(self.page_ids[self.current_page_index])