mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Remember separate most recent directories for:
- set files - symbol files - importing images - exporting git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1257 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -61,10 +61,11 @@ void export_mws(Window* parent, const SetP& set) {
|
||||
}
|
||||
|
||||
// Select filename
|
||||
String name = wxFileSelector(_("Export to file"),_(""),_(""),_(""),
|
||||
String name = wxFileSelector(_("Export to file"),settings.default_export_dir,_(""),_(""),
|
||||
_("Text files (*.txt)|*.txt|All Files|*"),
|
||||
wxSAVE | wxOVERWRITE_PROMPT, parent);
|
||||
if (name.empty()) return;
|
||||
settings.default_export_dir = wxPathOnly(name);
|
||||
wxBusyCursor busy;
|
||||
// Open file
|
||||
wxFileOutputStream f(name);
|
||||
|
||||
@@ -233,6 +233,10 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(Settings) {
|
||||
REFLECT_ALIAS(300, "default style settings", "default stylesheet settings");
|
||||
REFLECT(locale);
|
||||
REFLECT(recent_sets);
|
||||
REFLECT(default_set_dir);
|
||||
REFLECT(default_image_dir);
|
||||
REFLECT(default_symbol_dir);
|
||||
REFLECT(default_export_dir);
|
||||
REFLECT(set_window_maximized);
|
||||
REFLECT(set_window_width);
|
||||
REFLECT(set_window_height);
|
||||
|
||||
@@ -132,6 +132,12 @@ class Settings {
|
||||
/// Add a file to the list of recent files
|
||||
void addRecentFile(const String& filename);
|
||||
|
||||
// --------------------------------------------------- : Files/directories
|
||||
String default_set_dir; ///< Where to look for .mse-set files
|
||||
String default_image_dir; ///< Where to look for images to import
|
||||
String default_symbol_dir; ///< Where to look for .mse-symbol files
|
||||
String default_export_dir; ///< Where to export to by default
|
||||
|
||||
// --------------------------------------------------- : Set window
|
||||
bool set_window_maximized;
|
||||
UInt set_window_width;
|
||||
|
||||
Reference in New Issue
Block a user