1515
1616ASSETS_DIR = os .path .abspath (os .path .join (os .path .dirname (__file__ ), ".." , "assets" ))
1717LOGO_PATH = os .path .join (ASSETS_DIR , "logo.png" )
18+ COMM_LOGO_PATH = os .path .join (ASSETS_DIR , "comm-logo.png" )
1819
1920
2021def load_svg_pixbuf (path , size ):
@@ -33,6 +34,7 @@ def __init__(self, system_service: SystemService, **kwargs):
3334 self .system_service = system_service
3435 self .config = SetupConfig ()
3536 self .completed_steps = set () # Track completed steps
37+ self .is_simplified_env = system_service .is_simplified_environment ()
3638 self .set_title (_ ("BigLinux Setup" ))
3739
3840 # --- Fullscreen for Xorg without compositor ---
@@ -94,25 +96,49 @@ def _build_ui(self):
9496 )
9597 header_wrapper .set_center_widget (header_content_box )
9698
97- self .steps = [
98- {"name" : "language" , "file" : "headerbar-locale.svg" },
99- {"name" : "keyboard" , "file" : "headerbar-keyboard.svg" },
100- {"name" : "desktop" , "file" : "headerbar-display.svg" },
101- {"name" : "theme" , "file" : "headerbar-theme.svg" },
102- ]
103-
104- self ._add_step_button (header_content_box , self .steps [0 ])
105- self ._add_step_button (header_content_box , self .steps [1 ])
99+ # Define steps based on environment
100+ if self .is_simplified_env :
101+ self .steps = [
102+ {"name" : "language" , "file" : "headerbar-locale.svg" },
103+ {"name" : "keyboard" , "file" : "headerbar-keyboard.svg" },
104+ ]
105+ else :
106+ self .steps = [
107+ {"name" : "language" , "file" : "headerbar-locale.svg" },
108+ {"name" : "keyboard" , "file" : "headerbar-keyboard.svg" },
109+ {"name" : "desktop" , "file" : "headerbar-display.svg" },
110+ {"name" : "theme" , "file" : "headerbar-theme.svg" },
111+ ]
112+
113+ # Build header layout based on environment
114+ if self .is_simplified_env :
115+ # Simplified layout: [Language] [comm-logo.png] [Keyboard]
116+ self ._add_step_button (header_content_box , self .steps [0 ])
117+
118+ # Use comm-logo.png for simplified environments
119+ logo_path = COMM_LOGO_PATH if os .path .exists (COMM_LOGO_PATH ) else LOGO_PATH
120+ if os .path .exists (logo_path ):
121+ logo = Gtk .Image .new_from_file (logo_path )
122+ logo .set_pixel_size (72 )
123+ logo .set_margin_start (20 )
124+ logo .set_margin_end (20 )
125+ header_content_box .append (logo )
126+
127+ self ._add_step_button (header_content_box , self .steps [1 ])
128+ else :
129+ # Full layout: [Language] [Keyboard] [logo.png] [Desktop] [Theme]
130+ self ._add_step_button (header_content_box , self .steps [0 ])
131+ self ._add_step_button (header_content_box , self .steps [1 ])
106132
107- if os .path .exists (LOGO_PATH ):
108- logo = Gtk .Image .new_from_file (LOGO_PATH )
109- logo .set_pixel_size (72 )
110- logo .set_margin_start (20 )
111- logo .set_margin_end (20 )
112- header_content_box .append (logo )
133+ if os .path .exists (LOGO_PATH ):
134+ logo = Gtk .Image .new_from_file (LOGO_PATH )
135+ logo .set_pixel_size (72 )
136+ logo .set_margin_start (20 )
137+ logo .set_margin_end (20 )
138+ header_content_box .append (logo )
113139
114- self ._add_step_button (header_content_box , self .steps [2 ])
115- self ._add_step_button (header_content_box , self .steps [3 ])
140+ self ._add_step_button (header_content_box , self .steps [2 ])
141+ self ._add_step_button (header_content_box , self .steps [3 ])
116142
117143 # --- Content Area ---
118144 content_box = Gtk .Box (orientation = Gtk .Orientation .VERTICAL , vexpand = True )
@@ -306,9 +332,14 @@ def _on_keyboard_selected(self, view, layout):
306332 # Mark keyboard step as completed
307333 self .completed_steps .add ("keyboard" )
308334
309- # LAZY LOADING: Ensure desktop view exists before showing it
310- self ._ensure_view ("desktop" )
311- self .stack .set_visible_child_name ("desktop" )
335+ if self .is_simplified_env :
336+ # Skip desktop and theme for simplified environments (GNOME/XFCE/Cinnamon)
337+ self .system_service .finalize_setup (self .config )
338+ self .close ()
339+ else :
340+ # LAZY LOADING: Ensure desktop view exists before showing it
341+ self ._ensure_view ("desktop" )
342+ self .stack .set_visible_child_name ("desktop" )
312343
313344 def _add_desktop_view (self ):
314345 view = DesktopView (system_service = self .system_service )
0 commit comments