// This is the backup filename
wxString backupFilename(filename);
backupFilename += wxT(".bak");
// This is the backup filename
wxString backupFilename(filename);
backupFilename += wxT(".bak");
// This is the temporary copy of the backup
wxString tempFilename(filename);
tempFilename += wxT(".tmp");
// This is the temporary copy of the backup
wxString tempFilename(filename);
tempFilename += wxT(".tmp");
// Finally, copy the temporary file to the proper filename
if (!wxRenameFile(tempFilename, filename))
{
wxCopyFile(tempFilename, filename);
wxRemoveFile(tempFilename);
// Finally, copy the temporary file to the proper filename
if (!wxRenameFile(tempFilename, filename))
{
wxCopyFile(tempFilename, filename);
wxRemoveFile(tempFilename);
stream << wxT("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
stream << wxT("<settings xmlns=\"http://www.wxwidgets.org/wxs\" version=\"2.5.0.1\">");
stream << wxT("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
stream << wxT("<settings xmlns=\"http://www.wxwidgets.org/wxs\" version=\"2.5.0.1\">");
item->GetDependents().Clear();
for ( wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
item->GetDependents().Clear();
for ( wxObjectList::compatibility_iterator node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
wxArrayString requiresArr;
wxString requires = item->GetPropertyString(wxT("requires"));
wxString precludes = item->GetPropertyString(wxT("precludes"));
wxArrayString requiresArr;
wxString requires = item->GetPropertyString(wxT("requires"));
wxString precludes = item->GetPropertyString(wxT("precludes"));
// This will delete the old clipboard contents, if any.
doc->SetClipboardItem(newItem);
// This will delete the old clipboard contents, if any.
doc->SetClipboardItem(newItem);