mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
If the OS is sandboxed, set Global.use_native_file_dialogs
to true and remove the option entirely from the Preferences
This commit is contained in:
parent
dd6332b75a
commit
e0a6727223
|
@ -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()
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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."
|
||||
|
|
Loading…
Reference in a new issue