From b01f7a7002219ed17a2dbff9662be1388d2fae68 Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Sat, 4 Aug 2012 10:15:32 +0800 Subject: [PATCH] Bug #1889588 Symbols default to ASCII --- src/xmlcopyeditor.cpp | 11 +++++++++-- src/xmlcopyeditor.h | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/xmlcopyeditor.cpp b/src/xmlcopyeditor.cpp index fbbad4c..75b83d0 100755 --- a/src/xmlcopyeditor.cpp +++ b/src/xmlcopyeditor.cpp @@ -705,6 +705,7 @@ MyFrame::MyFrame ( showInsertEntityPane = config->Read ( _T ( "showInsertEntityPane" ), true ); expandInternalEntities = config->Read ( _T ( "expandInternalEntities" ), true ); + lastSymbol = config->Read( _T( "lastSymbol" ), _T ( "*" ) ); } else // config not found { @@ -755,6 +756,8 @@ MyFrame::MyFrame ( exportQuiet = exportMp3Album = false; exportQuiet = exportMp3Album = exportSuppressOptional = exportHtml = exportEpub = exportRtf = exportDoc = exportFullDaisy = true; + + lastSymbol = _T( "*" ); } largeFileProperties.completion = false; @@ -1046,6 +1049,9 @@ MyFrame::~MyFrame() config->Write ( _T ( "notebookStyle" ), notebookStyle ); config->Write ( _T ( "saveBom" ), saveBom ); config->Write ( _T ( "unlimitedUndo" ), unlimitedUndo ); + + config->Write ( _T ( "lastSymbol" ), lastSymbol ); + manager.UnInit(); wxTheClipboard->Flush(); } @@ -1787,13 +1793,14 @@ void MyFrame::OnInsertSymbol ( wxCommandEvent& event ) XmlDoc *doc; if ( ( doc = getActiveDocument() ) == NULL ) return; - wxSymbolPickerDialog dlg ( _T ( "*" ), wxEmptyString, properties.font, this ); + wxSymbolPickerDialog dlg ( lastSymbol, wxEmptyString, properties.font, this ); if ( dlg.ShowModal() == wxID_OK ) { if ( dlg.HasSelection() ) { - doc->AddText ( dlg.GetSymbol() ); + lastSymbol = dlg.GetSymbol(); + doc->AddText ( lastSymbol ); } } } diff --git a/src/xmlcopyeditor.h b/src/xmlcopyeditor.h index 935ad5c..b042160 100755 --- a/src/xmlcopyeditor.h +++ b/src/xmlcopyeditor.h @@ -416,8 +416,9 @@ class MyFrame : public wxFrame lastParent, lastGrandparent, commandString, - exportStylesheet, - exportFolder; + exportStylesheet, + exportFolder, + lastSymbol; bool globalReplaceAllDocuments, toolbarVisible, protectTags,