diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-06-06 09:44:38 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-06-06 09:44:38 -0300 |
commit | 9acab32daaea38e09c4d74d5f0340479d3dd41bd (patch) | |
tree | c978e8206cc9319f32c71168fb612fc30b4ec809 /tools/editor/io_plugins | |
parent | 07a466f6e6dd28bbb8b917690b634070537f1613 (diff) |
new file dialog!
-ItemList control for easier lists/thumbnails
-New file dialog, with support for thumbnails, favorites, recent places,
etc
-Moved .fscache out of the project, no more bugs due to committed/pulled
.fscache!
-Dir dialog now sorts directories
Diffstat (limited to 'tools/editor/io_plugins')
6 files changed, 41 insertions, 41 deletions
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp index 375333ddf6..10a3877529 100644 --- a/tools/editor/io_plugins/editor_font_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp @@ -28,7 +28,7 @@ /*************************************************************************/ #include "editor_font_import_plugin.h" #include "scene/gui/dialogs.h" -#include "scene/gui/file_dialog.h" +#include "tools/editor/editor_file_dialog.h" #include "tools/editor/editor_node.h" #include "os/file_access.h" #include "editor_atlas.h" @@ -379,8 +379,8 @@ class EditorFontImportDialog : public ConfirmationDialog { OBJ_TYPE(EditorFontImportDialog, ConfirmationDialog); - LineEditFileChooser *source; - LineEditFileChooser *dest; + EditorLineEditFileChooser *source; + EditorLineEditFileChooser *dest; SpinBox *font_size; LineEdit *test_string; ColorPickerButton *test_color; @@ -612,9 +612,9 @@ public: hbc->add_child(vbr); vbr->set_h_size_flags(SIZE_EXPAND_FILL); - source = memnew( LineEditFileChooser ); - source->get_file_dialog()->set_access(FileDialog::ACCESS_FILESYSTEM); - source->get_file_dialog()->set_mode(FileDialog::MODE_OPEN_FILE); + source = memnew( EditorLineEditFileChooser ); + source->get_file_dialog()->set_access(EditorFileDialog::ACCESS_FILESYSTEM); + source->get_file_dialog()->set_mode(EditorFileDialog::MODE_OPEN_FILE); source->get_file_dialog()->add_filter("*.ttf;TrueType"); source->get_file_dialog()->add_filter("*.otf;OpenType"); source->get_line_edit()->connect("text_entered",this,"_src_changed"); @@ -626,7 +626,7 @@ public: font_size->set_max(256); font_size->set_val(16); font_size->connect("value_changed",this,"_font_size_changed"); - dest = memnew( LineEditFileChooser ); + dest = memnew( EditorLineEditFileChooser ); // List<String> fl; Ref<Font> font= memnew(Font); diff --git a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp index 7d6f400ccc..2e5a6f8a81 100644 --- a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp @@ -1,6 +1,6 @@ #include "editor_mesh_import_plugin.h" -#include "scene/gui/file_dialog.h" +#include "tools/editor/editor_file_dialog.h" #include "tools/editor/editor_dir_dialog.h" #include "tools/editor/editor_node.h" #include "tools/editor/property_editor.h" @@ -126,7 +126,7 @@ class EditorMeshImportDialog : public ConfirmationDialog { LineEdit *import_path; LineEdit *save_path; - FileDialog *file_select; + EditorFileDialog *file_select; EditorDirDialog *save_select; ConfirmationDialog *error_dialog; PropertyEditor *option_editor; @@ -300,16 +300,16 @@ public: save_choose->connect("pressed", this,"_browse_target"); - file_select = memnew(FileDialog); - file_select->set_access(FileDialog::ACCESS_FILESYSTEM); + file_select = memnew(EditorFileDialog); + file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM); add_child(file_select); - file_select->set_mode(FileDialog::MODE_OPEN_FILES); + file_select->set_mode(EditorFileDialog::MODE_OPEN_FILES); file_select->connect("files_selected", this,"_choose_files"); file_select->add_filter("*.obj ; Wavefront OBJ"); save_select = memnew( EditorDirDialog ); add_child(save_select); - // save_select->set_mode(FileDialog::MODE_OPEN_DIR); + // save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this,"_choose_save_dir"); get_ok()->connect("pressed", this,"_import"); diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp index fa472ed033..9491f957c3 100644 --- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp @@ -27,7 +27,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "editor_sample_import_plugin.h" -#include "scene/gui/file_dialog.h" +#include "tools/editor/editor_file_dialog.h" #include "tools/editor/editor_dir_dialog.h" #include "tools/editor/editor_node.h" #include "tools/editor/property_editor.h" @@ -171,7 +171,7 @@ class EditorSampleImportDialog : public ConfirmationDialog { LineEdit *import_path; LineEdit *save_path; - FileDialog *file_select; + EditorFileDialog *file_select; EditorDirDialog *save_select; ConfirmationDialog *error_dialog; PropertyEditor *option_editor; @@ -363,16 +363,16 @@ public: save_choose->connect("pressed", this,"_browse_target"); - file_select = memnew(FileDialog); - file_select->set_access(FileDialog::ACCESS_FILESYSTEM); + file_select = memnew(EditorFileDialog); + file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM); add_child(file_select); - file_select->set_mode(FileDialog::MODE_OPEN_FILES); + file_select->set_mode(EditorFileDialog::MODE_OPEN_FILES); file_select->connect("files_selected", this,"_choose_files"); file_select->add_filter("*.wav ; MS Waveform"); save_select = memnew( EditorDirDialog ); add_child(save_select); - // save_select->set_mode(FileDialog::MODE_OPEN_DIR); + // save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this,"_choose_save_dir"); get_ok()->connect("pressed", this,"_import"); diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp index 2ce5f3a5a7..99dcf4ed28 100644 --- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp @@ -162,8 +162,8 @@ class EditorSceneImportDialog : public ConfirmationDialog { LineEdit *save_path; LineEdit *script_path; Tree *import_options; - FileDialog *file_select; - FileDialog *script_select; + EditorFileDialog *file_select; + EditorFileDialog *script_select; EditorDirDialog *save_select; OptionButton *texture_action; @@ -1079,19 +1079,19 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce vbc->set_v_size_flags(SIZE_EXPAND_FILL); vbc->add_margin_child("Options:",import_options,true); - file_select = memnew(FileDialog); - file_select->set_access(FileDialog::ACCESS_FILESYSTEM); + file_select = memnew(EditorFileDialog); + file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM); add_child(file_select); - file_select->set_mode(FileDialog::MODE_OPEN_FILE); + file_select->set_mode(EditorFileDialog::MODE_OPEN_FILE); file_select->connect("file_selected", this,"_choose_file"); save_select = memnew(EditorDirDialog); add_child(save_select); - //save_select->set_mode(FileDialog::MODE_SAVE_FILE); + //save_select->set_mode(EditorFileDialog::MODE_SAVE_FILE); save_select->connect("dir_selected", this,"_choose_save_file"); get_ok()->connect("pressed", this,"_import"); @@ -1140,7 +1140,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce script_choose->connect("pressed", this,"_browse_script"); - script_select = memnew(FileDialog); + script_select = memnew(EditorFileDialog); add_child(script_select); for(int i=0;i<ScriptServer::get_language_count();i++) { @@ -1152,7 +1152,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce } - script_select->set_mode(FileDialog::MODE_OPEN_FILE); + script_select->set_mode(EditorFileDialog::MODE_OPEN_FILE); script_select->connect("file_selected", this,"_choose_script"); diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp index 3add30d81e..7549a4d32d 100644 --- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp @@ -247,8 +247,8 @@ class EditorTextureImportDialog : public ConfirmationDialog { LineEdit *import_path; LineEdit *save_path; - FileDialog *file_select; - FileDialog *save_file_select; + EditorFileDialog *file_select; + EditorFileDialog *save_file_select; EditorDirDialog *save_select; OptionButton *texture_action; ConfirmationDialog *error_dialog; @@ -529,16 +529,16 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin* save_choose->connect("pressed", this,"_browse_target"); - file_select = memnew(FileDialog); - file_select->set_access(FileDialog::ACCESS_FILESYSTEM); + file_select = memnew(EditorFileDialog); + file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM); add_child(file_select); - file_select->set_mode(FileDialog::MODE_OPEN_FILES); + file_select->set_mode(EditorFileDialog::MODE_OPEN_FILES); file_select->connect("files_selected", this,"_choose_files"); - save_file_select = memnew(FileDialog); - save_file_select->set_access(FileDialog::ACCESS_RESOURCES); + save_file_select = memnew(EditorFileDialog); + save_file_select->set_access(EditorFileDialog::ACCESS_RESOURCES); add_child(save_file_select); - save_file_select->set_mode(FileDialog::MODE_SAVE_FILE); + save_file_select->set_mode(EditorFileDialog::MODE_SAVE_FILE); save_file_select->clear_filters(); save_file_select->add_filter("*.tex;Base Atlas Texture"); save_file_select->connect("file_selected", this,"_choose_save_dir"); @@ -546,7 +546,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin* save_select = memnew( EditorDirDialog ); add_child(save_select); -// save_select->set_mode(FileDialog::MODE_OPEN_DIR); +// save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this,"_choose_save_dir"); get_ok()->connect("pressed", this,"_import"); diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.cpp b/tools/editor/io_plugins/editor_translation_import_plugin.cpp index 6d59b52fb5..d152d71af4 100644 --- a/tools/editor/io_plugins/editor_translation_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_translation_import_plugin.cpp @@ -47,7 +47,7 @@ class EditorTranslationImportDialog : public ConfirmationDialog { LineEdit *import_path; LineEdit *save_path; - FileDialog *file_select; + EditorFileDialog *file_select; CheckButton *ignore_first; CheckButton *compress; CheckButton *add_to_project; @@ -347,16 +347,16 @@ public: add_to_project->set_text("Add to Project (engine.cfg)"); tcomp->add_child(add_to_project); - file_select = memnew(FileDialog); - file_select->set_access(FileDialog::ACCESS_FILESYSTEM); + file_select = memnew(EditorFileDialog); + file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM); add_child(file_select); - file_select->set_mode(FileDialog::MODE_OPEN_FILE); + file_select->set_mode(EditorFileDialog::MODE_OPEN_FILE); file_select->connect("file_selected", this,"_choose_file"); file_select->add_filter("*.csv ; Translation CSV"); save_select = memnew( EditorDirDialog ); add_child(save_select); - // save_select->set_mode(FileDialog::MODE_OPEN_DIR); + // save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this,"_choose_save_dir"); get_ok()->connect("pressed", this,"_import"); |