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:
twanvl
2007-08-26 19:39:23 +00:00
parent 52ec7b38c0
commit f7b82e3f6b
17 changed files with 742 additions and 541 deletions
+2 -2
View File
@@ -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
+9 -2
View File
@@ -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