mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
Implemented auto replace, including GUI
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@631 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -64,8 +64,8 @@ void Writer::handle(const String& value) {
|
||||
// write indentation and key
|
||||
writeKey();
|
||||
writeUTF8(stream, _(": "));
|
||||
if (value.find_first_of(_('\n')) != String::npos) {
|
||||
// multiline string
|
||||
if (value.find_first_of(_('\n')) != String::npos || (!value.empty() && isSpace(value.GetChar(0)))) {
|
||||
// multiline string, or contains leading whitespace
|
||||
stream.PutChar(_('\n'));
|
||||
indentation += 1;
|
||||
// split lines, and write each line
|
||||
|
||||
@@ -53,7 +53,8 @@ enum MenuID {
|
||||
, ID_EDIT_FIND = wxID_FIND
|
||||
, ID_EDIT_FIND_NEXT = 103
|
||||
, ID_EDIT_REPLACE = wxID_REPLACE
|
||||
, ID_EDIT_PREFERENCES = 104
|
||||
, ID_EDIT_AUTO_REPLACE = 104
|
||||
, ID_EDIT_PREFERENCES = 105
|
||||
|
||||
// Window menu (MainWindow)
|
||||
, ID_WINDOW_NEW = 201
|
||||
@@ -242,7 +243,13 @@ enum ControlID {
|
||||
, ID_INSTALL
|
||||
, ID_UPGRADE
|
||||
, ID_REMOVE
|
||||
, ID_CANCEL
|
||||
, ID_CANCEL = wxID_CANCEL
|
||||
// Auto replace window
|
||||
, ID_USE_AUTO_REPLACE
|
||||
, ID_ITEM_VALUE
|
||||
, ID_ADD_ITEM
|
||||
, ID_REMOVE_ITEM
|
||||
, ID_DEFAULTS
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
|
||||
Reference in New Issue
Block a user