mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Updated a few GCC issues, and case-sensitivity of filenames.
I had to rename the export function in Apprentice.cpp since "export" is a reserved word according to the C++ standard. I don't know whether GCC supports it yet, but it certainly complains. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@302 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -127,7 +127,7 @@ FakeTextValue::FakeTextValue(const TextFieldP& field, String* underlying, bool e
|
||||
void FakeTextValue::store() {
|
||||
if (underlying) {
|
||||
if (editable) {
|
||||
*underlying = untagged ? untag(value) : value;
|
||||
*underlying = untagged ? untag(value) : value();
|
||||
} else {
|
||||
retrieve();
|
||||
}
|
||||
|
||||
@@ -608,7 +608,7 @@ class ApprenticeExportWindow : public wxDialog, public WithProgress {
|
||||
void onOk(wxCommandEvent& ev);
|
||||
|
||||
/// Export the set
|
||||
bool export();
|
||||
bool exportSet();
|
||||
};
|
||||
|
||||
|
||||
@@ -689,7 +689,7 @@ void ApprenticeExportWindow::onOk(wxCommandEvent& ev) {
|
||||
progress_target->Show();
|
||||
// export!
|
||||
try {
|
||||
if (!export()) {
|
||||
if (!exportSet()) {
|
||||
// canceled, but allow to try again
|
||||
progress_target->Hide();
|
||||
progress_target->Close();
|
||||
@@ -706,7 +706,7 @@ void ApprenticeExportWindow::onOk(wxCommandEvent& ev) {
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
bool ApprenticeExportWindow::export() {
|
||||
bool ApprenticeExportWindow::exportSet() {
|
||||
// Expan database
|
||||
doStep(_("Exporting expansion"), 0.01f);
|
||||
ApprExpansionDatabase expan(this);
|
||||
|
||||
@@ -84,8 +84,8 @@ void KeywordList::onAction(const Action& action, bool undone) {
|
||||
String match_string(const Keyword& a) {
|
||||
return untag(replace_all(replace_all(
|
||||
a.match,
|
||||
_("<atom-param>"), LEFT_ANGLE_BRACKET),
|
||||
_("</atom-param>"), RIGHT_ANGLE_BRACKET)
|
||||
_("<atom-param>"), _("<")),
|
||||
_("</atom-param>"), _(">"))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,11 @@ NewSetWindow::NewSetWindow(Window* parent)
|
||||
SetSize(630,-1);
|
||||
// init lists
|
||||
game_list->showData<Game>();
|
||||
try {
|
||||
game_list->select(settings.default_game);
|
||||
} catch (FileNotFoundError e) {
|
||||
handle_error(e);
|
||||
}
|
||||
UpdateWindowUI(wxUPDATE_UI_RECURSE);
|
||||
}
|
||||
|
||||
|
||||
@@ -702,7 +702,7 @@ bool TextValueEditor::search(FindInfo& find, bool from_start) {
|
||||
size_t selection_max = index_to_untagged(value().value(), max(selection_start_i, selection_end_i));
|
||||
if (find.forward()) {
|
||||
size_t start = min(v.size(), find.searchSelection() ? selection_min : selection_max);
|
||||
for (size_t i = start ; i + find.findString().size()) <= v.size() ; ++i) {
|
||||
for (size_t i = start ; i + find.findString().size() <= v.size() ; ++i) {
|
||||
if (matchSubstr(v, i, find)) return true;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -174,7 +174,7 @@ struct TextElementsFromString {
|
||||
line > 0 ? BREAK_LINE : BREAK_HARD);
|
||||
}
|
||||
if (bracket) {
|
||||
e->content = String(LEFT_ANGLE_BRACKET) + c + RIGHT_ANGLE_BRACKET;
|
||||
e->content = String(_("<")) + c + _(">");
|
||||
} else {
|
||||
e->content = c;
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ String cycle_sort(const String& spec, const String& input) {
|
||||
* "W1G") -> "1GW" // could be "W...G" or "...GW", second is shorter
|
||||
* "GRBUWWUG") -> "WWUUBRGG" // no difference by rule 1,2, could be "WUBRG", "UBRGW", etc.
|
||||
* // becomes _("WUBRG") by rule 3
|
||||
* "WUR") -> "RWU" // by rule 1 could be "R WU" or "WU R", "RUW" has an earlier hole
|
||||
* "WUR") -> "RWU" // by rule 1 could be "R WU" or "WU R", "RWU" has an earlier hole
|
||||
*/
|
||||
String spec_sort(const String& spec, const String& input) {
|
||||
String ret;
|
||||
@@ -471,7 +471,6 @@ String spec_sort(const String& spec, const String& input) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
// Sort using spec_sort
|
||||
class ScriptRule_sort_order: public ScriptValue {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user