wxOS2 with Open Watcom: correct PCH usage, missing headers, warning fixes, source cleaning and other Watcom adjustements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -254,6 +254,8 @@ bool wxContextHelp::DispatchEvent(wxWindow* win, const wxPoint& pt)
|
|||||||
* to put the application into context help mode.
|
* to put the application into context help mode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __WXPM__
|
||||||
|
|
||||||
static const char * csquery_xpm[] = {
|
static const char * csquery_xpm[] = {
|
||||||
"12 11 2 1",
|
"12 11 2 1",
|
||||||
" c None",
|
" c None",
|
||||||
@@ -270,6 +272,8 @@ static const char * csquery_xpm[] = {
|
|||||||
" .. ",
|
" .. ",
|
||||||
" "};
|
" "};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
IMPLEMENT_CLASS(wxContextHelpButton, wxBitmapButton)
|
IMPLEMENT_CLASS(wxContextHelpButton, wxBitmapButton)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxContextHelpButton, wxBitmapButton)
|
BEGIN_EVENT_TABLE(wxContextHelpButton, wxBitmapButton)
|
||||||
|
@@ -103,7 +103,7 @@ TextElement(wxXmlNode *node, const wxChar *name, const wxString& value)
|
|||||||
{
|
{
|
||||||
wxXmlNode *nodeChild = new wxXmlNode(wxXML_ELEMENT_NODE, name);
|
wxXmlNode *nodeChild = new wxXmlNode(wxXML_ELEMENT_NODE, name);
|
||||||
node->AddChild(nodeChild);
|
node->AddChild(nodeChild);
|
||||||
nodeChild->AddChild(new wxXmlNode(wxXML_TEXT_NODE, _T(""), value));
|
nodeChild->AddChild(new wxXmlNode(wxXML_TEXT_NODE, wxEmptyString, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
@@ -690,4 +690,3 @@ bool wxDebugReportUpload::DoProcess()
|
|||||||
#endif // wxUSE_ZIPSTREAM
|
#endif // wxUSE_ZIPSTREAM
|
||||||
|
|
||||||
#endif // wxUSE_DEBUGREPORT
|
#endif // wxUSE_DEBUGREPORT
|
||||||
|
|
||||||
|
@@ -1151,6 +1151,7 @@ bool wxMkdir(const wxString& dir, int perm)
|
|||||||
if ( mkdir(wxFNCONV(dirname), perm) != 0 )
|
if ( mkdir(wxFNCONV(dirname), perm) != 0 )
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__OS2__)
|
#elif defined(__OS2__)
|
||||||
|
wxUnusedVar(perm);
|
||||||
if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's??
|
if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's??
|
||||||
#elif defined(__DOS__)
|
#elif defined(__DOS__)
|
||||||
#if defined(__WATCOMC__)
|
#if defined(__WATCOMC__)
|
||||||
@@ -1228,7 +1229,7 @@ bool wxDirExists(const wxChar *pszPathName)
|
|||||||
|
|
||||||
return (ret != (DWORD)-1) && (ret & FILE_ATTRIBUTE_DIRECTORY);
|
return (ret != (DWORD)-1) && (ret & FILE_ATTRIBUTE_DIRECTORY);
|
||||||
#elif defined(__OS2__)
|
#elif defined(__OS2__)
|
||||||
return (::DosSetCurrentDir((PSZ)(WXSTRINGCAST strPath)));
|
return (bool)(::DosSetCurrentDir((PSZ)(WXSTRINGCAST strPath)));
|
||||||
#else // !__WIN32__
|
#else // !__WIN32__
|
||||||
|
|
||||||
wxStructStat st;
|
wxStructStat st;
|
||||||
@@ -1406,7 +1407,7 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
|
|||||||
,cbuf + 3
|
,cbuf + 3
|
||||||
,(PULONG)&sz
|
,(PULONG)&sz
|
||||||
);
|
);
|
||||||
cbuf[0] = 'A' + (ulDriveNum - 1);
|
cbuf[0] = char('A' + (ulDriveNum - 1));
|
||||||
cbuf[1] = ':';
|
cbuf[1] = ':';
|
||||||
cbuf[2] = '\\';
|
cbuf[2] = '\\';
|
||||||
ok = rc == 0;
|
ok = rc == 0;
|
||||||
|
@@ -1910,6 +1910,9 @@ bool wxFileName::SetTimes(const wxDateTime *dtAccess,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#else // other platform
|
#else // other platform
|
||||||
|
wxUnusedVar(dtAccess);
|
||||||
|
wxUnusedVar(dtMod);
|
||||||
|
wxUnusedVar(dtCreate);
|
||||||
#endif // platforms
|
#endif // platforms
|
||||||
|
|
||||||
wxLogSysError(_("Failed to modify file times for '%s'"),
|
wxLogSysError(_("Failed to modify file times for '%s'"),
|
||||||
@@ -2000,6 +2003,9 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#else // other platform
|
#else // other platform
|
||||||
|
wxUnusedVar(dtAccess);
|
||||||
|
wxUnusedVar(dtMod);
|
||||||
|
wxUnusedVar(dtCreate);
|
||||||
#endif // platforms
|
#endif // platforms
|
||||||
|
|
||||||
wxLogSysError(_("Failed to retrieve file times for '%s'"),
|
wxLogSysError(_("Failed to retrieve file times for '%s'"),
|
||||||
|
@@ -62,7 +62,7 @@ static void LINKAGEMODE
|
|||||||
wxImageFloodFill(wxImage *image,
|
wxImageFloodFill(wxImage *image,
|
||||||
wxCoord x, wxCoord y, const wxBrush & fillBrush,
|
wxCoord x, wxCoord y, const wxBrush & fillBrush,
|
||||||
const wxColour& testColour, int style,
|
const wxColour& testColour, int style,
|
||||||
int LogicalFunction)
|
int WXUNUSED(LogicalFunction))
|
||||||
{
|
{
|
||||||
/* A diamond flood-fill using a circular queue system.
|
/* A diamond flood-fill using a circular queue system.
|
||||||
Each pixel surrounding the current pixel is added to
|
Each pixel surrounding the current pixel is added to
|
||||||
@@ -309,4 +309,3 @@ bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_IMAGE
|
#endif // wxUSE_IMAGE
|
||||||
|
|
||||||
|
@@ -109,7 +109,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler)
|
|||||||
#if wxUSE_STREAMS
|
#if wxUSE_STREAMS
|
||||||
|
|
||||||
#ifndef PNGLINKAGEMODE
|
#ifndef PNGLINKAGEMODE
|
||||||
#ifdef __WATCOMC__
|
#if defined(__WATCOMC__) && defined(__WXMSW__)
|
||||||
// we need an explicit cdecl for Watcom, at least according to
|
// we need an explicit cdecl for Watcom, at least according to
|
||||||
//
|
//
|
||||||
// http://sf.net/tracker/index.php?func=detail&aid=651492&group_id=9863&atid=109863
|
// http://sf.net/tracker/index.php?func=detail&aid=651492&group_id=9863&atid=109863
|
||||||
|
@@ -412,12 +412,16 @@ bool wxFileType::Unassociate()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFileType::SetCommand(const wxString& cmd, const wxString& verb,
|
bool wxFileType::SetCommand(const wxString& cmd,
|
||||||
bool overwriteprompt)
|
const wxString& verb,
|
||||||
|
bool overwriteprompt)
|
||||||
{
|
{
|
||||||
#if defined (__WXMSW__) || defined(__UNIX__)
|
#if defined (__WXMSW__) || defined(__UNIX__)
|
||||||
return m_impl->SetCommand(cmd, verb, overwriteprompt);
|
return m_impl->SetCommand(cmd, verb, overwriteprompt);
|
||||||
#else
|
#else
|
||||||
|
wxUnusedVar(cmd);
|
||||||
|
wxUnusedVar(verb);
|
||||||
|
wxUnusedVar(overwriteprompt);
|
||||||
wxFAIL_MSG(_T("not implemented"));
|
wxFAIL_MSG(_T("not implemented"));
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
@@ -437,8 +441,8 @@ bool wxFileType::SetDefaultIcon(const wxString& cmd, int index)
|
|||||||
#if defined (__WXMSW__) || defined(__UNIX__)
|
#if defined (__WXMSW__) || defined(__UNIX__)
|
||||||
return m_impl->SetDefaultIcon (cmd, index);
|
return m_impl->SetDefaultIcon (cmd, index);
|
||||||
#else
|
#else
|
||||||
|
wxUnusedVar(index);
|
||||||
wxFAIL_MSG(_T("not implemented"));
|
wxFAIL_MSG(_T("not implemented"));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -506,6 +510,7 @@ wxMimeTypesManager::Associate(const wxFileTypeInfo& ftInfo)
|
|||||||
#if defined(__WXMSW__) || defined(__UNIX__)
|
#if defined(__WXMSW__) || defined(__UNIX__)
|
||||||
return m_impl->Associate(ftInfo);
|
return m_impl->Associate(ftInfo);
|
||||||
#else // other platforms
|
#else // other platforms
|
||||||
|
wxUnusedVar(ftInfo);
|
||||||
wxFAIL_MSG( _T("not implemented") ); // TODO
|
wxFAIL_MSG( _T("not implemented") ); // TODO
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif // platforms
|
#endif // platforms
|
||||||
|
@@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
typedef unsigned short UINT16;
|
typedef unsigned short UINT16;
|
||||||
typedef signed short INT16;
|
typedef signed short INT16;
|
||||||
#ifndef __WATCOMC__
|
#if !(defined(__WATCOMC__) && defined(__WXMSW__))
|
||||||
typedef signed int INT32;
|
typedef signed int INT32;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1656,4 +1656,3 @@ bool wxQuantize::Quantize(const wxImage& src,
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
// wxUSE_IMAGE
|
// wxUSE_IMAGE
|
||||||
|
|
||||||
|
@@ -362,7 +362,7 @@ bool wxTextCtrlBase::EmulateKeyPress(const wxKeyEvent& event)
|
|||||||
case WXK_NUMPAD7:
|
case WXK_NUMPAD7:
|
||||||
case WXK_NUMPAD8:
|
case WXK_NUMPAD8:
|
||||||
case WXK_NUMPAD9:
|
case WXK_NUMPAD9:
|
||||||
ch = _T('0') + keycode - WXK_NUMPAD0;
|
ch = (wxChar)(_T('0') + keycode - WXK_NUMPAD0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_MULTIPLY:
|
case WXK_MULTIPLY:
|
||||||
@@ -523,4 +523,3 @@ wxTextCtrlBase::HitTest(const wxPoint& WXUNUSED(pt),
|
|||||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TEXT_UPDATED)
|
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TEXT_UPDATED)
|
||||||
|
|
||||||
#endif // wxUSE_TEXTCTRL/!wxUSE_TEXTCTRL
|
#endif // wxUSE_TEXTCTRL/!wxUSE_TEXTCTRL
|
||||||
|
|
||||||
|
@@ -211,15 +211,17 @@ void wxGenericColourDialog::OnMouseEvent(wxMouseEvent& event)
|
|||||||
void wxGenericColourDialog::OnPaint(wxPaintEvent& event)
|
void wxGenericColourDialog::OnPaint(wxPaintEvent& event)
|
||||||
{
|
{
|
||||||
#if !defined(__WXMOTIF__) && !defined(__WXPM__) && !defined(__WXCOCOA__)
|
#if !defined(__WXMOTIF__) && !defined(__WXPM__) && !defined(__WXCOCOA__)
|
||||||
wxDialog::OnPaint(event);
|
wxDialog::OnPaint(event);
|
||||||
|
#else
|
||||||
|
wxUnusedVar(event);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
|
|
||||||
PaintBasicColours(dc);
|
PaintBasicColours(dc);
|
||||||
PaintCustomColours(dc);
|
PaintCustomColours(dc);
|
||||||
PaintCustomColour(dc);
|
PaintCustomColour(dc);
|
||||||
PaintHighlight(dc, true);
|
PaintHighlight(dc, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGenericColourDialog::CalculateMeasurements()
|
void wxGenericColourDialog::CalculateMeasurements()
|
||||||
@@ -597,4 +599,3 @@ void wxGenericColourDialog::OnBlueSlider(wxCommandEvent& WXUNUSED(event))
|
|||||||
#endif // wxUSE_SLIDER
|
#endif // wxUSE_SLIDER
|
||||||
|
|
||||||
#endif // wxUSE_COLOURDLG && !defined(__WXGTK20__)
|
#endif // wxUSE_COLOURDLG && !defined(__WXGTK20__)
|
||||||
|
|
||||||
|
@@ -131,14 +131,21 @@ public:
|
|||||||
wxString m_command;
|
wxString m_command;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
#if wxUSE_FILEDLG
|
||||||
void OnBrowse(wxCommandEvent& event);
|
void OnBrowse(wxCommandEvent& event);
|
||||||
|
#endif // wxUSE_FILEDLG
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
DECLARE_NO_COPY_CLASS(wxDumpOpenExternalDlg)
|
DECLARE_NO_COPY_CLASS(wxDumpOpenExternalDlg)
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxDumpOpenExternalDlg, wxDialog)
|
BEGIN_EVENT_TABLE(wxDumpOpenExternalDlg, wxDialog)
|
||||||
|
|
||||||
|
#if wxUSE_FILEDLG
|
||||||
EVT_BUTTON(wxID_MORE, wxDumpOpenExternalDlg::OnBrowse)
|
EVT_BUTTON(wxID_MORE, wxDumpOpenExternalDlg::OnBrowse)
|
||||||
|
#endif
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
@@ -180,12 +187,17 @@ wxDumpOpenExternalDlg::wxDumpOpenExternalDlg(wxWindow *parent,
|
|||||||
);
|
);
|
||||||
sizerH->Add(command,
|
sizerH->Add(command,
|
||||||
wxSizerFlags(1).Align(wxALIGN_CENTER_VERTICAL));
|
wxSizerFlags(1).Align(wxALIGN_CENTER_VERTICAL));
|
||||||
|
|
||||||
|
#if wxUSE_FILEDLG
|
||||||
|
|
||||||
wxButton *browse = new wxButton(this, wxID_MORE, wxT(">>"),
|
wxButton *browse = new wxButton(this, wxID_MORE, wxT(">>"),
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
wxBU_EXACTFIT);
|
wxBU_EXACTFIT);
|
||||||
sizerH->Add(browse,
|
sizerH->Add(browse,
|
||||||
wxSizerFlags(0).Align(wxALIGN_CENTER_VERTICAL). Border(wxLEFT));
|
wxSizerFlags(0).Align(wxALIGN_CENTER_VERTICAL). Border(wxLEFT));
|
||||||
|
|
||||||
|
#endif // wxUSE_FILEDLG
|
||||||
|
|
||||||
sizerTop->Add(sizerH, wxSizerFlags(0).Expand().Border());
|
sizerTop->Add(sizerH, wxSizerFlags(0).Expand().Border());
|
||||||
|
|
||||||
sizerTop->Add(new wxStaticLine(this), wxSizerFlags().Expand().Border());
|
sizerTop->Add(new wxStaticLine(this), wxSizerFlags().Expand().Border());
|
||||||
@@ -204,6 +216,8 @@ wxDumpOpenExternalDlg::wxDumpOpenExternalDlg(wxWindow *parent,
|
|||||||
command->SetFocus();
|
command->SetFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_FILEDLG
|
||||||
|
|
||||||
void wxDumpOpenExternalDlg::OnBrowse(wxCommandEvent& )
|
void wxDumpOpenExternalDlg::OnBrowse(wxCommandEvent& )
|
||||||
{
|
{
|
||||||
wxFileName fname(m_command);
|
wxFileName fname(m_command);
|
||||||
@@ -222,6 +236,7 @@ void wxDumpOpenExternalDlg::OnBrowse(wxCommandEvent& )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_FILEDLG
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxDebugReportDialog: class showing debug report to the user
|
// wxDebugReportDialog: class showing debug report to the user
|
||||||
@@ -401,7 +416,7 @@ bool wxDebugReportDialog::TransferDataFromWindow()
|
|||||||
void wxDebugReportDialog::OnView(wxCommandEvent& )
|
void wxDebugReportDialog::OnView(wxCommandEvent& )
|
||||||
{
|
{
|
||||||
const int sel = m_checklst->GetSelection();
|
const int sel = m_checklst->GetSelection();
|
||||||
wxCHECK_RET( sel != -1, _T("invalid selection in OnView()") );
|
wxCHECK_RET( sel != wxNOT_FOUND, _T("invalid selection in OnView()") );
|
||||||
|
|
||||||
wxFileName fn(m_dbgrpt.GetDirectory(), m_files[sel]);
|
wxFileName fn(m_dbgrpt.GetDirectory(), m_files[sel]);
|
||||||
wxString str;
|
wxString str;
|
||||||
@@ -417,7 +432,7 @@ void wxDebugReportDialog::OnView(wxCommandEvent& )
|
|||||||
void wxDebugReportDialog::OnOpen(wxCommandEvent& )
|
void wxDebugReportDialog::OnOpen(wxCommandEvent& )
|
||||||
{
|
{
|
||||||
const int sel = m_checklst->GetSelection();
|
const int sel = m_checklst->GetSelection();
|
||||||
wxCHECK_RET( sel != -1, _T("invalid selection in OnOpen()") );
|
wxCHECK_RET( sel != wxNOT_FOUND, _T("invalid selection in OnOpen()") );
|
||||||
|
|
||||||
wxFileName fn(m_dbgrpt.GetDirectory(), m_files[sel]);
|
wxFileName fn(m_dbgrpt.GetDirectory(), m_files[sel]);
|
||||||
|
|
||||||
@@ -498,4 +513,3 @@ bool wxDebugReportPreviewStd::Show(wxDebugReport& dbgrpt) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_DEBUGREPORT
|
#endif // wxUSE_DEBUGREPORT
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user