Develop and Download Open Source Software

Browse CVS Repository

Diff of /malonnote/mnFrameController.cpp

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

revision 1.3 by maloninc, Wed Oct 5 07:20:56 2005 UTC revision 1.4 by maloninc, Thu Oct 6 05:29:01 2005 UTC
# Line 29  END_EVENT_TABLE() Line 29  END_EVENT_TABLE()
29    
30  mnFrameController::mnFrameController(mnFrame* inframe)  mnFrameController::mnFrameController(mnFrame* inframe)
31  {  {
         wxString* dirName = new wxString();  
         wxString gotDirName;  
         wxDirDialog* dlg;  
         wxString confKey;  
   
32          frame = inframe;          frame = inframe;
   
         /* create wiki model */  
         wxConfig* config = new wxConfig(wxT(CONF_APP_NAME));  
         if(config->Read(wxT(CONF_WIKI_DIR), dirName) == FALSE) {  
                 delete dirName;  
                 dlg = new wxDirDialog(frame);  
                 if(dlg->ShowModal() == wxID_OK) {  
                         gotDirName = dlg->GetPath();  
                         config->Write(wxT(CONF_WIKI_DIR), gotDirName.c_str());  
                         frame->addNotePanel(&gotDirName);  
                 }  
                 else {  
                         frame->Close();  
                 }  
         }  
         else {  
                 frame->addNotePanel(dirName);  
   
                 for(int i = 1; ;i++) {  
                         confKey.sprintf(wxT(CONF_WIKI_DIR) "%d", i);  
                         if(config->Read(confKey.c_str(), dirName) == FALSE) break;  
                         frame->addNotePanel(dirName);  
                 }  
                 frame->getNotebook()->SetSelection(0);  
         }  
   
         delete config;  
33  }  }
34    
35  void mnFrameController::handleConfig(wxCommandEvent& event)  void mnFrameController::handleConfig(wxCommandEvent& event)

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

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