diff options
Diffstat (limited to 'editor/editor_file_dialog.cpp')
-rw-r--r-- | editor/editor_file_dialog.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index ffdd7c7fa8..8ded47605c 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -212,14 +212,14 @@ void EditorFileDialog::update_dir() { dir->set_text(dir_access->get_current_dir(false)); // Disable "Open" button only when selecting file(s) mode. - get_ok()->set_disabled(_is_open_should_be_disabled()); + get_ok_button()->set_disabled(_is_open_should_be_disabled()); switch (mode) { case FILE_MODE_OPEN_FILE: case FILE_MODE_OPEN_FILES: - get_ok()->set_text(TTR("Open")); + get_ok_button()->set_text(TTR("Open")); break; case FILE_MODE_OPEN_DIR: - get_ok()->set_text(TTR("Select Current Folder")); + get_ok_button()->set_text(TTR("Select Current Folder")); break; case FILE_MODE_OPEN_ANY: case FILE_MODE_SAVE_FILE: @@ -476,10 +476,10 @@ void EditorFileDialog::_item_selected(int p_item) { file->set_text(d["name"]); _request_single_thumbnail(get_current_dir().plus_file(get_current_file())); } else if (mode == FILE_MODE_OPEN_DIR) { - get_ok()->set_text(TTR("Select This Folder")); + get_ok_button()->set_text(TTR("Select This Folder")); } - get_ok()->set_disabled(_is_open_should_be_disabled()); + get_ok_button()->set_disabled(_is_open_should_be_disabled()); } void EditorFileDialog::_multi_selected(int p_item, bool p_selected) { @@ -495,7 +495,7 @@ void EditorFileDialog::_multi_selected(int p_item, bool p_selected) { _request_single_thumbnail(get_current_dir().plus_file(get_current_file())); } - get_ok()->set_disabled(_is_open_should_be_disabled()); + get_ok_button()->set_disabled(_is_open_should_be_disabled()); } void EditorFileDialog::_items_clear_selection() { @@ -505,13 +505,13 @@ void EditorFileDialog::_items_clear_selection() { switch (mode) { case FILE_MODE_OPEN_FILE: case FILE_MODE_OPEN_FILES: - get_ok()->set_text(TTR("Open")); - get_ok()->set_disabled(!item_list->is_anything_selected()); + get_ok_button()->set_text(TTR("Open")); + get_ok_button()->set_disabled(!item_list->is_anything_selected()); break; case FILE_MODE_OPEN_DIR: - get_ok()->set_disabled(false); - get_ok()->set_text(TTR("Select Current Folder")); + get_ok_button()->set_disabled(false); + get_ok_button()->set_text(TTR("Select Current Folder")); break; case FILE_MODE_OPEN_ANY: @@ -855,7 +855,7 @@ void EditorFileDialog::update_file_list() { favorite->set_pressed(false); fav_up->set_disabled(true); fav_down->set_disabled(true); - get_ok()->set_disabled(_is_open_should_be_disabled()); + get_ok_button()->set_disabled(_is_open_should_be_disabled()); for (int i = 0; i < favorites->get_item_count(); i++) { if (favorites->get_item_metadata(i) == cdir || favorites->get_item_metadata(i) == cdir + "/") { favorites->select(i); @@ -978,27 +978,27 @@ void EditorFileDialog::set_file_mode(FileMode p_mode) { mode = p_mode; switch (mode) { case FILE_MODE_OPEN_FILE: - get_ok()->set_text(TTR("Open")); + get_ok_button()->set_text(TTR("Open")); set_title(TTR("Open a File")); can_create_dir = false; break; case FILE_MODE_OPEN_FILES: - get_ok()->set_text(TTR("Open")); + get_ok_button()->set_text(TTR("Open")); set_title(TTR("Open File(s)")); can_create_dir = false; break; case FILE_MODE_OPEN_DIR: - get_ok()->set_text(TTR("Open")); + get_ok_button()->set_text(TTR("Open")); set_title(TTR("Open a Directory")); can_create_dir = true; break; case FILE_MODE_OPEN_ANY: - get_ok()->set_text(TTR("Open")); + get_ok_button()->set_text(TTR("Open")); set_title(TTR("Open a File or Directory")); can_create_dir = true; break; case FILE_MODE_SAVE_FILE: - get_ok()->set_text(TTR("Save")); + get_ok_button()->set_text(TTR("Save")); set_title(TTR("Save a File")); can_create_dir = true; break; |