Develop and Download Open Source Software

Browse CVS Repository

Diff of /malonnote/main.cpp

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

revision 1.8 by maloninc, Mon Jan 23 13:37:10 2006 UTC revision 1.10 by maloninc, Tue Oct 24 08:52:04 2006 UTC
# Line 27  IMPLEMENT_APP(mnApp) Line 27  IMPLEMENT_APP(mnApp)
27  bool mnApp::OnInit()  bool mnApp::OnInit()
28  {  {
29          wxString* dirName = new wxString();          wxString* dirName = new wxString();
30            wxString* fastSearchOpt = new wxString();
31          wxString gotDirName;          wxString gotDirName;
32          wxDirDialog* dlg;          wxDirDialog* dlg;
33          wxString confKey;          wxString confKey;
# Line 60  bool mnApp::OnInit() Line 61  bool mnApp::OnInit()
61                  dlg = new wxDirDialog(mainFrame);                  dlg = new wxDirDialog(mainFrame);
62                  if(dlg->ShowModal() == wxID_OK) {                  if(dlg->ShowModal() == wxID_OK) {
63                          gotDirName = dlg->GetPath();                          gotDirName = dlg->GetPath();
64  wxLogMessage(wxT("gotDirName:[%s]"), gotDirName.c_str());                          config->Write(wxT(CONF_WIKI_DIR), gotDirName.c_str());
65                          //config->Write(wxT(CONF_WIKI_DIR), gotDirName.c_str());                          mainFrame->addNotePanel(&gotDirName);
                         //mainFrame->addNotePanel(&gotDirName);  
66                  }                  }
67                  else {                  else {
68                          mainFrame->Close();                          mainFrame->Close();
# Line 79  wxLogMessage(wxT("gotDirName:[%s]"), got Line 79  wxLogMessage(wxT("gotDirName:[%s]"), got
79                  mainFrame->getNotebook()->SetSelection(0);                  mainFrame->getNotebook()->SetSelection(0);
80          }          }
81    
82            /* check Fast Search option */
83            wxMenuItem* mItem = mainFrame->GetMenuBar()->FindItem(XRCID("FastSearch"));
84            if(config->Read(wxT(CONF_FAST_SEARCH_OPT), fastSearchOpt) == FALSE) {
85                    mItem->Check(true);
86            }
87            else{
88                    if( fastSearchOpt->Contains(wxT(MN_ENABLE_FAST_SEARCH)) ) {
89                            mItem->Check(true);
90                    }
91                    else {
92                            mItem->Check(false);
93                    }
94            }
95    
96          delete config;          delete config;
97    
98          mainFrame->setFocusToSearchTextCtrl();          mainFrame->setFocusToSearchTextCtrl();

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.10

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