1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Add a clear recently open file list option

This commit is contained in:
Emmanouil Papadeas 2024-10-10 00:40:51 +03:00
parent 2f24508dea
commit 7eeb0b0cba
3 changed files with 16 additions and 0 deletions

View file

@ -2498,6 +2498,10 @@ msgstr ""
msgid "Remove all extensions"
msgstr ""
#. Found in the preferences, under the Reset category.
msgid "Clear the recently opened file list"
msgstr ""
msgid "Lock aspect ratio"
msgstr ""

View file

@ -253,6 +253,7 @@ func _ready() -> void:
startup.queue_free()
right_side.get_node(^"Language").visible = true
Global.open_last_project = false
%ClearRecentFiles.hide()
if OS.get_name() == "Windows":
tablet_driver_label.visible = true
tablet_driver.visible = true
@ -465,5 +466,10 @@ func _on_reset_options_confirmation_confirmed() -> void:
for extension in extensions_list:
extensions_node.uninstall_extension(extension)
Global.config_cache.erase_section("extensions")
# Clear recent files list
if %ClearRecentFiles.button_pressed:
Global.config_cache.erase_section_key("data", "last_project_path")
Global.config_cache.erase_section_key("data", "recent_projects")
Global.top_menu_container.recent_projects_submenu.clear()
Global.config_cache.save(Global.CONFIG_PATH)

View file

@ -1386,6 +1386,12 @@ layout_mode = 2
mouse_default_cursor_shape = 2
text = "Remove all extensions"
[node name="ClearRecentFiles" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Reset"]
unique_name_in_owner = true
layout_mode = 2
mouse_default_cursor_shape = 2
text = "Clear the recently opened file list"
[node name="ResetButton" type="Button" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Reset"]
layout_mode = 2
mouse_default_cursor_shape = 2