From 8014c828af652bfcde7b6be5ae38d58a4b8dbbf1 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 15 Mar 2018 20:34:01 -0300 Subject: [PATCH] Add a special dialog for File > Export command With this change we have moved all the file selector customization to a new special FileExportWindow. So the file selector is used only to select the output file (no more FileSelectorDelegate = now we can use the native file selector for File > Export). --- data/strings/en.ini | 19 +- data/widgets/export_file.xml | 42 ++++ data/widgets/file_selector.xml | 7 +- data/widgets/file_selector_extras.xml | 31 --- src/app/CMakeLists.txt | 1 + src/app/commands/cmd_save_file.cpp | 326 +++++++++----------------- src/app/commands/cmd_save_file.h | 27 +-- src/app/file_selector.cpp | 5 +- src/app/file_selector.h | 24 +- src/app/ui/export_file_window.cpp | 96 ++++++++ src/app/ui/export_file_window.h | 43 ++++ src/app/ui/file_selector.cpp | 129 +--------- src/app/ui/file_selector.h | 7 +- 13 files changed, 323 insertions(+), 434 deletions(-) create mode 100644 data/widgets/export_file.xml delete mode 100644 data/widgets/file_selector_extras.xml create mode 100644 src/app/ui/export_file_window.cpp create mode 100644 src/app/ui/export_file_window.h diff --git a/data/strings/en.ini b/data/strings/en.ini index 5d9b4f473..94c472d64 100644 --- a/data/strings/en.ini +++ b/data/strings/en.ini @@ -449,6 +449,16 @@ duplicate = Duplicate: as = As: merged_layers = Duplicate merged layers only +[export_file] +title = Export File +output_file = Output File: +resize = Resize: +layers = Layers: +frames = Frames: +pixel_ratio = Apply pixel ratio +export = &Export +cancel = &Cancel + [export_sprite_sheet] title = Export Sprite Sheet sheet_type = Sheet Type: @@ -483,15 +493,6 @@ go_up_button_tooltip = Up to parent folder new_folder_button_tooltip = New folder file_name = File name: file_type = File type: -resize = Resize: -layeres = Layers: -frames = Frames: - -[file_selector_extras] -resize = Resize: -layers = Layers: -frames = Frames: -pixel_ratio = Apply pixel ratio [font_popup] load = Load diff --git a/data/widgets/export_file.xml b/data/widgets/export_file.xml new file mode 100644 index 000000000..bd51c9924 --- /dev/null +++ b/data/widgets/export_file.xml @@ -0,0 +1,42 @@ + + + + + +