mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Change tabs to two spaces.
This commit is contained in:
+27
-27
@@ -16,34 +16,34 @@
|
||||
/// The file format of MSE2 files
|
||||
class MSE2FileFormat : public FileFormat {
|
||||
public:
|
||||
virtual String extension() { return _("mse-set"); }
|
||||
virtual String matches() { return _("*.mse-set;set"); }
|
||||
virtual String name() { return _("Magic Set Editor sets (*.mse-set)"); }
|
||||
virtual bool canImport() { return true; }
|
||||
virtual bool canExport(const Game&) { return true; }
|
||||
virtual SetP importSet(const String& filename) {
|
||||
wxString set_name = filename;
|
||||
// Strip "/set" from the end, newer wx versions have a function for this:
|
||||
// filename.EndsWith(_("/set"), &set_name);
|
||||
if (filename.size() > 4 && filename.substr(filename.size()-4) == _("/set")) {
|
||||
set_name = filename.substr(0, filename.size()-4);
|
||||
}
|
||||
SetP set(new Set);
|
||||
set->open(set_name);
|
||||
settings.addRecentFile(set_name);
|
||||
return set;
|
||||
}
|
||||
virtual void exportSet(Set& set, const String& filename, bool is_copy) {
|
||||
if (is_copy) {
|
||||
set.saveCopy(filename);
|
||||
} else {
|
||||
set.saveAs(filename);
|
||||
settings.addRecentFile(filename);
|
||||
set.actions.setSavePoint();
|
||||
}
|
||||
}
|
||||
virtual String extension() { return _("mse-set"); }
|
||||
virtual String matches() { return _("*.mse-set;set"); }
|
||||
virtual String name() { return _("Magic Set Editor sets (*.mse-set)"); }
|
||||
virtual bool canImport() { return true; }
|
||||
virtual bool canExport(const Game&) { return true; }
|
||||
virtual SetP importSet(const String& filename) {
|
||||
wxString set_name = filename;
|
||||
// Strip "/set" from the end, newer wx versions have a function for this:
|
||||
// filename.EndsWith(_("/set"), &set_name);
|
||||
if (filename.size() > 4 && filename.substr(filename.size()-4) == _("/set")) {
|
||||
set_name = filename.substr(0, filename.size()-4);
|
||||
}
|
||||
SetP set(new Set);
|
||||
set->open(set_name);
|
||||
settings.addRecentFile(set_name);
|
||||
return set;
|
||||
}
|
||||
virtual void exportSet(Set& set, const String& filename, bool is_copy) {
|
||||
if (is_copy) {
|
||||
set.saveCopy(filename);
|
||||
} else {
|
||||
set.saveAs(filename);
|
||||
settings.addRecentFile(filename);
|
||||
set.actions.setSavePoint();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
FileFormatP mse2_file_format() {
|
||||
return intrusive(new MSE2FileFormat());
|
||||
return intrusive(new MSE2FileFormat());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user