fix(ui): reorder partition dialog, fix mount point selection, add threaded install with logs

This commit is contained in:
2026-02-03 21:06:16 +01:00
parent af86d357a4
commit 7d43b82ce1
2 changed files with 101 additions and 39 deletions

View File

@@ -476,10 +476,14 @@ class PartitioningPage(Adw.Bin):
dropdown = Gtk.DropDown.new_from_strings(options)
current_mp = data.get("mount_point")
# Ensure we have a valid string comparison
if not current_mp:
current_mp = "None"
if current_mp in options:
dropdown.set_selected(options.index(current_mp))
elif not current_mp:
dropdown.set_selected(options.index("None"))
else:
dropdown.set_selected(options.index("None"))
box.append(Gtk.Label(label=f"Mount point for {data['name']}:"))
box.append(dropdown)
@@ -511,6 +515,13 @@ class PartitioningPage(Adw.Bin):
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12, margin_top=24, margin_bottom=24, margin_start=24, margin_end=24)
win.set_content(box)
# Type dropdown
types = {"Root (Linux)": "8300", "EFI System": "ef00", "Swap": "8200"}
type_names = list(types.keys())
type_dropdown = Gtk.DropDown.new_from_strings(type_names)
box.append(Gtk.Label(label="Partition Type:"))
box.append(type_dropdown)
# Size entry
size_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=12)
size_entry = Gtk.Entry(text=str(int(data["bytes"] / (1024*1024))))
@@ -519,13 +530,6 @@ class PartitioningPage(Adw.Bin):
box.append(Gtk.Label(label="Size:"))
box.append(size_box)
# Type dropdown
types = {"Root (Linux)": "8300", "EFI System": "ef00", "Swap": "8200"}
type_names = list(types.keys())
type_dropdown = Gtk.DropDown.new_from_strings(type_names)
box.append(Gtk.Label(label="Partition Type:"))
box.append(type_dropdown)
error_label = Gtk.Label(label="")
error_label.add_css_class("error")
box.append(error_label)