wxString tmp = wxFileSelector(_("Save as"),
docTemplate->GetDirectory(),
- GetFilename(),
+ wxFileNameFromPath(GetFilename()),
docTemplate->GetDefaultExtension(),
docTemplate->GetFileFilter(),
wxSAVE | wxOVERWRITE_PROMPT,
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
- ofstream store(wxString(file.fn_str()).mb_str());
+ wxSTD ofstream store(wxString(file.fn_str()).mb_str());
if (store.fail() || store.bad())
#else
wxFileOutputStream store(wxString(file.fn_str()));
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
- ifstream store(wxString(file.fn_str()).mb_str());
+ wxSTD ifstream store(wxString(file.fn_str()).mb_str());
if (store.fail() || store.bad())
#else
wxFileInputStream store(wxString(file.fn_str()));
}
#if wxUSE_STD_IOSTREAM
-istream& wxDocument::LoadObject(istream& stream)
+wxSTD istream& wxDocument::LoadObject(wxSTD istream& stream)
#else
wxInputStream& wxDocument::LoadObject(wxInputStream& stream)
#endif
}
#if wxUSE_STD_IOSTREAM
-ostream& wxDocument::SaveObject(ostream& stream)
+wxSTD ostream& wxDocument::SaveObject(wxSTD ostream& stream)
#else
wxOutputStream& wxDocument::SaveObject(wxOutputStream& stream)
#endif
wxCHECK_RET( i < m_fileHistoryN,
wxT("invalid index in wxFileHistory::RemoveFileFromHistory") );
- wxNode* node = m_fileMenus.First();
- while ( node )
- {
- wxMenu* menu = (wxMenu*) node->Data();
-
// delete the element from the array (could use memmove() too...)
delete [] m_fileHistory[i];
m_fileHistory[j] = m_fileHistory[j + 1];
}
+ wxNode* node = m_fileMenus.First();
+ while ( node )
+ {
+ wxMenu* menu = (wxMenu*) node->Data();
+
+
// shuffle filenames up
wxString buf;
for ( j = i; j < m_fileHistoryN - 1; j++ )
node = node->Next();
// delete the last menu item which is unused now
+ if (menu->FindItem(wxID_FILE1 + m_fileHistoryN - 1))
menu->Delete(wxID_FILE1 + m_fileHistoryN - 1);
// delete the last separator too if no more files are left
// ----------------------------------------------------------------------------
#if wxUSE_STD_IOSTREAM
-bool wxTransferFileToStream(const wxString& filename, ostream& stream)
+bool wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream)
{
FILE *fd1;
int ch;
return TRUE;
}
-bool wxTransferStreamToFile(istream& stream, const wxString& filename)
+bool wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename)
{
FILE *fd1;
int ch;