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.29 by maloninc, Fri Dec 30 01:34:40 2005 UTC revision 1.30 by maloninc, Fri Dec 30 05:51:43 2005 UTC
# Line 461  WikiData::WikiData(wxString* dataDir, wx Line 461  WikiData::WikiData(wxString* dataDir, wx
461                  }                  }
462          }          }
463          fclose(fp);          fclose(fp);
464    
465            isWriteToFile = true;
466  }  }
467    
468  WikiData::WikiData(wxString* dataDir) {  WikiData::WikiData(wxString* dataDir) {
# Line 520  WikiData::WikiData(wxString* dataDir) { Line 522  WikiData::WikiData(wxString* dataDir) {
522          text    = new wxString(buf, conv);          text    = new wxString(buf, conv);
523    
524          if(fp) fclose(fp);          if(fp) fclose(fp);
525    
526            isWriteToFile = false;
527  }  }
528    
529  WikiData::~WikiData()  WikiData::~WikiData()
# Line 625  const wxString* WikiData::getText() Line 629  const wxString* WikiData::getText()
629                  MN_FATAL_ERROR(wxT("failed iconv_open"));                  MN_FATAL_ERROR(wxT("failed iconv_open"));
630          }          }
631    
632          if(text) {          if(text && isWriteToFile == true) {
633                  delete text;                  delete text;
634                  text = NULL;                  text = NULL;
635          }          }
636            else if(text && isWriteToFile == false) {
637                    return text;
638            }
639    
640          text = new wxString();          text = new wxString();
641          sprintf(fullPath, "%s/%s", (const char*)dataDirName->mb_str(), (const char*)fileName->mb_str());          sprintf(fullPath, "%s/%s", (const char*)dataDirName->mb_str(), (const char*)fileName->mb_str());
# Line 724  void WikiData::save() Line 731  void WikiData::save()
731                    
732          free(inbuf);          free(inbuf);
733          free(outbuf);          free(outbuf);
734            
735            isWriteToFile = true;
736  }  }
737    
738  /******* Tools ************************/  /******* Tools ************************/

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

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