Cleaning & better dialogs
This commit is contained in:
parent
9926b68c26
commit
f899a72a85
@ -115,7 +115,6 @@ class Window : MainWindow{
|
||||
save(tree);
|
||||
});
|
||||
buttonSaveAs.addOnClicked((Button){
|
||||
import gtk.Dialog;
|
||||
import gtk.FileChooserDialog;
|
||||
|
||||
auto fc = new FileChooserDialog("Save 2DA as", window, FileChooserAction.SAVE);
|
||||
@ -131,18 +130,17 @@ class Window : MainWindow{
|
||||
});
|
||||
|
||||
buttonOpen.addOnClicked((Button){
|
||||
import gtk.Dialog;
|
||||
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();
|
||||
open(filename, tree);
|
||||
}
|
||||
fc.destroy();
|
||||
if(res==GtkResponseType.OK)
|
||||
open(filename, tree);
|
||||
|
||||
});
|
||||
|
||||
buttonInsert.addOnClicked((Button){
|
||||
|
Loading…
Reference in New Issue
Block a user