Bug #1889588 Symbols default to ASCII

This commit is contained in:
Zane U. Ji 2012-08-04 10:15:32 +08:00
parent 4081c8b9de
commit b01f7a7002
2 changed files with 12 additions and 4 deletions

View File

@ -705,6 +705,7 @@ MyFrame::MyFrame (
showInsertEntityPane = config->Read ( _T ( "showInsertEntityPane" ), true ); showInsertEntityPane = config->Read ( _T ( "showInsertEntityPane" ), true );
expandInternalEntities = config->Read ( _T ( "expandInternalEntities" ), true ); expandInternalEntities = config->Read ( _T ( "expandInternalEntities" ), true );
lastSymbol = config->Read( _T( "lastSymbol" ), _T ( "*" ) );
} }
else // config not found else // config not found
{ {
@ -755,6 +756,8 @@ MyFrame::MyFrame (
exportQuiet = exportMp3Album = false; exportQuiet = exportMp3Album = false;
exportQuiet = exportMp3Album = exportSuppressOptional = exportHtml = exportQuiet = exportMp3Album = exportSuppressOptional = exportHtml =
exportEpub = exportRtf = exportDoc = exportFullDaisy = true; exportEpub = exportRtf = exportDoc = exportFullDaisy = true;
lastSymbol = _T( "*" );
} }
largeFileProperties.completion = false; largeFileProperties.completion = false;
@ -1046,6 +1049,9 @@ MyFrame::~MyFrame()
config->Write ( _T ( "notebookStyle" ), notebookStyle ); config->Write ( _T ( "notebookStyle" ), notebookStyle );
config->Write ( _T ( "saveBom" ), saveBom ); config->Write ( _T ( "saveBom" ), saveBom );
config->Write ( _T ( "unlimitedUndo" ), unlimitedUndo ); config->Write ( _T ( "unlimitedUndo" ), unlimitedUndo );
config->Write ( _T ( "lastSymbol" ), lastSymbol );
manager.UnInit(); manager.UnInit();
wxTheClipboard->Flush(); wxTheClipboard->Flush();
} }
@ -1787,13 +1793,14 @@ void MyFrame::OnInsertSymbol ( wxCommandEvent& event )
XmlDoc *doc; XmlDoc *doc;
if ( ( doc = getActiveDocument() ) == NULL ) if ( ( doc = getActiveDocument() ) == NULL )
return; return;
wxSymbolPickerDialog dlg ( _T ( "*" ), wxEmptyString, properties.font, this );
wxSymbolPickerDialog dlg ( lastSymbol, wxEmptyString, properties.font, this );
if ( dlg.ShowModal() == wxID_OK ) if ( dlg.ShowModal() == wxID_OK )
{ {
if ( dlg.HasSelection() ) if ( dlg.HasSelection() )
{ {
doc->AddText ( dlg.GetSymbol() ); lastSymbol = dlg.GetSymbol();
doc->AddText ( lastSymbol );
} }
} }
} }

View File

@ -416,8 +416,9 @@ class MyFrame : public wxFrame
lastParent, lastParent,
lastGrandparent, lastGrandparent,
commandString, commandString,
exportStylesheet, exportStylesheet,
exportFolder; exportFolder,
lastSymbol;
bool globalReplaceAllDocuments, bool globalReplaceAllDocuments,
toolbarVisible, toolbarVisible,
protectTags, protectTags,