Fixed assertion failures in debug version
This commit is contained in:
parent
fa5e760c82
commit
7dbc742e57
|
@ -4900,59 +4900,59 @@ wxMenuBar *MyFrame::getMenuBar()
|
||||||
wxMenu *editMenu = new wxMenu;
|
wxMenu *editMenu = new wxMenu;
|
||||||
|
|
||||||
wxMenuItem *undoItem =
|
wxMenuItem *undoItem =
|
||||||
new wxMenuItem ( NULL, wxID_UNDO, _ ( "&Undo\tCtrl+Z" ), _ ( "Undo" ) );
|
new wxMenuItem ( editMenu, wxID_UNDO, _ ( "&Undo\tCtrl+Z" ), _ ( "Undo" ) );
|
||||||
undoItem->SetBitmap ( undo16Bitmap );
|
undoItem->SetBitmap ( undo16Bitmap );
|
||||||
|
|
||||||
wxMenuItem *redoItem =
|
wxMenuItem *redoItem =
|
||||||
new wxMenuItem ( NULL, wxID_REDO, _ ( "&Redo\tCtrl+Y" ), _ ( "Redo" ) );
|
new wxMenuItem ( editMenu, wxID_REDO, _ ( "&Redo\tCtrl+Y" ), _ ( "Redo" ) );
|
||||||
redoItem->SetBitmap ( redo16Bitmap );
|
redoItem->SetBitmap ( redo16Bitmap );
|
||||||
|
|
||||||
wxMenuItem *cutItem =
|
wxMenuItem *cutItem =
|
||||||
new wxMenuItem ( NULL, wxID_CUT, _ ( "&Cut\tCtrl+X" ), _ ( "Cut" ) );
|
new wxMenuItem ( editMenu, wxID_CUT, _ ( "&Cut\tCtrl+X" ), _ ( "Cut" ) );
|
||||||
cutItem->SetBitmap ( cutBitmap );
|
cutItem->SetBitmap ( cutBitmap );
|
||||||
|
|
||||||
wxMenuItem *copyItem =
|
wxMenuItem *copyItem =
|
||||||
new wxMenuItem ( NULL, wxID_COPY, _ ( "C&opy\tCtrl+C" ), _ ( "Copy" ) );
|
new wxMenuItem ( editMenu, wxID_COPY, _ ( "C&opy\tCtrl+C" ), _ ( "Copy" ) );
|
||||||
copyItem->SetBitmap ( copyBitmap );
|
copyItem->SetBitmap ( copyBitmap );
|
||||||
|
|
||||||
wxMenuItem *pasteItem =
|
wxMenuItem *pasteItem =
|
||||||
new wxMenuItem ( NULL, wxID_PASTE, _ ( "&Paste\tCtrl+V" ), _ ( "Paste" ) );
|
new wxMenuItem ( editMenu, wxID_PASTE, _ ( "&Paste\tCtrl+V" ), _ ( "Paste" ) );
|
||||||
pasteItem->SetBitmap ( pasteBitmap );
|
pasteItem->SetBitmap ( pasteBitmap );
|
||||||
|
|
||||||
wxMenuItem *pasteNewDocumentItem =
|
wxMenuItem *pasteNewDocumentItem =
|
||||||
new wxMenuItem (
|
new wxMenuItem (
|
||||||
NULL,
|
editMenu,
|
||||||
ID_PASTE_NEW_DOCUMENT,
|
ID_PASTE_NEW_DOCUMENT,
|
||||||
_ ( "P&aste As New Document" ),
|
_ ( "P&aste As New Document" ),
|
||||||
_ ( "Paste As New Document" ) );
|
_ ( "Paste As New Document" ) );
|
||||||
pasteNewDocumentItem->SetBitmap ( wxNullBitmap );
|
pasteNewDocumentItem->SetBitmap ( wxNullBitmap );
|
||||||
|
|
||||||
wxMenuItem *findItem =
|
wxMenuItem *findItem =
|
||||||
new wxMenuItem ( NULL, ID_FIND, _ ( "&Find...\tCtrl+F" ), _ ( "Find..." ) );
|
new wxMenuItem ( editMenu, ID_FIND, _ ( "&Find...\tCtrl+F" ), _ ( "Find..." ) );
|
||||||
findItem->SetBitmap ( searchBitmap );
|
findItem->SetBitmap ( searchBitmap );
|
||||||
|
|
||||||
wxMenuItem *findAgainItem =
|
wxMenuItem *findAgainItem =
|
||||||
new wxMenuItem ( NULL, ID_FIND_AGAIN, _ ( "F&ind Again\tF3" ), _ ( "Find Again" ) );
|
new wxMenuItem ( editMenu, ID_FIND_AGAIN, _ ( "F&ind Again\tF3" ), _ ( "Find Again" ) );
|
||||||
findAgainItem->SetBitmap ( wxNullBitmap );
|
findAgainItem->SetBitmap ( wxNullBitmap );
|
||||||
|
|
||||||
wxMenuItem *replaceItem =
|
wxMenuItem *replaceItem =
|
||||||
new wxMenuItem ( NULL, ID_REPLACE, _ ( "&Replace...\tCtrl+R" ), _ ( "Replace..." ) );
|
new wxMenuItem ( editMenu, ID_REPLACE, _ ( "&Replace...\tCtrl+R" ), _ ( "Replace..." ) );
|
||||||
replaceItem->SetBitmap ( wxNullBitmap );
|
replaceItem->SetBitmap ( wxNullBitmap );
|
||||||
|
|
||||||
wxMenuItem *globalReplaceItem =
|
wxMenuItem *globalReplaceItem =
|
||||||
new wxMenuItem (
|
new wxMenuItem (
|
||||||
NULL,
|
editMenu,
|
||||||
ID_GLOBAL_REPLACE,
|
ID_GLOBAL_REPLACE,
|
||||||
_ ( "&Global Replace...\tCtrl+Shift+R" ),
|
_ ( "&Global Replace...\tCtrl+Shift+R" ),
|
||||||
_ ( "Global Replace..." ) );
|
_ ( "Global Replace..." ) );
|
||||||
globalReplaceItem->SetBitmap ( wxNullBitmap );
|
globalReplaceItem->SetBitmap ( wxNullBitmap );
|
||||||
|
|
||||||
wxMenuItem *gotoItem =
|
wxMenuItem *gotoItem =
|
||||||
new wxMenuItem ( NULL, ID_GOTO, _ ( "G&o To...\tCtrl+G" ), _ ( "Go To..." ) );
|
new wxMenuItem ( editMenu, ID_GOTO, _ ( "G&o To...\tCtrl+G" ), _ ( "Go To..." ) );
|
||||||
gotoItem->SetBitmap ( wxNullBitmap );
|
gotoItem->SetBitmap ( wxNullBitmap );
|
||||||
|
|
||||||
wxMenuItem *commentItem =
|
wxMenuItem *commentItem =
|
||||||
new wxMenuItem ( NULL, ID_TOGGLE_COMMENT, _ ( "&Toggle Comment\tCtrl+/" ), _ ( "Toggle Comment" ) );
|
new wxMenuItem ( editMenu, ID_TOGGLE_COMMENT, _ ( "&Toggle Comment\tCtrl+/" ), _ ( "Toggle Comment" ) );
|
||||||
commentItem->SetBitmap ( wxNullBitmap );
|
commentItem->SetBitmap ( wxNullBitmap );
|
||||||
|
|
||||||
editMenu->Append ( undoItem );
|
editMenu->Append ( undoItem );
|
||||||
|
@ -4973,7 +4973,7 @@ wxMenuBar *MyFrame::getMenuBar()
|
||||||
|
|
||||||
#ifndef __WXMSW__
|
#ifndef __WXMSW__
|
||||||
wxMenuItem *preferencesItem =
|
wxMenuItem *preferencesItem =
|
||||||
new wxMenuItem ( NULL, ID_OPTIONS, _ ( "Pr&eferences..." ), _ ( "Preferences..." ) );
|
new wxMenuItem ( editMenu, ID_OPTIONS, _ ( "Pr&eferences..." ), _ ( "Preferences..." ) );
|
||||||
editMenu->AppendSeparator();
|
editMenu->AppendSeparator();
|
||||||
editMenu->Append ( preferencesItem );
|
editMenu->Append ( preferencesItem );
|
||||||
#endif
|
#endif
|
||||||
|
@ -5226,7 +5226,7 @@ wxMenuBar *MyFrame::getMenuBar()
|
||||||
|
|
||||||
wxMenuItem *spellingItem =
|
wxMenuItem *spellingItem =
|
||||||
new wxMenuItem (
|
new wxMenuItem (
|
||||||
NULL,
|
toolsMenu,
|
||||||
ID_SPELL,
|
ID_SPELL,
|
||||||
_ ( "&Spelling...\tF7" ),
|
_ ( "&Spelling...\tF7" ),
|
||||||
_ ( "Spelling..." ) );
|
_ ( "Spelling..." ) );
|
||||||
|
@ -5234,7 +5234,7 @@ wxMenuBar *MyFrame::getMenuBar()
|
||||||
|
|
||||||
wxMenuItem *styleItem =
|
wxMenuItem *styleItem =
|
||||||
new wxMenuItem (
|
new wxMenuItem (
|
||||||
NULL,
|
toolsMenu,
|
||||||
ID_STYLE,
|
ID_STYLE,
|
||||||
_ ( "&Style...\tShift+F7" ),
|
_ ( "&Style...\tShift+F7" ),
|
||||||
_ ( "Style..." ) );
|
_ ( "Style..." ) );
|
||||||
|
@ -5242,7 +5242,7 @@ wxMenuBar *MyFrame::getMenuBar()
|
||||||
|
|
||||||
wxMenuItem *wordCountItem =
|
wxMenuItem *wordCountItem =
|
||||||
new wxMenuItem (
|
new wxMenuItem (
|
||||||
NULL,
|
toolsMenu,
|
||||||
ID_WORD_COUNT,
|
ID_WORD_COUNT,
|
||||||
_ ( "&Word Count" ),
|
_ ( "&Word Count" ),
|
||||||
_ ( "Word Count" ) );
|
_ ( "Word Count" ) );
|
||||||
|
@ -5251,7 +5251,7 @@ wxMenuBar *MyFrame::getMenuBar()
|
||||||
|
|
||||||
wxMenuItem *commandItem =
|
wxMenuItem *commandItem =
|
||||||
new wxMenuItem (
|
new wxMenuItem (
|
||||||
NULL,
|
toolsMenu,
|
||||||
ID_COMMAND,
|
ID_COMMAND,
|
||||||
_ ( "&Command\tCtrl+Alt+C" ),
|
_ ( "&Command\tCtrl+Alt+C" ),
|
||||||
_ ( "Command" ) );
|
_ ( "Command" ) );
|
||||||
|
@ -5267,7 +5267,7 @@ wxMenuBar *MyFrame::getMenuBar()
|
||||||
toolsMenu->AppendSeparator();
|
toolsMenu->AppendSeparator();
|
||||||
wxMenuItem *optionsItem =
|
wxMenuItem *optionsItem =
|
||||||
new wxMenuItem (
|
new wxMenuItem (
|
||||||
NULL,
|
toolsMenu,
|
||||||
ID_OPTIONS,
|
ID_OPTIONS,
|
||||||
_ ( "&Options..." ),
|
_ ( "&Options..." ),
|
||||||
_ ( "Options..." ) );
|
_ ( "Options..." ) );
|
||||||
|
@ -5279,24 +5279,24 @@ wxMenuBar *MyFrame::getMenuBar()
|
||||||
wxMenu *helpMenu = new wxMenu;
|
wxMenu *helpMenu = new wxMenu;
|
||||||
|
|
||||||
wxMenuItem *helpItem =
|
wxMenuItem *helpItem =
|
||||||
new wxMenuItem ( NULL, wxID_HELP,
|
new wxMenuItem ( helpMenu, wxID_HELP,
|
||||||
_ ( "&XML Copy Editor Help\tF1" ), _ ( "Help" ) );
|
_ ( "&XML Copy Editor Help\tF1" ), _ ( "Help" ) );
|
||||||
helpItem->SetBitmap ( helpBitmap );
|
helpItem->SetBitmap ( helpBitmap );
|
||||||
|
|
||||||
|
|
||||||
wxMenuItem *homeItem =
|
wxMenuItem *homeItem =
|
||||||
new wxMenuItem ( NULL, ID_HOME,
|
new wxMenuItem ( helpMenu, ID_HOME,
|
||||||
_ ( "&Home Page" ), _ ( "Home Page" ) );
|
_ ( "&Home Page" ), _ ( "Home Page" ) );
|
||||||
homeItem->SetBitmap ( wxNullBitmap );
|
homeItem->SetBitmap ( wxNullBitmap );
|
||||||
wxMenuItem *feedbackItem =
|
wxMenuItem *feedbackItem =
|
||||||
new wxMenuItem ( NULL, ID_FEEDBACK, _ ( "&Forum" ), _ ( "Forum" ) );
|
new wxMenuItem ( helpMenu, ID_FEEDBACK, _ ( "&Forum" ), _ ( "Forum" ) );
|
||||||
feedbackItem->SetBitmap ( wxNullBitmap );
|
feedbackItem->SetBitmap ( wxNullBitmap );
|
||||||
wxMenuItem *aboutItem =
|
wxMenuItem *aboutItem =
|
||||||
new wxMenuItem ( NULL, wxID_ABOUT,
|
new wxMenuItem ( helpMenu, wxID_ABOUT,
|
||||||
_ ( "&About XML Copy Editor" ), _ ( "About" ) );
|
_ ( "&About XML Copy Editor" ), _ ( "About" ) );
|
||||||
aboutItem->SetBitmap ( wxNullBitmap );
|
aboutItem->SetBitmap ( wxNullBitmap );
|
||||||
wxMenuItem *downloadSourceItem =
|
wxMenuItem *downloadSourceItem =
|
||||||
new wxMenuItem ( NULL, ID_DOWNLOAD_SOURCE,
|
new wxMenuItem ( helpMenu, ID_DOWNLOAD_SOURCE,
|
||||||
_ ( "&Browse Source" ), _ ( "Browse Source" ) );
|
_ ( "&Browse Source" ), _ ( "Browse Source" ) );
|
||||||
downloadSourceItem->SetBitmap ( wxNullBitmap );
|
downloadSourceItem->SetBitmap ( wxNullBitmap );
|
||||||
helpMenu->Append ( helpItem );
|
helpMenu->Append ( helpItem );
|
||||||
|
@ -5330,59 +5330,59 @@ void MyFrame::updateFileMenu ( bool deleteExisting )
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMenuItem *newItem =
|
wxMenuItem *newItem =
|
||||||
new wxMenuItem ( NULL, wxID_NEW, _ ( "&New...\tCtrl+N" ), _ ( "New..." ) );
|
new wxMenuItem ( fileMenu, wxID_NEW, _ ( "&New...\tCtrl+N" ), _ ( "New..." ) );
|
||||||
newItem->SetBitmap ( new16Bitmap );
|
newItem->SetBitmap ( new16Bitmap );
|
||||||
wxMenuItem *openItem =
|
wxMenuItem *openItem =
|
||||||
new wxMenuItem ( NULL, wxID_OPEN, _ ( "&Open...\tCtrl+O" ), _ ( "Open..." ) );
|
new wxMenuItem ( fileMenu, wxID_OPEN, _ ( "&Open...\tCtrl+O" ), _ ( "Open..." ) );
|
||||||
openItem->SetBitmap ( open16Bitmap );
|
openItem->SetBitmap ( open16Bitmap );
|
||||||
wxMenuItem *openLargeFileItem =
|
wxMenuItem *openLargeFileItem =
|
||||||
new wxMenuItem ( NULL, ID_OPEN_LARGE_FILE,
|
new wxMenuItem ( fileMenu, ID_OPEN_LARGE_FILE,
|
||||||
_ ( "O&pen Large Document...\tCtrl+Shift+O" ), _ ( "Open Large Document..." ) );
|
_ ( "O&pen Large Document...\tCtrl+Shift+O" ), _ ( "Open Large Document..." ) );
|
||||||
openLargeFileItem->SetBitmap ( wxNullBitmap );
|
openLargeFileItem->SetBitmap ( wxNullBitmap );
|
||||||
|
|
||||||
wxMenuItem *closeItem =
|
wxMenuItem *closeItem =
|
||||||
new wxMenuItem ( NULL, wxID_CLOSE, _ ( "&Close\tCtrl+F4" ), _ ( "Close" ) );
|
new wxMenuItem ( fileMenu, wxID_CLOSE, _ ( "&Close\tCtrl+F4" ), _ ( "Close" ) );
|
||||||
closeItem->SetBitmap ( wxNullBitmap );
|
closeItem->SetBitmap ( wxNullBitmap );
|
||||||
wxMenuItem *closeAllItem =
|
wxMenuItem *closeAllItem =
|
||||||
new wxMenuItem ( NULL, wxID_CLOSE_ALL, _ ( "C&lose All" ), _ ( "Close All" ) );
|
new wxMenuItem ( fileMenu, wxID_CLOSE_ALL, _ ( "C&lose All" ), _ ( "Close All" ) );
|
||||||
closeAllItem->SetBitmap ( wxNullBitmap );
|
closeAllItem->SetBitmap ( wxNullBitmap );
|
||||||
wxMenuItem *saveItem =
|
wxMenuItem *saveItem =
|
||||||
new wxMenuItem ( NULL, wxID_SAVE, _ ( "&Save\tCtrl+S" ), _ ( "Save" ) );
|
new wxMenuItem ( fileMenu, wxID_SAVE, _ ( "&Save\tCtrl+S" ), _ ( "Save" ) );
|
||||||
saveItem->SetBitmap ( save16Bitmap );
|
saveItem->SetBitmap ( save16Bitmap );
|
||||||
wxMenuItem *saveAsItem =
|
wxMenuItem *saveAsItem =
|
||||||
new wxMenuItem ( NULL, wxID_SAVEAS, _ ( "S&ave As...\tF12" ), _ ( "Save As..." ) );
|
new wxMenuItem ( fileMenu, wxID_SAVEAS, _ ( "S&ave As...\tF12" ), _ ( "Save As..." ) );
|
||||||
saveAsItem->SetBitmap ( wxNullBitmap );
|
saveAsItem->SetBitmap ( wxNullBitmap );
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
wxMenuItem *exportItem =
|
wxMenuItem *exportItem =
|
||||||
new wxMenuItem ( NULL, ID_EXPORT, _ ( "&DAISY Export..." ), _ ( "DAISY Export..." ) );
|
new wxMenuItem ( fileMenu, ID_EXPORT, _ ( "&DAISY Export..." ), _ ( "DAISY Export..." ) );
|
||||||
exportItem->SetBitmap ( wxNullBitmap );
|
exportItem->SetBitmap ( wxNullBitmap );
|
||||||
#endif
|
#endif
|
||||||
wxMenuItem *reloadItem =
|
wxMenuItem *reloadItem =
|
||||||
new wxMenuItem ( NULL, ID_RELOAD, _ ( "&Reload" ), _ ( "Reload" ) );
|
new wxMenuItem ( fileMenu, ID_RELOAD, _ ( "&Reload" ), _ ( "Reload" ) );
|
||||||
reloadItem->SetBitmap ( wxNullBitmap );
|
reloadItem->SetBitmap ( wxNullBitmap );
|
||||||
wxMenuItem *revertItem =
|
wxMenuItem *revertItem =
|
||||||
new wxMenuItem ( NULL, wxID_REVERT, _ ( "&Revert" ), _ ( "Revert" ) );
|
new wxMenuItem ( fileMenu, wxID_REVERT, _ ( "&Revert" ), _ ( "Revert" ) );
|
||||||
revertItem->SetBitmap ( wxNullBitmap );
|
revertItem->SetBitmap ( wxNullBitmap );
|
||||||
wxMenuItem *printSetupItem =
|
wxMenuItem *printSetupItem =
|
||||||
new wxMenuItem ( NULL, ID_PRINT_SETUP, _ ( "Pa&ge Setup..." ), _ ( "Page Setup..." ) );
|
new wxMenuItem ( fileMenu, ID_PRINT_SETUP, _ ( "Pa&ge Setup..." ), _ ( "Page Setup..." ) );
|
||||||
printSetupItem->SetBitmap ( wxNullBitmap );
|
printSetupItem->SetBitmap ( wxNullBitmap );
|
||||||
wxMenuItem *printPreviewItem =
|
wxMenuItem *printPreviewItem =
|
||||||
new wxMenuItem ( NULL, ID_PRINT_PREVIEW, _ ( "Pr&int Preview..." ), _ ( "Print Preview..." ) );
|
new wxMenuItem ( fileMenu, ID_PRINT_PREVIEW, _ ( "Pr&int Preview..." ), _ ( "Print Preview..." ) );
|
||||||
printPreviewItem->SetBitmap ( printPreviewBitmap );
|
printPreviewItem->SetBitmap ( printPreviewBitmap );
|
||||||
wxMenuItem *printItem =
|
wxMenuItem *printItem =
|
||||||
new wxMenuItem ( NULL, ID_PRINT, _ ( "Pri&nt...\tCtrl+P" ), _ ( "Print..." ) );
|
new wxMenuItem ( fileMenu, ID_PRINT, _ ( "Pri&nt...\tCtrl+P" ), _ ( "Print..." ) );
|
||||||
printItem->SetBitmap ( print16Bitmap );
|
printItem->SetBitmap ( print16Bitmap );
|
||||||
wxMenuItem *importMSWordItem =
|
wxMenuItem *importMSWordItem =
|
||||||
new wxMenuItem (
|
new wxMenuItem (
|
||||||
NULL, ID_IMPORT_MSWORD, _ ( "I&mport Microsoft Word Document..." ) );
|
fileMenu, ID_IMPORT_MSWORD, _ ( "I&mport Microsoft Word Document..." ) );
|
||||||
importMSWordItem->SetBitmap ( wxNullBitmap );
|
importMSWordItem->SetBitmap ( wxNullBitmap );
|
||||||
wxMenuItem *exportMSWordItem =
|
wxMenuItem *exportMSWordItem =
|
||||||
new wxMenuItem (
|
new wxMenuItem (
|
||||||
NULL, ID_EXPORT_MSWORD, _ ( "Expor&t Microsoft Word Document..." ) );
|
fileMenu, ID_EXPORT_MSWORD, _ ( "Expor&t Microsoft Word Document..." ) );
|
||||||
exportMSWordItem->SetBitmap ( wxNullBitmap );
|
exportMSWordItem->SetBitmap ( wxNullBitmap );
|
||||||
|
|
||||||
wxMenuItem *exitItem =
|
wxMenuItem *exitItem =
|
||||||
new wxMenuItem ( NULL, wxID_EXIT, _ ( "E&xit" ), _ ( "Exit" ) );
|
new wxMenuItem ( fileMenu, wxID_EXIT, _ ( "E&xit" ), _ ( "Exit" ) );
|
||||||
exitItem->SetBitmap ( wxNullBitmap );
|
exitItem->SetBitmap ( wxNullBitmap );
|
||||||
|
|
||||||
fileMenu->Append ( newItem );
|
fileMenu->Append ( newItem );
|
||||||
|
|
Loading…
Reference in New Issue