diff --git a/source/app.d b/source/app.d index 1ea9361..6a77b8c 100755 --- a/source/app.d +++ b/source/app.d @@ -2,6 +2,7 @@ import std.stdio; import std.file; import std.string; import std.conv : to; +import std.path; import gtk.Main; @@ -37,7 +38,7 @@ void main(string[] args) //Window window = new MainWindow("2DA-Edit"); - window.getSettings.setLongProperty("gtk-application-prefer-dark-theme", 1, ""); + window.getSettings.setLongProperty("gtk-application-prefer-dark-theme", 0, ""); // auto accel = new AccelGroup(); @@ -126,6 +127,9 @@ void main(string[] args) import gtk.FileChooserDialog; auto fc = new FileChooserDialog("Save 2DA as", window, FileChooserAction.SAVE); + fc.setDoOverwriteConfirmation(true); + fc.setCreateFolders(true); + fc.setCurrentFolder(openedFile!=""? dirName(openedFile) : getcwd()); auto res = fc.run(); if(res==GtkResponseType.OK){ string filename = fc.getFilename(); @@ -139,6 +143,8 @@ void main(string[] args) import gtk.FileChooserDialog; auto fc = new FileChooserDialog("Open 2DA", window, FileChooserAction.OPEN); + fc.setSelectMultiple(false); + fc.setCurrentFolder(openedFile!=""? dirName(openedFile) : getcwd()); auto res = fc.run(); if(res==GtkResponseType.OK){ string filename = fc.getFilename();