Update CHANGELOG & AboutDialog, trim trailing whitespaces

This commit is contained in:
Manolis Papadeas 2020-10-27 23:03:43 +02:00
parent 7126074a0e
commit 4415f86c56
6 changed files with 17 additions and 14 deletions

View file

@ -179,7 +179,7 @@ func _ready() -> void:
root_directory = OS.get_executable_path().get_base_dir()
# Load settings from the config file
config_cache.load("user://cache.ini")
recent_projects = config_cache.get_value("data", "recent_projects", [])
# The fact that root_dir is set earlier than this is important
@ -214,8 +214,8 @@ func _ready() -> void:
help_menu = find_node_by_name(root, "HelpMenu")
cursor_position_label = find_node_by_name(root, "CursorPosition")
zoom_level_label = find_node_by_name(root, "ZoomLevel")
recent_projects_submenu = PopupMenu.new()
recent_projects_submenu = PopupMenu.new()
recent_projects_submenu.set_name("recent_projects_submenu")
new_image_dialog = find_node_by_name(root, "CreateNewImage")
@ -520,20 +520,20 @@ func _exit_tree() -> void:
func save_project_to_recent_list(path : String) -> void:
if path.get_file().substr(0, 7) == "backup-" or path == "":
return
if recent_projects.has(path):
return
if recent_projects.size() >= 5:
recent_projects.pop_front()
recent_projects.push_back(path)
config_cache.set_value("data", "recent_projects", recent_projects)
recent_projects_submenu.clear()
update_recent_projects_submenu()
func update_recent_projects_submenu() -> void:
for project in Global.recent_projects:
recent_projects_submenu.add_item(project.get_file())

View file

@ -119,7 +119,7 @@ func open_pxo_file(path : String, untitled_backup : bool = false) -> void:
Export.was_exported = false
Global.file_menu.get_popup().set_item_text(3, tr("Save") + " %s" % path.get_file())
Global.file_menu.get_popup().set_item_text(5, tr("Export"))
Global.save_project_to_recent_list(path)
@ -338,7 +338,7 @@ func save_pxo_file(path : String, autosave : bool, use_zstd_compression := true,
Export.was_exported = false
project.was_exported = false
Global.file_menu.get_popup().set_item_text(3, tr("Save") + " %s" % path.get_file())
Global.save_project_to_recent_list(path)