From 89feff781144c2d1c439286745744396d6020958 Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Fri, 10 Aug 2012 23:50:49 +0800 Subject: [PATCH] Corrected style file paths --- ... dictionary.xml => Default_dictionary.xml} | 0 ...e.xml => Default_dictionary_and_style.xml} | 0 .../{Default style.xml => Default_style.xml} | 0 .../{Ize and yse.xml => Ize_and_yse.xml} | 0 .../{White space.xml => White_space.xml} | 0 src/styledialog.cpp | 30 ++++++++----------- 6 files changed, 12 insertions(+), 18 deletions(-) rename src/rulesets/{Default dictionary.xml => Default_dictionary.xml} (100%) rename src/rulesets/{Default dictionary and style.xml => Default_dictionary_and_style.xml} (100%) rename src/rulesets/{Default style.xml => Default_style.xml} (100%) rename src/rulesets/{Ize and yse.xml => Ize_and_yse.xml} (100%) rename src/rulesets/{White space.xml => White_space.xml} (100%) diff --git a/src/rulesets/Default dictionary.xml b/src/rulesets/Default_dictionary.xml similarity index 100% rename from src/rulesets/Default dictionary.xml rename to src/rulesets/Default_dictionary.xml diff --git a/src/rulesets/Default dictionary and style.xml b/src/rulesets/Default_dictionary_and_style.xml similarity index 100% rename from src/rulesets/Default dictionary and style.xml rename to src/rulesets/Default_dictionary_and_style.xml diff --git a/src/rulesets/Default style.xml b/src/rulesets/Default_style.xml similarity index 100% rename from src/rulesets/Default style.xml rename to src/rulesets/Default_style.xml diff --git a/src/rulesets/Ize and yse.xml b/src/rulesets/Ize_and_yse.xml similarity index 100% rename from src/rulesets/Ize and yse.xml rename to src/rulesets/Ize_and_yse.xml diff --git a/src/rulesets/White space.xml b/src/rulesets/White_space.xml similarity index 100% rename from src/rulesets/White space.xml rename to src/rulesets/White_space.xml diff --git a/src/styledialog.cpp b/src/styledialog.cpp index d505db5..0e75de5 100755 --- a/src/styledialog.cpp +++ b/src/styledialog.cpp @@ -108,16 +108,16 @@ StyleDialog::StyleDialog ( size, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX ), bufferUtf8 ( bufferParameterUtf8 ), +#if !defined(USE_ENCHANT) && defined(__WXMSW__) + aspellDataPath ( aspellDataPathParameter ), + aspellDictPath ( aspellDictPathParameter ), +#endif fileName ( fileNameParameter ), ruleSetDirectory ( ruleSetDirectoryParameter ), filterDirectory ( filterDirectoryParameter ), browser ( browserParameter ), ruleSetPreset ( ruleSetPresetParameter ), filterPreset ( filterPresetParameter ), -#if !defined(USE_ENCHANT) && defined(__WXMSW__) - aspellDataPath ( aspellDataPathParameter ), - aspellDictPath ( aspellDictPathParameter ), -#endif type(typeParameter), readOnly ( readOnlyParameter ) { @@ -459,27 +459,21 @@ void StyleDialog::OnReport ( wxCommandEvent& event ) ruleSet.Replace ( _(" "), _T("_") ); filter = filterPreset + _T ( ".xml" ); - std::string ruleSetDirectoryUtf8, - ruleSetUtf8, - filterDirectoryUtf8, - filterUtf8, - pathSeparatorUtf8; - ruleSetDirectoryUtf8 = ruleSetDirectory.mb_str ( wxConvUTF8 ); - ruleSetUtf8 = ruleSet.mb_str ( wxConvUTF8 ); - filterDirectoryUtf8 = filterDirectory.mb_str ( wxConvUTF8 ); - filterUtf8 = filter.mb_str ( wxConvUTF8 ); - + std::string ruleSetDirectoryLocal ( ruleSetDirectory.mb_str ( wxConvLocal ) ); + std::string ruleSetUtf8 ( ruleSet.mb_str ( wxConvUTF8 ) ); + std::string filterDirectoryLocal ( filterDirectory.mb_str ( wxConvLocal ) ); + std::string filterUtf8 ( filter.mb_str ( wxConvUTF8 ) ); wxString separator = wxFileName::GetPathSeparator(); - pathSeparatorUtf8 = separator.mb_str ( wxConvUTF8 ); + std::string pathSeparatorLocal ( separator.mb_str ( wxConvLocal ) ); std::auto_ptr hs ( new HouseStyle ( (type == ID_TYPE_SPELL) ? HS_TYPE_SPELL : HS_TYPE_STYLE, bufferUtf8, - ruleSetDirectoryUtf8, + ruleSetDirectoryLocal, ruleSetUtf8, - filterDirectoryUtf8, + filterDirectoryLocal, filterUtf8, - pathSeparatorUtf8, + pathSeparatorLocal, #ifdef __WXMSW__ aspellDataPath, aspellDictPath,