| 25 |
EVT_MENU(XRCID("Quit"), mnFrameController::handleExit) |
EVT_MENU(XRCID("Quit"), mnFrameController::handleExit) |
| 26 |
EVT_MENU(wxID_ABOUT, mnFrameController::handleAbout) |
EVT_MENU(wxID_ABOUT, mnFrameController::handleAbout) |
| 27 |
EVT_CLOSE(mnFrameController::handleClose) |
EVT_CLOSE(mnFrameController::handleClose) |
| 28 |
|
EVT_NOTEBOOK_PAGE_CHANGED(XRCID("noteBook"), mnFrameController::handlePageChange) |
| 29 |
END_EVENT_TABLE() |
END_EVENT_TABLE() |
| 30 |
|
|
| 31 |
mnFrameController::mnFrameController(mnFrame* inframe) |
mnFrameController::mnFrameController(mnFrame* inframe) |
| 138 |
|
|
| 139 |
wxConfig* config = new wxConfig(wxT(CONF_APP_NAME)); |
wxConfig* config = new wxConfig(wxT(CONF_APP_NAME)); |
| 140 |
config->DeleteAll(); |
config->DeleteAll(); |
| 141 |
|
delete config; |
| 142 |
|
config = new wxConfig(wxT(CONF_APP_NAME)); // recreate config object |
| 143 |
notebook = frame->getNotebook(); |
notebook = frame->getNotebook(); |
| 144 |
int count = notebook->GetPageCount(); |
int count = notebook->GetPageCount(); |
| 145 |
for(int i = 0; i < count; i++) { |
for(int i = 0; i < count; i++) { |
| 185 |
|
|
| 186 |
return false; |
return false; |
| 187 |
} |
} |
| 188 |
|
|
| 189 |
|
|
| 190 |
|
void mnFrameController::handlePageChange(wxNotebookEvent& event) |
| 191 |
|
{ |
| 192 |
|
wxNotebook* notebook; |
| 193 |
|
mnNotePanel* panel; |
| 194 |
|
|
| 195 |
|
notebook = frame->getNotebook(); |
| 196 |
|
panel = (mnNotePanel*)notebook->GetPage(event.GetSelection()); |
| 197 |
|
const wxString* dataDir = panel->getController()->getWikiDataDir(); |
| 198 |
|
|
| 199 |
|
frame->GetStatusBar()->SetStatusText(*dataDir); |
| 200 |
|
} |