Develop and Download Open Source Software

Browse CVS Repository

Diff of /malonnote/mnModel.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:06 2005 UTC revision 1.4 by maloninc, Thu Aug 4 05:10:02 2005 UTC
# Line 63  WikiList* mnModel::search(const char* se Line 63  WikiList* mnModel::search(const char* se
63                  MN_FATAL_ERROR(wxT("wxDir has faild\n"));                  MN_FATAL_ERROR(wxT("wxDir has faild\n"));
64          return NULL;          return NULL;
65      }      }
66      bool cont = dir->GetFirst(fileName, wxEmptyString, wxDIR_FILES);      bool cont = dir->GetFirst(fileName, wxT("*.txt"), wxDIR_FILES);
67          while(cont){          while(cont){
68          fullPathName = *wikiDataDir + wxT("/") + *fileName;          fullPathName = *wikiDataDir + wxT("/") + *fileName;
69                  fp = fopen((const char*)fullPathName.mb_str(), "r");                  fp = fopen((const char*)fullPathName.mb_str(), "r");
# Line 118  void mnModel::modSearchStr(wxString* old Line 118  void mnModel::modSearchStr(wxString* old
118                  itemStr.sprintf(wxT("%s"), newStr->c_str());                  itemStr.sprintf(wxT("%s"), newStr->c_str());
119          }          }
120  }  }
121    const wxString* mnModel::getWikiDataDir()
122    {
123            return wikiDataDir;
124    }
125    
126  const wxArrayString* mnModel::getSearchStrList()  const wxArrayString* mnModel::getSearchStrList()
127  {  {
# Line 251  void WikiData::modSubject(wxString* newS Line 255  void WikiData::modSubject(wxString* newS
255          if((fp = fopen(newFullPath, "r")) == NULL) {          if((fp = fopen(newFullPath, "r")) == NULL) {
256                  rename(oldFullPath, newFullPath);                  rename(oldFullPath, newFullPath);
257          }          }
258          else {          else if(strcmp(oldFullPath, newFullPath)){
259                  wxLogMessage(wxT("File has already exist. [%s]"), fileName->c_str());                  wxLogMessage(wxT("File has already exist. [%s]"), fileName->c_str());
260                  fclose(fp);                  fclose(fp);
261          }          }
# Line 316  const wxString* WikiData::getText() Line 320  const wxString* WikiData::getText()
320    
321  void WikiData::modText(wxString* intext)  void WikiData::modText(wxString* intext)
322  {  {
323            wxCSConv conv(wxT(CODE_SET_SYSTEM));
324          delete text;          delete text;
325          text = new wxString(intext->c_str());          //text = new wxString(intext->c_str());
326            text = new wxString(*intext);
327            //text = new wxString(intext->mb_str(), conv);
328  }  }
329    
330  void WikiData::removeDataFile()  void WikiData::removeDataFile()

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

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