| 102 |
} |
} |
| 103 |
|
|
| 104 |
wiki->addSearchStr(str); |
wiki->addSearchStr(str); |
| 105 |
|
wiki->addSearchList(str, wikiList); |
| 106 |
|
|
| 107 |
if(autoUpdateMode) |
frame->addSearchResult(wiki, str); |
|
frame->showSearchResult(wiki); |
|
|
else |
|
|
frame->addSearchResult(wiki, str); |
|
| 108 |
} |
} |
| 109 |
|
|
| 110 |
void mnController::handleGroup(wxCommandEvent& event) |
void mnController::handleGroup(wxCommandEvent& event) |
| 150 |
{ |
{ |
| 151 |
wxTreeItemData* item = frame->getSelectedItem(); |
wxTreeItemData* item = frame->getSelectedItem(); |
| 152 |
|
|
| 153 |
if(item){ |
if(frame->isEditableTreeLabel(frame->getSelection())) { |
| 154 |
if(wxMessageBox(wxT("Do you realy remove this memo?\n") + frame->getSelectedLabel(), wxT("Realy?"), wxYES_NO|wxICON_QUESTION) == wxYES){ |
if(wxMessageBox(wxT("Do you realy remove this memo?\n") + frame->getSelectedLabel(), wxT("Realy?"), wxYES_NO|wxICON_QUESTION) == wxYES){ |
| 155 |
((WikiData*)(item))->removeDataFile(); |
((WikiData*)(item))->removeDataFile(); |
| 156 |
} |
} |
| 260 |
mnWikiDataEntryDialog* dlg = new mnWikiDataEntryDialog(frame, -1, wxT("Malon Note")); |
mnWikiDataEntryDialog* dlg = new mnWikiDataEntryDialog(frame, -1, wxT("Malon Note")); |
| 261 |
int ans; |
int ans; |
| 262 |
|
|
| 263 |
if(itemData == NULL) return; |
if(!frame->isEditableTreeLabel(frame->getSelection())) return; /* selection is not memo data */ |
| 264 |
|
|
| 265 |
const wxString* wikiText = ((WikiData*)(itemData))->getText(); |
const wxString* wikiText = ((WikiData*)(itemData))->getText(); |
| 266 |
|
|
| 267 |
dlg->setSubject(subject); |
dlg->setSubject(subject); |
| 278 |
|
|
| 279 |
((WikiData*)(itemData))->modSubject(&newSubjectStr); |
((WikiData*)(itemData))->modSubject(&newSubjectStr); |
| 280 |
|
|
| 281 |
if(autoUpdateMode) |
const wxArrayString* searchStrList= wiki->getSearchStrList(); |
| 282 |
frame->showSearchResult(wiki); |
char* tokenList[32]; |
| 283 |
|
memset(tokenList, 0, sizeof(char*)*32); |
| 284 |
|
for(int i = 0; i < searchStrList->Count(); i++) { |
| 285 |
|
wxString& searchStr = searchStrList->Item(i); |
| 286 |
|
if( wiki->makeSearchToken(searchStr.mb_str(), tokenList) ) { /* create token */ |
| 287 |
|
if(wiki->matchWithToken((wxString*)((WikiData*)(itemData))->getFileName(), tokenList)) { /* match */ |
| 288 |
|
wiki->addSearchResultList(&searchStr, (WikiData*)(itemData)); |
| 289 |
|
frame->updateSearchResult(wiki, &searchStr); |
| 290 |
|
} |
| 291 |
|
else { |
| 292 |
|
//wiki->delSearchResultList(searchStr, (WikiData*)(itemData)); |
| 293 |
|
//frame->updateSearchResult(wiki, &searchStr); |
| 294 |
|
} |
| 295 |
|
} |
| 296 |
|
} |
| 297 |
delete dlg; |
delete dlg; |
| 298 |
} |
} |
| 299 |
|
|