diff --git a/src/Autoload/Global.gd b/src/Autoload/Global.gd index 79bc70d55..5fb168e56 100644 --- a/src/Autoload/Global.gd +++ b/src/Autoload/Global.gd @@ -704,6 +704,8 @@ func _ready() -> void: continue var value = config_cache.get_value("preferences", pref) set(pref, value) + if OS.is_sandboxed(): + Global.use_native_file_dialogs = true await get_tree().process_frame project_switched.emit() diff --git a/src/Preferences/PreferencesDialog.gd b/src/Preferences/PreferencesDialog.gd index 14dbd033f..a2458d75c 100644 --- a/src/Preferences/PreferencesDialog.gd +++ b/src/Preferences/PreferencesDialog.gd @@ -255,8 +255,10 @@ func _ready() -> void: var drivers := right_side.get_node(^"Drivers") right_side.remove_child(drivers) drivers.queue_free() + if OS.is_sandboxed(): + get_tree().call_group(&"NoSandbox", &"free") if not OS.has_feature("pc"): - get_tree().call_group(&"DesktopOnly", &"queue_free") + get_tree().call_group(&"DesktopOnly", &"free") for child in right_side.get_children(): content_list.append(child.name) diff --git a/src/Preferences/PreferencesDialog.tscn b/src/Preferences/PreferencesDialog.tscn index ba3b802ad..2d3a404a9 100644 --- a/src/Preferences/PreferencesDialog.tscn +++ b/src/Preferences/PreferencesDialog.tscn @@ -219,12 +219,12 @@ mouse_default_cursor_shape = 2 button_pressed = true text = "On" -[node name="NativeFileDialogsLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions" groups=["DesktopOnly"]] +[node name="NativeFileDialogsLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions" groups=["DesktopOnly", "NoSandbox"]] layout_mode = 2 size_flags_horizontal = 3 text = "Use native file dialogs" -[node name="NativeFileDialogs" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions" groups=["DesktopOnly"]] +[node name="NativeFileDialogs" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions" groups=["DesktopOnly", "NoSandbox"]] layout_mode = 2 size_flags_horizontal = 3 tooltip_text = "When this setting is enabled, the native file dialogs of the operating system are being used, instead of Pixelorama's custom ones."