diff --git a/usr/lib/linuxmint/mintwelcome/mintwelcome.py b/usr/lib/linuxmint/mintwelcome/mintwelcome.py index c1e6867..137d439 100755 --- a/usr/lib/linuxmint/mintwelcome/mintwelcome.py +++ b/usr/lib/linuxmint/mintwelcome/mintwelcome.py @@ -92,6 +92,20 @@ def __init__(self): builder.get_object("button_gufw").connect("clicked", self.launch, "gufw") builder.get_object("go_button").connect("clicked", self.go) + # Accessibility button depends on DE + if os.getenv("XDG_CURRENT_DESKTOP") in ["Cinnamon", "X-Cinnamon"]: + builder.get_object("top_box_access").remove(builder.get_object("box_no_access")) + builder.get_object("button_access").connect("clicked", self.launch, ["cinnamon-settings", "accessibility"]) + elif os.getenv("XDG_CURRENT_DESKTOP") == "MATE": + builder.get_object("top_box_access").remove(builder.get_object("box_no_access")) + builder.get_object("button_access").connect("clicked", self.launch, "mate-at-properties") + elif os.getenv("XDG_CURRENT_DESKTOP") == "XFCE": + builder.get_object("top_box_access").remove(builder.get_object("box_no_access")) + builder.get_object("button_access").connect("clicked", self.launch, "xfce4-accessibility-settings") + else: + # Hide settings + builder.get_object("top_box_access").remove(builder.get_object("box_access")) + # Settings button depends on DE if os.getenv("XDG_CURRENT_DESKTOP") in ["Cinnamon", "X-Cinnamon"]: builder.get_object("button_settings").connect("clicked", self.launch, "cinnamon-settings") @@ -99,6 +113,7 @@ def __init__(self): builder.get_object("button_settings").connect("clicked", self.launch, "mate-control-center") elif os.getenv("XDG_CURRENT_DESKTOP") == "XFCE": builder.get_object("button_settings").connect("clicked", self.launch, "xfce4-settings-manager") + else: # Hide settings builder.get_object("box_first_steps").remove(builder.get_object("box_colors")) @@ -142,6 +157,10 @@ def __init__(self): self.stack.add_named(page, "page_contribute") self.list_box.add(SidebarRow(page, _("Contribute"), "xsi-starred-symbolic")) + page = builder.get_object("page_accessibility") + self.stack.add_named(page, "page_accessibility") + self.list_box.add(SidebarRow(page, _("Accessibility"), "xsi-accessibility-symbolic")) + self.list_box.connect("row-activated", self.sidebar_row_selected_cb) # Construct the bottom toolbar @@ -182,8 +201,11 @@ def themes(self, button): def visit(self, button, url): subprocess.Popen(["xdg-open", url]) - def launch(self, button, command): - subprocess.Popen([command]) + def launch(self,button, command): + if isinstance(command, str): + subprocess.Popen(command.split()) + else: + subprocess.Popen(command) def pkexec(self, button, command): subprocess.Popen(["pkexec", command]) diff --git a/usr/share/linuxmint/mintwelcome/mintwelcome.ui b/usr/share/linuxmint/mintwelcome/mintwelcome.ui index b49758c..fc31675 100644 --- a/usr/share/linuxmint/mintwelcome/mintwelcome.ui +++ b/usr/share/linuxmint/mintwelcome/mintwelcome.ui @@ -1,5 +1,5 @@ - + @@ -77,6 +77,221 @@ + + True + False + vertical + + + True + False + 24 + vertical + 18 + + + True + False + 24 + + + True + False + start + 6 + vertical + 12 + + + True + False + center + cs-universal-access + 6 + + + False + True + 0 + + + + + False + True + 0 + + + + + True + False + vertical + 3 + + + True + False + Accessibility + 0 + + + + + + + False + True + 0 + + + + + True + False + Linux Mint Accessibility includes tools like screen readers, zoom, and options to adjust text size and contrast to help users interact with the system more easily. + True + 0 + + + True + True + 1 + + + + + Launch + True + True + True + center + 3 + + + + False + True + end + 2 + + + + + True + True + 1 + + + + + False + True + 0 + + + + + False + 24 + + + True + False + start + 6 + vertical + 12 + + + True + False + center + dialog-error + True + 6 + + + False + True + 0 + + + + + False + True + 0 + + + + + True + False + vertical + 3 + + + True + False + No Accessibility Features Supported + 0 + + + + + + + False + True + 0 + + + + + True + False + The Desktop Enviroment that you are using may not support Accessibility features. + True + 0 + + + True + True + 1 + + + + + + + + True + True + 1 + + + + + False + True + 1 + + + + + False + True + 0 + + + + + + True False