wxChoiceDialog fix.

Distribution and build things.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-06-29 23:16:45 +00:00
parent 7b8bd8182c
commit a533f5c122
37 changed files with 1693 additions and 450 deletions

View File

@@ -59,12 +59,15 @@
#include <stdio.h>
#include <string.h>
#include "wx/ioswrap.h"
#if wxUSE_IOSTREAMH
#if wxUSE_STD_IOSTREAM
#include "wx/ioswrap.h"
#if wxUSE_IOSTREAMH
#include <fstream.h>
#else
#else
#include <fstream>
#endif
#else
#include "wx/wfstream.h"
#endif
// ----------------------------------------------------------------------------
@@ -277,8 +280,13 @@ bool wxDocument::OnSaveDocument(const wxString& file)
else
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
ofstream store(file.fn_str());
if (store.fail() || store.bad())
#else
wxFileOutputStream store(file.fn_str());
if (store.LastError() == 0)
#endif
{
(void)wxMessageBox(_("Sorry, could not open this file for saving."), msgTitle, wxOK | wxICON_EXCLAMATION,
GetDocumentWindow());
@@ -308,8 +316,13 @@ bool wxDocument::OnOpenDocument(const wxString& file)
else
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
ifstream store(file.fn_str());
if (store.fail() || store.bad())
#else
wxFileInputStream store(file.fn_str());
if (store.LastError() == 0)
#endif
{
(void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
GetDocumentWindow());
@@ -330,19 +343,27 @@ bool wxDocument::OnOpenDocument(const wxString& file)
return TRUE;
}
#if wxUSE_STD_IOSTREAM
istream& wxDocument::LoadObject(istream& stream)
{
// wxObject::LoadObject(stream);
return stream;
}
ostream& wxDocument::SaveObject(ostream& stream)
{
// wxObject::SaveObject(stream);
return stream;
}
#else
bool wxDocument::LoadObject(wxInputStream& stream)
{
return TRUE;
}
bool wxDocument::SaveObject(wxOutputStream& stream)
{
return TRUE;
}
#endif
bool wxDocument::Revert()
{
@@ -1943,6 +1964,7 @@ void wxFileHistory::AddFilesToMenu(wxMenu* menu)
// manipulate files directly
// ----------------------------------------------------------------------------
#if wxUSE_STD_IOSTREAM
bool wxTransferFileToStream(const wxString& filename, ostream& stream)
{
FILE *fd1;
@@ -1977,6 +1999,7 @@ bool wxTransferStreamToFile(istream& stream, const wxString& filename)
fclose (fd1);
return TRUE;
}
#endif
#endif // wxUSE_DOC_VIEW_ARCHITECTURE