// wxWindows macros
// ----------------------------------------------------------------------------
-#if !USE_SHARED_LIBRARY
IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler)
IMPLEMENT_ABSTRACT_CLASS(wxView, wxEvtHandler)
IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate, wxObject)
IMPLEMENT_CLASS(wxCommand, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject)
-#endif
// ----------------------------------------------------------------------------
// function prototypes
if (store.fail() || store.bad())
#else
wxFileOutputStream store(wxString(file.fn_str()));
- if (store.LastError() != 0)
+ if (store.LastError() != wxSTREAM_NOERROR)
#endif
{
(void)wxMessageBox(_("Sorry, could not open this file for saving."), msgTitle, wxOK | wxICON_EXCLAMATION,
if (store.fail() || store.bad())
#else
wxFileInputStream store(wxString(file.fn_str()));
- if (store.LastError() != 0)
+ if (store.LastError() != wxSTREAM_NOERROR)
#endif
{
(void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
GetDocumentWindow());
return FALSE;
}
+#if wxUSE_STD_IOSTREAM
if (!LoadObject(store))
+#else
+ int res = LoadObject(store).LastError();
+ if ((res != wxSTREAM_NOERROR) &&
+ (res != wxSTREAM_EOF))
+#endif
{
(void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
GetDocumentWindow());
// SetDocument(doc);
m_viewDocument = (wxDocument*) NULL;
- m_viewTypeName = "";
+ m_viewTypeName = wxT("");
m_viewFrame = (wxFrame *) NULL;
}
wxView::~wxView()
{
- GetDocumentManager()->ActivateView(this, FALSE, TRUE);
+// GetDocumentManager()->ActivateView(this, FALSE, TRUE);
m_viewDocument->RemoveView(this);
}
// template extension.
wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
-#ifdef __WXMSW__
+#if defined(__WXMSW__) || defined(__WXGTK__)
int noTemplates,
#else
int WXUNUSED(noTemplates),
long WXUNUSED(flags),
bool WXUNUSED(save))
{
- // We can only have multiple filters in Windows
-#ifdef __WXMSW__
+ // We can only have multiple filters in Windows and GTK
+#if defined(__WXMSW__) || defined(__WXGTK__)
wxString descrBuf;
int i;
m_fileHistory[m_fileHistoryN] = copystring((const wxChar*) historyFile);
m_fileHistoryN ++;
buf.Printf(wxT("file%d"), m_fileHistoryN+1);
- historyFile = "";
+ historyFile = wxT("");
}
AddFilesToMenu();
}