import os import gi gi.require_version("Gtk", "4.0") gi.require_version("Adw", "1") from gi.repository import Adw, Gdk, Gtk class WelcomePage(Adw.Bin): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) page = Adw.StatusPage() page.set_title("Welcome to Iridium OS") page.set_description("The installation will begin shortly") # Load custom icon icon_path = os.path.join( os.path.dirname(__file__), "..", "..", "..", "data", "icons", "org.iridium.Installer.svg", ) if os.path.exists(icon_path): try: paintable = Gdk.Texture.new_from_filename(icon_path) page.set_paintable(paintable) except Exception: page.set_icon_name("system-software-install-symbolic") else: page.set_icon_name("system-software-install-symbolic") # Content Box box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box.set_spacing(12) box.set_halign(Gtk.Align.CENTER) lbl = Gtk.Label(label="Select your language:") lbl.add_css_class("heading") box.append(lbl) # Language Dropdown languages = [ "English", ] dropdown = Gtk.DropDown.new_from_strings(languages) box.append(dropdown) # Mount Point Entry mount_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6) mount_box.set_margin_top(24) mount_label = Gtk.Label(label="Installation Root (Mount Point):") mount_label.set_halign(Gtk.Align.START) self.mount_entry = Gtk.Entry(text="/mnt") mount_box.append(mount_label) mount_box.append(self.mount_entry) box.append(mount_box) page.set_child(box) self.set_child(page) def get_mount_root(self): return self.mount_entry.get_text()