Develop and Download Open Source Software

Browse CVS Repository

Diff of /malonnote/mnController.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.1.1 by maloninc, Thu Jul 28 03:25:05 2005 UTC revision 1.3 by maloninc, Sat Jul 30 08:26:16 2005 UTC
# Line 152  void mnController::handleEndLabelEdit(wx Line 152  void mnController::handleEndLabelEdit(wx
152          wxString newSubject   = event.GetLabel();          wxString newSubject   = event.GetLabel();
153          wxTreeItemData* item  = frame->getSelectedItem();          wxTreeItemData* item  = frame->getSelectedItem();
154    
         event.Veto();  
   
155          saveData();          saveData();
156    
157          if(item == NULL) return ;          if(item == NULL) return ;
158            
159          if(newSubject.Len() == 0) {          if(newSubject.Len() == 0) {
160                    event.Veto();
161                  frame->showSearchResult(wiki);                  frame->showSearchResult(wiki);
162                  return;                  return;
163          }          }
164    
165          ((WikiData*)(item))->modSubject(&newSubject);          ((WikiData*)(item))->modSubject(&newSubject);
166            if(frame->isNewItem(event.GetItem())){
167                    return;
168            }
169    
170            event.Veto();
171          frame->showSearchResult(wiki);          frame->showSearchResult(wiki);
172  }  }
173    
# Line 180  void mnController::handleExit(wxCommandE Line 185  void mnController::handleExit(wxCommandE
185    
186  void mnController::handleAbout(wxCommandEvent& event)  void mnController::handleAbout(wxCommandEvent& event)
187  {  {
188          wxMessageBox(wxT("MalonNote Ver0.9"), wxT("Abount MalonNote"), wxOK|wxICON_INFORMATION);          wxMessageBox(wxT(MN_APP_VERSION), wxT("Abount MalonNote"), wxOK|wxICON_INFORMATION);
189  }  }
190    
191    
192    
193  void mnController::saveData()  void mnController::saveData()
194  {  {
195    #if 0
196          wxTreeItemData* item         = frame->getSelectedItem();          wxTreeItemData* item         = frame->getSelectedItem();
197          wxString        plainTextStr = frame->getPlainText();          wxString        plainTextStr = frame->getPlainText();
198          if(item == NULL) return ;          if(item == NULL) return ;
# Line 194  void mnController::saveData() Line 200  void mnController::saveData()
200          ((WikiData*)(item))->modText(&plainTextStr);          ((WikiData*)(item))->modText(&plainTextStr);
201          ((WikiData*)(item))->save();          ((WikiData*)(item))->save();
202          //frame->showSearchResult(wiki);          //frame->showSearchResult(wiki);
203    #endif
204  }  }

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.3

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26