Put braces around all calls to wxLogFunctions() inside an if statement.
This suppresses all the remaining g++ -Wparentheses warnings and uses consistent style everywhere. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -368,7 +368,9 @@ inline RECT wxGetWindowRect(HWND hwnd)
|
|||||||
RECT rect;
|
RECT rect;
|
||||||
|
|
||||||
if ( !::GetWindowRect(hwnd, &rect) )
|
if ( !::GetWindowRect(hwnd, &rect) )
|
||||||
|
{
|
||||||
wxLogLastError(_T("GetWindowRect"));
|
wxLogLastError(_T("GetWindowRect"));
|
||||||
|
}
|
||||||
|
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
@@ -378,7 +380,9 @@ inline RECT wxGetClientRect(HWND hwnd)
|
|||||||
RECT rect;
|
RECT rect;
|
||||||
|
|
||||||
if ( !::GetClientRect(hwnd, &rect) )
|
if ( !::GetClientRect(hwnd, &rect) )
|
||||||
|
{
|
||||||
wxLogLastError(_T("GetClientRect"));
|
wxLogLastError(_T("GetClientRect"));
|
||||||
|
}
|
||||||
|
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
@@ -570,8 +574,10 @@ public:
|
|||||||
: m_hdc(hdc)
|
: m_hdc(hdc)
|
||||||
{
|
{
|
||||||
if ( !::SelectClipRgn(hdc, hrgn) )
|
if ( !::SelectClipRgn(hdc, hrgn) )
|
||||||
|
{
|
||||||
wxLogLastError(_T("SelectClipRgn"));
|
wxLogLastError(_T("SelectClipRgn"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
~HDCClipper()
|
~HDCClipper()
|
||||||
{
|
{
|
||||||
@@ -599,8 +605,10 @@ private:
|
|||||||
{
|
{
|
||||||
m_modeOld = ::SetMapMode(hdc, mm);
|
m_modeOld = ::SetMapMode(hdc, mm);
|
||||||
if ( !m_modeOld )
|
if ( !m_modeOld )
|
||||||
|
{
|
||||||
wxLogLastError(_T("SelectClipRgn"));
|
wxLogLastError(_T("SelectClipRgn"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
~HDCMapModeChanger()
|
~HDCMapModeChanger()
|
||||||
{
|
{
|
||||||
@@ -634,8 +642,10 @@ public:
|
|||||||
{
|
{
|
||||||
m_hGlobal = ::GlobalAlloc(flags, size);
|
m_hGlobal = ::GlobalAlloc(flags, size);
|
||||||
if ( !m_hGlobal )
|
if ( !m_hGlobal )
|
||||||
|
{
|
||||||
wxLogLastError(_T("GlobalAlloc"));
|
wxLogLastError(_T("GlobalAlloc"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GlobalPtr(size_t size, unsigned flags = GMEM_MOVEABLE)
|
GlobalPtr(size_t size, unsigned flags = GMEM_MOVEABLE)
|
||||||
{
|
{
|
||||||
@@ -645,8 +655,10 @@ public:
|
|||||||
~GlobalPtr()
|
~GlobalPtr()
|
||||||
{
|
{
|
||||||
if ( m_hGlobal && ::GlobalFree(m_hGlobal) )
|
if ( m_hGlobal && ::GlobalFree(m_hGlobal) )
|
||||||
|
{
|
||||||
wxLogLastError(_T("GlobalFree"));
|
wxLogLastError(_T("GlobalFree"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// implicit conversion
|
// implicit conversion
|
||||||
operator HGLOBAL() const { return m_hGlobal; }
|
operator HGLOBAL() const { return m_hGlobal; }
|
||||||
@@ -681,8 +693,10 @@ public:
|
|||||||
// global scope operator with it (and neither with GlobalUnlock())
|
// global scope operator with it (and neither with GlobalUnlock())
|
||||||
m_ptr = GlobalLock(hGlobal);
|
m_ptr = GlobalLock(hGlobal);
|
||||||
if ( !m_ptr )
|
if ( !m_ptr )
|
||||||
|
{
|
||||||
wxLogLastError(_T("GlobalLock"));
|
wxLogLastError(_T("GlobalLock"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// initialize the object, HGLOBAL must not be NULL
|
// initialize the object, HGLOBAL must not be NULL
|
||||||
GlobalPtrLock(HGLOBAL hGlobal)
|
GlobalPtrLock(HGLOBAL hGlobal)
|
||||||
|
@@ -182,8 +182,10 @@ MyFrame::~MyFrame()
|
|||||||
void MyFrame::OnPlay(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnPlay(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if (!m_animationCtrl->Play())
|
if (!m_animationCtrl->Play())
|
||||||
|
{
|
||||||
wxLogError(wxT("Invalid animation"));
|
wxLogError(wxT("Invalid animation"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnStop(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnStop(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
@@ -1042,10 +1042,14 @@ void MyFrame::OnComboBoxUpdate( wxCommandEvent& event )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED )
|
if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED )
|
||||||
|
{
|
||||||
wxLogDebug(wxT("EVT_COMBOBOX(id=%i,selection=%i)"),event.GetId(),event.GetSelection());
|
wxLogDebug(wxT("EVT_COMBOBOX(id=%i,selection=%i)"),event.GetId(),event.GetSelection());
|
||||||
|
}
|
||||||
else if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED )
|
else if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED )
|
||||||
|
{
|
||||||
wxLogDebug(wxT("EVT_TEXT(id=%i,string=\"%s\")"),event.GetId(),event.GetString().c_str());
|
wxLogDebug(wxT("EVT_TEXT(id=%i,string=\"%s\")"),event.GetId(),event.GetString().c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnShowComparison( wxCommandEvent& WXUNUSED(event) )
|
void MyFrame::OnShowComparison( wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
|
@@ -1437,17 +1437,21 @@ void MyPanel::OnCombo( wxCommandEvent &event )
|
|||||||
void MyPanel::OnComboTextChanged(wxCommandEvent& event)
|
void MyPanel::OnComboTextChanged(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
if (m_combo)
|
if (m_combo)
|
||||||
|
{
|
||||||
wxLogMessage(wxT("EVT_TEXT for the combobox: \"%s\" (event) or \"%s\" (control)."),
|
wxLogMessage(wxT("EVT_TEXT for the combobox: \"%s\" (event) or \"%s\" (control)."),
|
||||||
event.GetString().c_str(),
|
event.GetString().c_str(),
|
||||||
m_combo->GetValue().c_str());
|
m_combo->GetValue().c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyPanel::OnComboTextEnter(wxCommandEvent& WXUNUSED(event))
|
void MyPanel::OnComboTextEnter(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if (m_combo)
|
if (m_combo)
|
||||||
|
{
|
||||||
wxLogMessage(_T("Enter pressed in the combobox: value is '%s'."),
|
wxLogMessage(_T("Enter pressed in the combobox: value is '%s'."),
|
||||||
m_combo->GetValue().c_str());
|
m_combo->GetValue().c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyPanel::OnComboButtons( wxCommandEvent &event )
|
void MyPanel::OnComboButtons( wxCommandEvent &event )
|
||||||
{
|
{
|
||||||
@@ -2033,20 +2037,28 @@ void MyComboBox::OnChar(wxKeyEvent& event)
|
|||||||
wxLogMessage(_T("MyComboBox::OnChar"));
|
wxLogMessage(_T("MyComboBox::OnChar"));
|
||||||
|
|
||||||
if ( event.GetKeyCode() == 'w' )
|
if ( event.GetKeyCode() == 'w' )
|
||||||
|
{
|
||||||
wxLogMessage(_T("MyComboBox: 'w' will be ignored."));
|
wxLogMessage(_T("MyComboBox: 'w' will be ignored."));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyComboBox::OnKeyDown(wxKeyEvent& event)
|
void MyComboBox::OnKeyDown(wxKeyEvent& event)
|
||||||
{
|
{
|
||||||
wxLogMessage(_T("MyComboBox::OnKeyDown"));
|
wxLogMessage(_T("MyComboBox::OnKeyDown"));
|
||||||
|
|
||||||
if ( event.GetKeyCode() == 'w' )
|
if ( event.GetKeyCode() == 'w' )
|
||||||
|
{
|
||||||
wxLogMessage(_T("MyComboBox: 'w' will be ignored."));
|
wxLogMessage(_T("MyComboBox: 'w' will be ignored."));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyComboBox::OnKeyUp(wxKeyEvent& event)
|
void MyComboBox::OnKeyUp(wxKeyEvent& event)
|
||||||
{
|
{
|
||||||
|
@@ -819,8 +819,10 @@ void MyFrame::OnActivated( wxDataViewEvent &event )
|
|||||||
wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, Item: %s", title );
|
wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, Item: %s", title );
|
||||||
|
|
||||||
if (m_ctrl[0]->IsExpanded( event.GetItem() ))
|
if (m_ctrl[0]->IsExpanded( event.GetItem() ))
|
||||||
|
{
|
||||||
wxLogMessage( "Item: %s is expanded", title );
|
wxLogMessage( "Item: %s is expanded", title );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnSelectionChanged( wxDataViewEvent &event )
|
void MyFrame::OnSelectionChanged( wxDataViewEvent &event )
|
||||||
{
|
{
|
||||||
|
@@ -305,10 +305,14 @@ void MyFrame::OnDial(wxCommandEvent& WXUNUSED(event))
|
|||||||
void MyFrame::OnCheck(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnCheck(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if(wxGetApp().GetDialer()->IsOnline())
|
if(wxGetApp().GetDialer()->IsOnline())
|
||||||
|
{
|
||||||
wxLogMessage(wxT("Network is online."));
|
wxLogMessage(wxT("Network is online."));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage(wxT("Network is offline."));
|
wxLogMessage(wxT("Network is offline."));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnEnumISPs(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnEnumISPs(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
@@ -627,10 +627,14 @@ void MyFrame::OnKill(wxCommandEvent& WXUNUSED(event))
|
|||||||
if ( sig == 0 )
|
if ( sig == 0 )
|
||||||
{
|
{
|
||||||
if ( wxProcess::Exists(pid) )
|
if ( wxProcess::Exists(pid) )
|
||||||
|
{
|
||||||
wxLogStatus(_T("Process %ld is running."), pid);
|
wxLogStatus(_T("Process %ld is running."), pid);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogStatus(_T("No process with pid = %ld."), pid);
|
wxLogStatus(_T("No process with pid = %ld."), pid);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else // not SIGNONE
|
else // not SIGNONE
|
||||||
{
|
{
|
||||||
wxKillError rc = wxProcess::Kill(pid, (wxSignal)sig);
|
wxKillError rc = wxProcess::Kill(pid, (wxSignal)sig);
|
||||||
@@ -965,8 +969,10 @@ void MyFrame::OnOpenURL(wxCommandEvent& WXUNUSED(event))
|
|||||||
s_url = filename;
|
s_url = filename;
|
||||||
|
|
||||||
if ( !wxLaunchDefaultBrowser(s_url) )
|
if ( !wxLaunchDefaultBrowser(s_url) )
|
||||||
|
{
|
||||||
wxLogError(_T("Failed to open URL \"%s\""), s_url.c_str());
|
wxLogError(_T("Failed to open URL \"%s\""), s_url.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// DDE stuff
|
// DDE stuff
|
||||||
|
@@ -541,8 +541,10 @@ void MyFrame::OnLboxSelect(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !s.empty() )
|
if ( !s.empty() )
|
||||||
|
{
|
||||||
wxLogMessage(_T("Selected items: %s"), s.c_str());
|
wxLogMessage(_T("Selected items: %s"), s.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
SetStatusText(wxString::Format(
|
SetStatusText(wxString::Format(
|
||||||
|
@@ -82,7 +82,9 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
#if wxUSE_LIBPNG
|
#if wxUSE_LIBPNG
|
||||||
if ( !image.SaveFile( dir + _T("test.png"), wxBITMAP_TYPE_PNG ))
|
if ( !image.SaveFile( dir + _T("test.png"), wxBITMAP_TYPE_PNG ))
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't save file"));
|
wxLogError(wxT("Can't save file"));
|
||||||
|
}
|
||||||
|
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
@@ -92,14 +94,22 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
|||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.png")) )
|
if ( !image.LoadFile( dir + _T("horse.png")) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load PNG image"));
|
wxLogError(wxT("Can't load PNG image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_png = wxBitmap( image );
|
my_horse_png = wxBitmap( image );
|
||||||
|
}
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("toucan.png")) )
|
if ( !image.LoadFile( dir + _T("toucan.png")) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load PNG image"));
|
wxLogError(wxT("Can't load PNG image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_toucan = wxBitmap(image);
|
my_toucan = wxBitmap(image);
|
||||||
|
}
|
||||||
|
|
||||||
my_toucan_flipped_horiz = wxBitmap(image.Mirror(true));
|
my_toucan_flipped_horiz = wxBitmap(image.Mirror(true));
|
||||||
my_toucan_flipped_vert = wxBitmap(image.Mirror(false));
|
my_toucan_flipped_vert = wxBitmap(image.Mirror(false));
|
||||||
@@ -116,7 +126,9 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
|||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.jpg")) )
|
if ( !image.LoadFile( dir + _T("horse.jpg")) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load JPG image"));
|
wxLogError(wxT("Can't load JPG image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
my_horse_jpeg = wxBitmap( image );
|
my_horse_jpeg = wxBitmap( image );
|
||||||
@@ -129,87 +141,129 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("cmyk.jpg")) )
|
if ( !image.LoadFile( dir + _T("cmyk.jpg")) )
|
||||||
|
{
|
||||||
wxLogError(_T("Can't load CMYK JPG image"));
|
wxLogError(_T("Can't load CMYK JPG image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_cmyk_jpeg = wxBitmap(image);
|
my_cmyk_jpeg = wxBitmap(image);
|
||||||
|
}
|
||||||
#endif // wxUSE_LIBJPEG
|
#endif // wxUSE_LIBJPEG
|
||||||
|
|
||||||
#if wxUSE_GIF
|
#if wxUSE_GIF
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.gif" )) )
|
if ( !image.LoadFile( dir + _T("horse.gif" )) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load GIF image"));
|
wxLogError(wxT("Can't load GIF image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_gif = wxBitmap( image );
|
my_horse_gif = wxBitmap( image );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_PCX
|
#if wxUSE_PCX
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.pcx"), wxBITMAP_TYPE_PCX ) )
|
if ( !image.LoadFile( dir + _T("horse.pcx"), wxBITMAP_TYPE_PCX ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load PCX image"));
|
wxLogError(wxT("Can't load PCX image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_pcx = wxBitmap( image );
|
my_horse_pcx = wxBitmap( image );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.bmp"), wxBITMAP_TYPE_BMP ) )
|
if ( !image.LoadFile( dir + _T("horse.bmp"), wxBITMAP_TYPE_BMP ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load BMP image"));
|
wxLogError(wxT("Can't load BMP image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_bmp = wxBitmap( image );
|
my_horse_bmp = wxBitmap( image );
|
||||||
|
}
|
||||||
|
|
||||||
#if wxUSE_XPM
|
#if wxUSE_XPM
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.xpm"), wxBITMAP_TYPE_XPM ) )
|
if ( !image.LoadFile( dir + _T("horse.xpm"), wxBITMAP_TYPE_XPM ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load XPM image"));
|
wxLogError(wxT("Can't load XPM image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_xpm = wxBitmap( image );
|
my_horse_xpm = wxBitmap( image );
|
||||||
|
}
|
||||||
|
|
||||||
if ( !image.SaveFile( dir + _T("test.xpm"), wxBITMAP_TYPE_XPM ))
|
if ( !image.SaveFile( dir + _T("test.xpm"), wxBITMAP_TYPE_XPM ))
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't save file"));
|
wxLogError(wxT("Can't save file"));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_PNM
|
#if wxUSE_PNM
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.pnm"), wxBITMAP_TYPE_PNM ) )
|
if ( !image.LoadFile( dir + _T("horse.pnm"), wxBITMAP_TYPE_PNM ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load PNM image"));
|
wxLogError(wxT("Can't load PNM image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_pnm = wxBitmap( image );
|
my_horse_pnm = wxBitmap( image );
|
||||||
|
}
|
||||||
|
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse_ag.pnm"), wxBITMAP_TYPE_PNM ) )
|
if ( !image.LoadFile( dir + _T("horse_ag.pnm"), wxBITMAP_TYPE_PNM ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load PNM image"));
|
wxLogError(wxT("Can't load PNM image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_asciigrey_pnm = wxBitmap( image );
|
my_horse_asciigrey_pnm = wxBitmap( image );
|
||||||
|
}
|
||||||
|
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse_rg.pnm"), wxBITMAP_TYPE_PNM ) )
|
if ( !image.LoadFile( dir + _T("horse_rg.pnm"), wxBITMAP_TYPE_PNM ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load PNM image"));
|
wxLogError(wxT("Can't load PNM image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_rawgrey_pnm = wxBitmap( image );
|
my_horse_rawgrey_pnm = wxBitmap( image );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_LIBTIFF
|
#if wxUSE_LIBTIFF
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.tif"), wxBITMAP_TYPE_TIF ) )
|
if ( !image.LoadFile( dir + _T("horse.tif"), wxBITMAP_TYPE_TIF ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load TIFF image"));
|
wxLogError(wxT("Can't load TIFF image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_tiff = wxBitmap( image );
|
my_horse_tiff = wxBitmap( image );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_LIBTIFF
|
#if wxUSE_LIBTIFF
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.tga"), wxBITMAP_TYPE_TGA ) )
|
if ( !image.LoadFile( dir + _T("horse.tga"), wxBITMAP_TYPE_TGA ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load TGA image"));
|
wxLogError(wxT("Can't load TGA image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_tga = wxBitmap( image );
|
my_horse_tga = wxBitmap( image );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CreateAntiAliasedBitmap();
|
CreateAntiAliasedBitmap();
|
||||||
@@ -225,28 +279,42 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
|||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.ico"), wxBITMAP_TYPE_ICO, 0 ) )
|
if ( !image.LoadFile( dir + _T("horse.ico"), wxBITMAP_TYPE_ICO, 0 ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load first ICO image"));
|
wxLogError(wxT("Can't load first ICO image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_ico32 = wxBitmap( image );
|
my_horse_ico32 = wxBitmap( image );
|
||||||
|
}
|
||||||
|
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.ico"), wxBITMAP_TYPE_ICO, 1 ) )
|
if ( !image.LoadFile( dir + _T("horse.ico"), wxBITMAP_TYPE_ICO, 1 ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load second ICO image"));
|
wxLogError(wxT("Can't load second ICO image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_ico16 = wxBitmap( image );
|
my_horse_ico16 = wxBitmap( image );
|
||||||
|
}
|
||||||
|
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.ico") ) )
|
if ( !image.LoadFile( dir + _T("horse.ico") ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load best ICO image"));
|
wxLogError(wxT("Can't load best ICO image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_ico = wxBitmap( image );
|
my_horse_ico = wxBitmap( image );
|
||||||
|
}
|
||||||
|
|
||||||
image.Destroy();
|
image.Destroy();
|
||||||
|
|
||||||
if ( !image.LoadFile( dir + _T("horse.cur"), wxBITMAP_TYPE_CUR ) )
|
if ( !image.LoadFile( dir + _T("horse.cur"), wxBITMAP_TYPE_CUR ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load best ICO image"));
|
wxLogError(wxT("Can't load best ICO image"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
my_horse_cur = wxBitmap( image );
|
my_horse_cur = wxBitmap( image );
|
||||||
@@ -256,9 +324,13 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
m_ani_images = wxImage::GetImageCount ( dir + _T("horse3.ani"), wxBITMAP_TYPE_ANI );
|
m_ani_images = wxImage::GetImageCount ( dir + _T("horse3.ani"), wxBITMAP_TYPE_ANI );
|
||||||
if (m_ani_images==0)
|
if (m_ani_images==0)
|
||||||
|
{
|
||||||
wxLogError(wxT("No ANI-format images found"));
|
wxLogError(wxT("No ANI-format images found"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_ani = new wxBitmap [m_ani_images];
|
my_horse_ani = new wxBitmap [m_ani_images];
|
||||||
|
}
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i < m_ani_images; i++)
|
for (i=0; i < m_ani_images; i++)
|
||||||
@@ -286,15 +358,21 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
|||||||
size_t dataSize = (size_t)len;
|
size_t dataSize = (size_t)len;
|
||||||
void *data = malloc(dataSize);
|
void *data = malloc(dataSize);
|
||||||
if ( file.Read(data, dataSize) != len )
|
if ( file.Read(data, dataSize) != len )
|
||||||
|
{
|
||||||
wxLogError(_T("Reading bitmap file failed"));
|
wxLogError(_T("Reading bitmap file failed"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxMemoryInputStream mis(data, dataSize);
|
wxMemoryInputStream mis(data, dataSize);
|
||||||
if ( !image.LoadFile(mis) )
|
if ( !image.LoadFile(mis) )
|
||||||
|
{
|
||||||
wxLogError(wxT("Can't load BMP image from stream"));
|
wxLogError(wxT("Can't load BMP image from stream"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
my_horse_bmp2 = wxBitmap( image );
|
my_horse_bmp2 = wxBitmap( image );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
free(data);
|
free(data);
|
||||||
}
|
}
|
||||||
|
@@ -245,8 +245,10 @@ bool MyApp::OnInit()
|
|||||||
// Initialize the catalogs we'll be using
|
// Initialize the catalogs we'll be using
|
||||||
const wxLanguageInfo* pInfo = wxLocale::GetLanguageInfo(m_lang);
|
const wxLanguageInfo* pInfo = wxLocale::GetLanguageInfo(m_lang);
|
||||||
if (!m_locale.AddCatalog("internat"))
|
if (!m_locale.AddCatalog("internat"))
|
||||||
|
{
|
||||||
wxLogError(_("Couldn't find/load the 'internat' catalog for locale '%s'."),
|
wxLogError(_("Couldn't find/load the 'internat' catalog for locale '%s'."),
|
||||||
pInfo ? pInfo->GetLocaleName() : _("unknown"));
|
pInfo ? pInfo->GetLocaleName() : _("unknown"));
|
||||||
|
}
|
||||||
|
|
||||||
// Now try to add wxstd.mo so that loading "NOTEXIST.ING" file will produce
|
// Now try to add wxstd.mo so that loading "NOTEXIST.ING" file will produce
|
||||||
// a localized error message:
|
// a localized error message:
|
||||||
@@ -427,10 +429,14 @@ void MyFrame::OnTestLocaleAvail(wxCommandEvent& WXUNUSED(event))
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( wxLocale::IsAvailable(info->Language) )
|
if ( wxLocale::IsAvailable(info->Language) )
|
||||||
|
{
|
||||||
wxLogMessage(_("Locale \"%s\" is available."), s_locale.c_str());
|
wxLogMessage(_("Locale \"%s\" is available."), s_locale.c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogWarning(_("Locale \"%s\" is not available."), s_locale.c_str());
|
wxLogWarning(_("Locale \"%s\" is not available."), s_locale.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
@@ -319,7 +319,9 @@ bool MyConnection::DoExecute(const void *data, size_t size, wxIPCFormat format)
|
|||||||
Log("Execute", wxEmptyString, wxEmptyString, data, size, format);
|
Log("Execute", wxEmptyString, wxEmptyString, data, size, format);
|
||||||
bool retval = wxConnection::DoExecute(data, size, format);
|
bool retval = wxConnection::DoExecute(data, size, format);
|
||||||
if (!retval)
|
if (!retval)
|
||||||
|
{
|
||||||
wxLogMessage("Execute failed!");
|
wxLogMessage("Execute failed!");
|
||||||
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -376,8 +376,10 @@ bool BenchConnection::OnPoke(const wxString& topic,
|
|||||||
if ( m_advise )
|
if ( m_advise )
|
||||||
{
|
{
|
||||||
if ( !Advise(item, m_item) )
|
if ( !Advise(item, m_item) )
|
||||||
|
{
|
||||||
wxLogMessage("Failed to advise client about the change.");
|
wxLogMessage("Failed to advise client about the change.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -434,7 +434,9 @@ bool MyConnection::DoExecute(const void *data, size_t size, wxIPCFormat format)
|
|||||||
Log(_T("Execute"), wxEmptyString, wxEmptyString, data, size, format);
|
Log(_T("Execute"), wxEmptyString, wxEmptyString, data, size, format);
|
||||||
bool retval = wxConnection::DoExecute(data, size, format);
|
bool retval = wxConnection::DoExecute(data, size, format);
|
||||||
if (!retval)
|
if (!retval)
|
||||||
|
{
|
||||||
wxLogMessage(_T("Execute failed!"));
|
wxLogMessage(_T("Execute failed!"));
|
||||||
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -731,8 +731,10 @@ void MyFrame::OnSetColOrder(wxCommandEvent& WXUNUSED(event))
|
|||||||
order[1] = 0;
|
order[1] = 0;
|
||||||
order[2] = 1;
|
order[2] = 1;
|
||||||
if ( m_listCtrl->SetColumnsOrder(order) )
|
if ( m_listCtrl->SetColumnsOrder(order) )
|
||||||
|
{
|
||||||
wxLogMessage("Column order set to %s", DumpIntArray(order));
|
wxLogMessage("Column order set to %s", DumpIntArray(order));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnGetColOrder(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnGetColOrder(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
@@ -355,10 +355,14 @@ void MyFrame::OnPrint(wxCommandEvent& WXUNUSED(event))
|
|||||||
if (!printer.Print(this, &printout, true /*prompt*/))
|
if (!printer.Print(this, &printout, true /*prompt*/))
|
||||||
{
|
{
|
||||||
if (wxPrinter::GetLastError() == wxPRINTER_ERROR)
|
if (wxPrinter::GetLastError() == wxPRINTER_ERROR)
|
||||||
|
{
|
||||||
wxLogError(_T("There was a problem printing. Perhaps your current printer is not set correctly?"));
|
wxLogError(_T("There was a problem printing. Perhaps your current printer is not set correctly?"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage(_T("You canceled printing"));
|
wxLogMessage(_T("You canceled printing"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
(*g_printData) = printer.GetPrintDialogData().GetPrintData();
|
(*g_printData) = printer.GetPrintDialogData().GetPrintData();
|
||||||
|
@@ -59,11 +59,15 @@ void MyFrame::OnPropertyGridChange(wxPropertyGridEvent &event)
|
|||||||
wxPGProperty* p = event.GetProperty();
|
wxPGProperty* p = event.GetProperty();
|
||||||
|
|
||||||
if ( p )
|
if ( p )
|
||||||
|
{
|
||||||
wxLogVerbose("OnPropertyGridChange(%s, value=%s)",
|
wxLogVerbose("OnPropertyGridChange(%s, value=%s)",
|
||||||
p->GetName().c_str(), p->GetValueAsString().c_str());
|
p->GetName().c_str(), p->GetValueAsString().c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogVerbose("OnPropertyGridChange(NULL)");
|
wxLogVerbose("OnPropertyGridChange(NULL)");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnPropertyGridChanging(wxPropertyGridEvent &event)
|
void MyFrame::OnPropertyGridChanging(wxPropertyGridEvent &event)
|
||||||
{
|
{
|
||||||
|
@@ -614,7 +614,9 @@ EventWorker::OnSocketEvent(wxSocketEvent& pEvent) {
|
|||||||
//wxLogMessage(wxT("EventWorker: got connection"));
|
//wxLogMessage(wxT("EventWorker: got connection"));
|
||||||
wxLogMessage(wxT("%s: starting writing message (2 bytes for signature and %d bytes of data to write)"),CreateIdent(m_localaddr).c_str(),m_outsize-2);
|
wxLogMessage(wxT("%s: starting writing message (2 bytes for signature and %d bytes of data to write)"),CreateIdent(m_localaddr).c_str(),m_outsize-2);
|
||||||
if (!m_clientSocket->GetLocal(m_localaddr))
|
if (!m_clientSocket->GetLocal(m_localaddr))
|
||||||
|
{
|
||||||
wxLogError(_("Cannot get peer data for socket %p"),m_clientSocket);
|
wxLogError(_("Cannot get peer data for socket %p"),m_clientSocket);
|
||||||
|
}
|
||||||
m_currentType = WorkerEvent::SENDING;
|
m_currentType = WorkerEvent::SENDING;
|
||||||
wxLogDebug(wxT("%s: CONNECTING"),CreateIdent(m_localaddr).c_str());
|
wxLogDebug(wxT("%s: CONNECTING"),CreateIdent(m_localaddr).c_str());
|
||||||
SendEvent(false);
|
SendEvent(false);
|
||||||
|
@@ -618,7 +618,9 @@ void MyFrame::OnTestURL(wxCommandEvent& WXUNUSED(event))
|
|||||||
// Get the data
|
// Get the data
|
||||||
wxStringOutputStream sout;
|
wxStringOutputStream sout;
|
||||||
if ( data->Read(sout).GetLastError() != wxSTREAM_EOF )
|
if ( data->Read(sout).GetLastError() != wxSTREAM_EOF )
|
||||||
|
{
|
||||||
wxLogError("Error reading the input stream.");
|
wxLogError("Error reading the input stream.");
|
||||||
|
}
|
||||||
|
|
||||||
wxLogMessage("Text retrieved from URL \"%s\" follows:\n%s",
|
wxLogMessage("Text retrieved from URL \"%s\" follows:\n%s",
|
||||||
urlname, sout.GetString());
|
urlname, sout.GetString());
|
||||||
|
@@ -220,10 +220,14 @@ MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, wxID_ANY,
|
|||||||
|
|
||||||
IPaddress addrReal;
|
IPaddress addrReal;
|
||||||
if ( !m_server->GetLocal(addrReal) )
|
if ( !m_server->GetLocal(addrReal) )
|
||||||
|
{
|
||||||
wxLogMessage("ERROR: couldn't get the address we bound to");
|
wxLogMessage("ERROR: couldn't get the address we bound to");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage("Server listening at %s:%u",
|
wxLogMessage("Server listening at %s:%u",
|
||||||
addrReal.IPAddress(), addrReal.Service());
|
addrReal.IPAddress(), addrReal.Service());
|
||||||
|
}
|
||||||
|
|
||||||
// Setup the event handler and subscribe to connection events
|
// Setup the event handler and subscribe to connection events
|
||||||
m_server->SetEventHandler(*this, SERVER_ID);
|
m_server->SetEventHandler(*this, SERVER_ID);
|
||||||
@@ -387,11 +391,15 @@ void MyFrame::OnServerEvent(wxSocketEvent& event)
|
|||||||
{
|
{
|
||||||
IPaddress addr;
|
IPaddress addr;
|
||||||
if ( !sock->GetPeer(addr) )
|
if ( !sock->GetPeer(addr) )
|
||||||
|
{
|
||||||
wxLogMessage("New connection from unknown client accepted.");
|
wxLogMessage("New connection from unknown client accepted.");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage("New client connection from %s:%u accepted",
|
wxLogMessage("New client connection from %s:%u accepted",
|
||||||
addr.IPAddress(), addr.Service());
|
addr.IPAddress(), addr.Service());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLogMessage("Error: couldn't accept a new connection");
|
wxLogMessage("Error: couldn't accept a new connection");
|
||||||
|
@@ -100,10 +100,14 @@ private:
|
|||||||
void DoNavigate(int flags)
|
void DoNavigate(int flags)
|
||||||
{
|
{
|
||||||
if ( m_panel->NavigateIn(flags) )
|
if ( m_panel->NavigateIn(flags) )
|
||||||
|
{
|
||||||
wxLogStatus(this, _T("Navigation event processed"));
|
wxLogStatus(this, _T("Navigation event processed"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogStatus(this, _T("Navigation event ignored"));
|
wxLogStatus(this, _T("Navigation event ignored"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wxPanel *m_panel;
|
wxPanel *m_panel;
|
||||||
|
|
||||||
|
@@ -223,26 +223,34 @@ public:
|
|||||||
void OnScrollLineDown(wxCommandEvent& WXUNUSED(event))
|
void OnScrollLineDown(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if ( !m_panel->m_textrich->LineDown() )
|
if ( !m_panel->m_textrich->LineDown() )
|
||||||
|
{
|
||||||
wxLogMessage(_T("Already at the bottom"));
|
wxLogMessage(_T("Already at the bottom"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OnScrollLineUp(wxCommandEvent& WXUNUSED(event))
|
void OnScrollLineUp(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if ( !m_panel->m_textrich->LineUp() )
|
if ( !m_panel->m_textrich->LineUp() )
|
||||||
|
{
|
||||||
wxLogMessage(_T("Already at the top"));
|
wxLogMessage(_T("Already at the top"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OnScrollPageDown(wxCommandEvent& WXUNUSED(event))
|
void OnScrollPageDown(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if ( !m_panel->m_textrich->PageDown() )
|
if ( !m_panel->m_textrich->PageDown() )
|
||||||
|
{
|
||||||
wxLogMessage(_T("Already at the bottom"));
|
wxLogMessage(_T("Already at the bottom"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OnScrollPageUp(wxCommandEvent& WXUNUSED(event))
|
void OnScrollPageUp(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if ( !m_panel->m_textrich->PageUp() )
|
if ( !m_panel->m_textrich->PageUp() )
|
||||||
|
{
|
||||||
wxLogMessage(_T("Already at the top"));
|
wxLogMessage(_T("Already at the top"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OnGetLine(wxCommandEvent& WXUNUSED(event))
|
void OnGetLine(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
@@ -788,7 +796,9 @@ void MyTextCtrl::OnMouseEvent(wxMouseEvent& ev)
|
|||||||
void MyTextCtrl::OnSetFocus(wxFocusEvent& event)
|
void MyTextCtrl::OnSetFocus(wxFocusEvent& event)
|
||||||
{
|
{
|
||||||
if ( ms_logFocus )
|
if ( ms_logFocus )
|
||||||
|
{
|
||||||
wxLogMessage( wxT("%p got focus."), this);
|
wxLogMessage( wxT("%p got focus."), this);
|
||||||
|
}
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
@@ -796,7 +806,9 @@ void MyTextCtrl::OnSetFocus(wxFocusEvent& event)
|
|||||||
void MyTextCtrl::OnKillFocus(wxFocusEvent& event)
|
void MyTextCtrl::OnKillFocus(wxFocusEvent& event)
|
||||||
{
|
{
|
||||||
if ( ms_logFocus )
|
if ( ms_logFocus )
|
||||||
|
{
|
||||||
wxLogMessage( wxT("%p lost focus"), this);
|
wxLogMessage( wxT("%p lost focus"), this);
|
||||||
|
}
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
@@ -1491,10 +1503,14 @@ void MyFrame::OnFileSave(wxCommandEvent& WXUNUSED(event))
|
|||||||
void MyFrame::OnFileLoad(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnFileLoad(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if ( m_panel->m_textrich->LoadFile(_T("dummy.txt")) )
|
if ( m_panel->m_textrich->LoadFile(_T("dummy.txt")) )
|
||||||
|
{
|
||||||
wxLogStatus(this, _T("Successfully loaded file"));
|
wxLogStatus(this, _T("Successfully loaded file"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogStatus(this, _T("Couldn't load the file"));
|
wxLogStatus(this, _T("Couldn't load the file"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnRichTextTest(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnRichTextTest(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
@@ -802,11 +802,15 @@ void MyFrame::DoShowFirstOrLast(TreeFunc0_t pfn, const wxString& label)
|
|||||||
const wxTreeItemId item = (m_treeCtrl->*pfn)();
|
const wxTreeItemId item = (m_treeCtrl->*pfn)();
|
||||||
|
|
||||||
if ( !item.IsOk() )
|
if ( !item.IsOk() )
|
||||||
|
{
|
||||||
wxLogMessage("There is no %s item", label);
|
wxLogMessage("There is no %s item", label);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage("The %s item is \"%s\"",
|
wxLogMessage("The %s item is \"%s\"",
|
||||||
label, m_treeCtrl->GetItemText(item));
|
label, m_treeCtrl->GetItemText(item));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::DoShowRelativeItem(TreeFunc1_t pfn, const wxString& label)
|
void MyFrame::DoShowRelativeItem(TreeFunc1_t pfn, const wxString& label)
|
||||||
{
|
{
|
||||||
@@ -825,11 +829,15 @@ void MyFrame::DoShowRelativeItem(TreeFunc1_t pfn, const wxString& label)
|
|||||||
wxTreeItemId new_item = (m_treeCtrl->*pfn)(item);
|
wxTreeItemId new_item = (m_treeCtrl->*pfn)(item);
|
||||||
|
|
||||||
if ( !new_item.IsOk() )
|
if ( !new_item.IsOk() )
|
||||||
|
{
|
||||||
wxLogMessage("There is no %s item", label);
|
wxLogMessage("There is no %s item", label);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage("The %s item is \"%s\"",
|
wxLogMessage("The %s item is \"%s\"",
|
||||||
label, m_treeCtrl->GetItemText(new_item));
|
label, m_treeCtrl->GetItemText(new_item));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnScrollTo(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnScrollTo(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
@@ -1588,13 +1596,17 @@ void MyTreeCtrl::OnRMouseDClick(wxMouseEvent& event)
|
|||||||
{
|
{
|
||||||
wxTreeItemId id = HitTest(event.GetPosition());
|
wxTreeItemId id = HitTest(event.GetPosition());
|
||||||
if ( !id )
|
if ( !id )
|
||||||
|
{
|
||||||
wxLogMessage(wxT("No item under mouse"));
|
wxLogMessage(wxT("No item under mouse"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MyTreeItemData *item = (MyTreeItemData *)GetItemData(id);
|
MyTreeItemData *item = (MyTreeItemData *)GetItemData(id);
|
||||||
if ( item )
|
if ( item )
|
||||||
|
{
|
||||||
wxLogMessage(wxT("Item '%s' under mouse"), item->GetDesc());
|
wxLogMessage(wxT("Item '%s' under mouse"), item->GetDesc());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
@@ -803,10 +803,14 @@ void BitmapComboBoxWidgetsPage::OnComboText(wxCommandEvent& event)
|
|||||||
_T("event and combobox values should be the same") );
|
_T("event and combobox values should be the same") );
|
||||||
|
|
||||||
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
||||||
|
{
|
||||||
wxLogMessage(_T("BitmapCombobox enter pressed (now '%s')"), s.c_str());
|
wxLogMessage(_T("BitmapCombobox enter pressed (now '%s')"), s.c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage(_T("BitmapCombobox text changed (now '%s')"), s.c_str());
|
wxLogMessage(_T("BitmapCombobox text changed (now '%s')"), s.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void BitmapComboBoxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
void BitmapComboBoxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
|
@@ -618,10 +618,14 @@ void ComboboxWidgetsPage::OnComboText(wxCommandEvent& event)
|
|||||||
_T("event and combobox values should be the same") );
|
_T("event and combobox values should be the same") );
|
||||||
|
|
||||||
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
||||||
|
{
|
||||||
wxLogMessage(_T("Combobox enter pressed (now '%s')"), s.c_str());
|
wxLogMessage(_T("Combobox enter pressed (now '%s')"), s.c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage(_T("Combobox text changed (now '%s')"), s.c_str());
|
wxLogMessage(_T("Combobox text changed (now '%s')"), s.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ComboboxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
void ComboboxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
|
@@ -593,10 +593,14 @@ void ListboxWidgetsPage::OnListbox(wxCommandEvent& event)
|
|||||||
m_textDelete->SetValue(wxString::Format(_T("%ld"), sel));
|
m_textDelete->SetValue(wxString::Format(_T("%ld"), sel));
|
||||||
|
|
||||||
if (event.IsSelection())
|
if (event.IsSelection())
|
||||||
|
{
|
||||||
wxLogMessage(_T("Listbox item %ld selected"), sel);
|
wxLogMessage(_T("Listbox item %ld selected"), sel);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage(_T("Listbox item %ld deselected"), sel);
|
wxLogMessage(_T("Listbox item %ld deselected"), sel);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ListboxWidgetsPage::OnListboxDClick(wxCommandEvent& event)
|
void ListboxWidgetsPage::OnListboxDClick(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
|
@@ -761,10 +761,14 @@ void ODComboboxWidgetsPage::OnComboText(wxCommandEvent& event)
|
|||||||
_T("event and combobox values should be the same") );
|
_T("event and combobox values should be the same") );
|
||||||
|
|
||||||
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
||||||
|
{
|
||||||
wxLogMessage(_T("OwnerDrawnCombobox enter pressed (now '%s')"), s.c_str());
|
wxLogMessage(_T("OwnerDrawnCombobox enter pressed (now '%s')"), s.c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage(_T("OwnerDrawnCombobox text changed (now '%s')"), s.c_str());
|
wxLogMessage(_T("OwnerDrawnCombobox text changed (now '%s')"), s.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ODComboboxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
void ODComboboxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
|
@@ -541,8 +541,12 @@ void StaticWidgetsPage::OnButtonLabelWithMarkupText(wxCommandEvent& WXUNUSED(eve
|
|||||||
void StaticWidgetsPage::OnMouseEvent(wxMouseEvent& event)
|
void StaticWidgetsPage::OnMouseEvent(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
if ( event.GetEventObject() == m_statText )
|
if ( event.GetEventObject() == m_statText )
|
||||||
|
{
|
||||||
wxLogMessage("Clicked on static text");
|
wxLogMessage("Clicked on static text");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage("Clicked on static box");
|
wxLogMessage("Clicked on static box");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -904,10 +904,14 @@ void WidgetsFrame::OnDisableAutoComplete(wxCommandEvent& WXUNUSED(event))
|
|||||||
wxCHECK_RET( entry, "menu item should be disabled" );
|
wxCHECK_RET( entry, "menu item should be disabled" );
|
||||||
|
|
||||||
if ( entry->AutoComplete(wxArrayString()) )
|
if ( entry->AutoComplete(wxArrayString()) )
|
||||||
|
{
|
||||||
wxLogMessage("Disabled auto completion.");
|
wxLogMessage("Disabled auto completion.");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage("AutoComplete() failed.");
|
wxLogMessage("AutoComplete() failed.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void WidgetsFrame::OnAutoCompleteFixed(wxCommandEvent& WXUNUSED(event))
|
void WidgetsFrame::OnAutoCompleteFixed(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
@@ -926,10 +930,14 @@ void WidgetsFrame::OnAutoCompleteFixed(wxCommandEvent& WXUNUSED(event))
|
|||||||
completion_choices.push_back("this string is for test");
|
completion_choices.push_back("this string is for test");
|
||||||
|
|
||||||
if ( entry->AutoComplete(completion_choices) )
|
if ( entry->AutoComplete(completion_choices) )
|
||||||
|
{
|
||||||
wxLogMessage("Enabled auto completion of a set of fixed strings.");
|
wxLogMessage("Enabled auto completion of a set of fixed strings.");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage("AutoComplete() failed.");
|
wxLogMessage("AutoComplete() failed.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void WidgetsFrame::OnAutoCompleteFilenames(wxCommandEvent& WXUNUSED(event))
|
void WidgetsFrame::OnAutoCompleteFilenames(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
@@ -937,10 +945,14 @@ void WidgetsFrame::OnAutoCompleteFilenames(wxCommandEvent& WXUNUSED(event))
|
|||||||
wxCHECK_RET( entry, "menu item should be disabled" );
|
wxCHECK_RET( entry, "menu item should be disabled" );
|
||||||
|
|
||||||
if ( entry->AutoCompleteFileNames() )
|
if ( entry->AutoCompleteFileNames() )
|
||||||
|
{
|
||||||
wxLogMessage("Enable auto completion of file names.");
|
wxLogMessage("Enable auto completion of file names.");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage("AutoCompleteFileNames() failed.");
|
wxLogMessage("AutoCompleteFileNames() failed.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void WidgetsFrame::OnSetHint(wxCommandEvent& WXUNUSED(event))
|
void WidgetsFrame::OnSetHint(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
@@ -956,10 +968,14 @@ void WidgetsFrame::OnSetHint(wxCommandEvent& WXUNUSED(event))
|
|||||||
s_hint = hint;
|
s_hint = hint;
|
||||||
|
|
||||||
if ( entry->SetHint(hint) )
|
if ( entry->SetHint(hint) )
|
||||||
|
{
|
||||||
wxLogMessage("Set hint to \"%s\".", hint);
|
wxLogMessage("Set hint to \"%s\".", hint);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogMessage("Text hints not supported.");
|
wxLogMessage("Text hints not supported.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif // wxUSE_MENUS
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
|
@@ -136,19 +136,27 @@ MyFrame::MyFrame(wxWindow* parent)
|
|||||||
void MyFrame::OnUnloadResourceMenuCommand(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnUnloadResourceMenuCommand(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if ( wxXmlResource::Get()->Unload(wxT("rc/basicdlg.xrc")) )
|
if ( wxXmlResource::Get()->Unload(wxT("rc/basicdlg.xrc")) )
|
||||||
|
{
|
||||||
wxLogMessage(_T("Basic dialog resource has now been unloaded, you ")
|
wxLogMessage(_T("Basic dialog resource has now been unloaded, you ")
|
||||||
_T("won't be able to use it before loading it again"));
|
_T("won't be able to use it before loading it again"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogWarning(_T("Failed to unload basic dialog resource"));
|
wxLogWarning(_T("Failed to unload basic dialog resource"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnReloadResourceMenuCommand(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnReloadResourceMenuCommand(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if ( wxXmlResource::Get()->Load(wxT("rc/basicdlg.xrc")) )
|
if ( wxXmlResource::Get()->Load(wxT("rc/basicdlg.xrc")) )
|
||||||
|
{
|
||||||
wxLogStatus(_T("Basic dialog resource has been loaded."));
|
wxLogStatus(_T("Basic dialog resource has been loaded."));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogError(_T("Failed to load basic dialog resource"));
|
wxLogError(_T("Failed to load basic dialog resource"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnExitToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnExitToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
@@ -479,9 +479,13 @@ void wxSplitPath(wxArrayString& aParts, const wxString& path)
|
|||||||
else if ( strCurrent == wxT("..") ) {
|
else if ( strCurrent == wxT("..") ) {
|
||||||
// go up one level
|
// go up one level
|
||||||
if ( aParts.size() == 0 )
|
if ( aParts.size() == 0 )
|
||||||
|
{
|
||||||
wxLogWarning(_("'%s' has extra '..', ignored."), path);
|
wxLogWarning(_("'%s' has extra '..', ignored."), path);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
aParts.erase(aParts.end() - 1);
|
aParts.erase(aParts.end() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
strCurrent.Empty();
|
strCurrent.Empty();
|
||||||
}
|
}
|
||||||
|
@@ -450,14 +450,17 @@ bool wxFile::Eof() const
|
|||||||
iRc = wxEof(m_fd);
|
iRc = wxEof(m_fd);
|
||||||
#endif // Windows/Unix
|
#endif // Windows/Unix
|
||||||
|
|
||||||
if ( iRc == 1)
|
if ( iRc == 0 )
|
||||||
{}
|
|
||||||
else if ( iRc == 0 )
|
|
||||||
return false;
|
return false;
|
||||||
else if ( iRc == wxInvalidOffset )
|
|
||||||
|
if ( iRc == wxInvalidOffset )
|
||||||
|
{
|
||||||
wxLogSysError(_("can't determine if the end of file is reached on descriptor %d"), m_fd);
|
wxLogSysError(_("can't determine if the end of file is reached on descriptor %d"), m_fd);
|
||||||
else
|
}
|
||||||
|
else if ( iRc != 1 )
|
||||||
|
{
|
||||||
wxFAIL_MSG(_T("invalid eof() return value."));
|
wxFAIL_MSG(_T("invalid eof() return value."));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -180,13 +180,17 @@ public:
|
|||||||
if ( m_hFile == INVALID_HANDLE_VALUE )
|
if ( m_hFile == INVALID_HANDLE_VALUE )
|
||||||
{
|
{
|
||||||
if ( mode == Read )
|
if ( mode == Read )
|
||||||
|
{
|
||||||
wxLogSysError(_("Failed to open '%s' for reading"),
|
wxLogSysError(_("Failed to open '%s' for reading"),
|
||||||
filename.c_str());
|
filename.c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogSysError(_("Failed to open '%s' for writing"),
|
wxLogSysError(_("Failed to open '%s' for writing"),
|
||||||
filename.c_str());
|
filename.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
~wxFileHandle()
|
~wxFileHandle()
|
||||||
{
|
{
|
||||||
|
@@ -1222,7 +1222,9 @@ bool wxICOHandler::SaveFile(wxImage *image,
|
|||||||
if ( !cStream.Ok() )
|
if ( !cStream.Ok() )
|
||||||
{
|
{
|
||||||
if ( verbose )
|
if ( verbose )
|
||||||
|
{
|
||||||
wxLogError(_("ICO: Error writing the image file!"));
|
wxLogError(_("ICO: Error writing the image file!"));
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif // 0
|
#endif // 0
|
||||||
|
@@ -1874,15 +1874,21 @@ size_t wxZipInputStream::OnSysRead(void *buffer, size_t size)
|
|||||||
m_lasterror = wxSTREAM_READ_ERROR;
|
m_lasterror = wxSTREAM_READ_ERROR;
|
||||||
|
|
||||||
if (m_entry.GetSize() != TellI())
|
if (m_entry.GetSize() != TellI())
|
||||||
|
{
|
||||||
wxLogError(_("reading zip stream (entry %s): bad length"),
|
wxLogError(_("reading zip stream (entry %s): bad length"),
|
||||||
m_entry.GetName().c_str());
|
m_entry.GetName().c_str());
|
||||||
|
}
|
||||||
else if (m_crcAccumulator != m_entry.GetCrc())
|
else if (m_crcAccumulator != m_entry.GetCrc())
|
||||||
|
{
|
||||||
wxLogError(_("reading zip stream (entry %s): bad crc"),
|
wxLogError(_("reading zip stream (entry %s): bad crc"),
|
||||||
m_entry.GetName().c_str());
|
m_entry.GetName().c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_lasterror = wxSTREAM_EOF;
|
m_lasterror = wxSTREAM_EOF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
@@ -28,8 +28,10 @@ wxMutex::wxMutex()
|
|||||||
wxMutex::~wxMutex()
|
wxMutex::~wxMutex()
|
||||||
{
|
{
|
||||||
if (m_locked)
|
if (m_locked)
|
||||||
|
{
|
||||||
wxLogDebug( "wxMutex warning: destroying a locked mutex (%d locks)", m_locked );
|
wxLogDebug( "wxMutex warning: destroying a locked mutex (%d locks)", m_locked );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wxMutexError wxMutex::Lock()
|
wxMutexError wxMutex::Lock()
|
||||||
{
|
{
|
||||||
|
@@ -66,7 +66,9 @@ wxMutex::wxMutex()
|
|||||||
wxMutex::~wxMutex()
|
wxMutex::~wxMutex()
|
||||||
{
|
{
|
||||||
if (m_locked > 0)
|
if (m_locked > 0)
|
||||||
|
{
|
||||||
wxLogDebug( "wxMutex warning: freeing a locked mutex (%d locks)\n", m_locked );
|
wxLogDebug( "wxMutex warning: freeing a locked mutex (%d locks)\n", m_locked );
|
||||||
|
}
|
||||||
delete p_internal;
|
delete p_internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1529,10 +1529,14 @@ void wxHtmlHelpWindow::OnToolbar(wxCommandEvent& event)
|
|||||||
if (m_Printer == NULL)
|
if (m_Printer == NULL)
|
||||||
m_Printer = new wxHtmlEasyPrinting(_("Help Printing"), this);
|
m_Printer = new wxHtmlEasyPrinting(_("Help Printing"), this);
|
||||||
if (!m_HtmlWin->GetOpenedPage())
|
if (!m_HtmlWin->GetOpenedPage())
|
||||||
|
{
|
||||||
wxLogWarning(_("Cannot print empty page."));
|
wxLogWarning(_("Cannot print empty page."));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_Printer->PrintFile(m_HtmlWin->GetOpenedPage());
|
m_Printer->PrintFile(m_HtmlWin->GetOpenedPage());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -543,8 +543,10 @@ void wxWindowMGL::Init()
|
|||||||
if ( !g_winMng )
|
if ( !g_winMng )
|
||||||
{
|
{
|
||||||
if ( !wxTheApp->SetDisplayMode(wxGetDefaultDisplayMode()) )
|
if ( !wxTheApp->SetDisplayMode(wxGetDefaultDisplayMode()) )
|
||||||
|
{
|
||||||
wxLogFatalError(_("Cannot initialize display."));
|
wxLogFatalError(_("Cannot initialize display."));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// mgl specific:
|
// mgl specific:
|
||||||
m_wnd = NULL;
|
m_wnd = NULL;
|
||||||
|
@@ -307,7 +307,9 @@ bool wxShell(const wxString& command /*=wxEmptyString*/)
|
|||||||
int result = system(command);
|
int result = system(command);
|
||||||
|
|
||||||
if (result == -1)
|
if (result == -1)
|
||||||
|
{
|
||||||
wxLogSysError(_("can't execute '%s'"), command.c_str());
|
wxLogSysError(_("can't execute '%s'"), command.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
return result == 0;
|
return result == 0;
|
||||||
}
|
}
|
||||||
@@ -407,7 +409,9 @@ bool wxRedirectableFd::Reopen(const wxString& name, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
|
{
|
||||||
wxLogSysError(_("error opening '%s'"), name.c_str());
|
wxLogSysError(_("error opening '%s'"), name.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -466,7 +470,9 @@ long wxExecute(wxChar **argv, int flags, wxProcess *process)
|
|||||||
int result = spawnvp(mode, argv[0], argv);
|
int result = spawnvp(mode, argv[0], argv);
|
||||||
|
|
||||||
if (result == -1)
|
if (result == -1)
|
||||||
|
{
|
||||||
wxLogSysError(_("can't execute '%s'"), argv[0]);
|
wxLogSysError(_("can't execute '%s'"), argv[0]);
|
||||||
|
}
|
||||||
|
|
||||||
#if wxUSE_STREAMS
|
#if wxUSE_STREAMS
|
||||||
if (redirect)
|
if (redirect)
|
||||||
|
@@ -90,7 +90,9 @@ bool wxOpenClipboard()
|
|||||||
gs_wxClipboardIsOpen = ::OpenClipboard((HWND)win->GetHWND()) != 0;
|
gs_wxClipboardIsOpen = ::OpenClipboard((HWND)win->GetHWND()) != 0;
|
||||||
|
|
||||||
if ( !gs_wxClipboardIsOpen )
|
if ( !gs_wxClipboardIsOpen )
|
||||||
|
{
|
||||||
wxLogSysError(_("Failed to open the clipboard."));
|
wxLogSysError(_("Failed to open the clipboard."));
|
||||||
|
}
|
||||||
|
|
||||||
return gs_wxClipboardIsOpen;
|
return gs_wxClipboardIsOpen;
|
||||||
}
|
}
|
||||||
|
@@ -152,7 +152,9 @@ int wxColourDialog::ShowModal()
|
|||||||
// occurred
|
// occurred
|
||||||
const DWORD err = CommDlgExtendedError();
|
const DWORD err = CommDlgExtendedError();
|
||||||
if ( err )
|
if ( err )
|
||||||
|
{
|
||||||
wxLogError(_("Colour selection dialog failed with error %0lx."), err);
|
wxLogError(_("Colour selection dialog failed with error %0lx."), err);
|
||||||
|
}
|
||||||
|
|
||||||
return wxID_CANCEL;
|
return wxID_CANCEL;
|
||||||
}
|
}
|
||||||
|
@@ -183,14 +183,18 @@ public:
|
|||||||
{
|
{
|
||||||
m_modeOld = ::SetStretchBltMode(m_hdc, COLORONCOLOR);
|
m_modeOld = ::SetStretchBltMode(m_hdc, COLORONCOLOR);
|
||||||
if ( !m_modeOld )
|
if ( !m_modeOld )
|
||||||
|
{
|
||||||
wxLogLastError(_T("SetStretchBltMode"));
|
wxLogLastError(_T("SetStretchBltMode"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
~StretchBltModeChanger()
|
~StretchBltModeChanger()
|
||||||
{
|
{
|
||||||
if ( !::SetStretchBltMode(m_hdc, m_modeOld) )
|
if ( !::SetStretchBltMode(m_hdc, m_modeOld) )
|
||||||
|
{
|
||||||
wxLogLastError(_T("SetStretchBltMode"));
|
wxLogLastError(_T("SetStretchBltMode"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const HDC m_hdc;
|
const HDC m_hdc;
|
||||||
|
@@ -340,7 +340,9 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst)
|
|||||||
static_cast<DEVMODE *>(lockDevMode.Get())
|
static_cast<DEVMODE *>(lockDevMode.Get())
|
||||||
);
|
);
|
||||||
if ( !hDC )
|
if ( !hDC )
|
||||||
|
{
|
||||||
wxLogLastError(_T("CreateDC(printer)"));
|
wxLogLastError(_T("CreateDC(printer)"));
|
||||||
|
}
|
||||||
|
|
||||||
return (WXHDC) hDC;
|
return (WXHDC) hDC;
|
||||||
#endif // PostScript/Windows printing
|
#endif // PostScript/Windows printing
|
||||||
|
@@ -883,11 +883,15 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
|
|||||||
{
|
{
|
||||||
// can't pass a wxWCharBuffer through ( ... )
|
// can't pass a wxWCharBuffer through ( ... )
|
||||||
if ( async )
|
if ( async )
|
||||||
|
{
|
||||||
wxLogError(_("Failed to initiate dialup connection: %s"),
|
wxLogError(_("Failed to initiate dialup connection: %s"),
|
||||||
GetErrorString(dwRet).c_str());
|
GetErrorString(dwRet).c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogError(_("Failed to establish dialup connection: %s"),
|
wxLogError(_("Failed to establish dialup connection: %s"),
|
||||||
GetErrorString(dwRet).c_str());
|
GetErrorString(dwRet).c_str());
|
||||||
|
}
|
||||||
|
|
||||||
// we should still call RasHangUp() if we got a non 0 connection
|
// we should still call RasHangUp() if we got a non 0 connection
|
||||||
if ( ms_hRasConnection )
|
if ( ms_hRasConnection )
|
||||||
|
@@ -94,10 +94,12 @@ void wxEnhMetaFile::Init()
|
|||||||
{
|
{
|
||||||
m_hMF = (WXHANDLE)::GetEnhMetaFile(m_filename.fn_str());
|
m_hMF = (WXHANDLE)::GetEnhMetaFile(m_filename.fn_str());
|
||||||
if ( !m_hMF )
|
if ( !m_hMF )
|
||||||
|
{
|
||||||
wxLogSysError(_("Failed to load metafile from file \"%s\"."),
|
wxLogSysError(_("Failed to load metafile from file \"%s\"."),
|
||||||
m_filename.c_str());
|
m_filename.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void wxEnhMetaFile::Assign(const wxEnhMetaFile& mf)
|
void wxEnhMetaFile::Assign(const wxEnhMetaFile& mf)
|
||||||
{
|
{
|
||||||
|
@@ -117,9 +117,11 @@ wxGLContext::wxGLContext(wxGLCanvas *win, const wxGLContext* other)
|
|||||||
if ( other )
|
if ( other )
|
||||||
{
|
{
|
||||||
if ( !wglShareLists(other->m_glContext, m_glContext) )
|
if ( !wglShareLists(other->m_glContext, m_glContext) )
|
||||||
|
{
|
||||||
wxLogLastError(_T("wglShareLists"));
|
wxLogLastError(_T("wglShareLists"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wxGLContext::~wxGLContext()
|
wxGLContext::~wxGLContext()
|
||||||
{
|
{
|
||||||
|
@@ -350,7 +350,9 @@ bool wxIniConfig::DoWriteString(const wxString& szKey, const wxString& szValue)
|
|||||||
m_strLocalFilename.wx_str()) != 0;
|
m_strLocalFilename.wx_str()) != 0;
|
||||||
|
|
||||||
if ( !bOk )
|
if ( !bOk )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("WritePrivateProfileString"));
|
wxLogLastError(wxT("WritePrivateProfileString"));
|
||||||
|
}
|
||||||
|
|
||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
@@ -405,7 +407,9 @@ bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso)
|
|||||||
NULL, m_strLocalFilename.wx_str()) != 0;
|
NULL, m_strLocalFilename.wx_str()) != 0;
|
||||||
|
|
||||||
if ( !bOk )
|
if ( !bOk )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("WritePrivateProfileString"));
|
wxLogLastError(wxT("WritePrivateProfileString"));
|
||||||
|
}
|
||||||
|
|
||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
@@ -420,7 +424,9 @@ bool wxIniConfig::DeleteGroup(const wxString& szKey)
|
|||||||
NULL, m_strLocalFilename.wx_str()) != 0;
|
NULL, m_strLocalFilename.wx_str()) != 0;
|
||||||
|
|
||||||
if ( !bOk )
|
if ( !bOk )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("WritePrivateProfileString"));
|
wxLogLastError(wxT("WritePrivateProfileString"));
|
||||||
|
}
|
||||||
|
|
||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
|
@@ -362,8 +362,10 @@ void wxListBox::DoSetItemClientData(unsigned int n, void *clientData)
|
|||||||
wxT("invalid index in wxListBox::SetClientData") );
|
wxT("invalid index in wxListBox::SetClientData") );
|
||||||
|
|
||||||
if ( ListBox_SetItemData(GetHwnd(), n, clientData) == LB_ERR )
|
if ( ListBox_SetItemData(GetHwnd(), n, clientData) == LB_ERR )
|
||||||
|
{
|
||||||
wxLogDebug(wxT("LB_SETITEMDATA failed"));
|
wxLogDebug(wxT("LB_SETITEMDATA failed"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Return number of selections and an array of selected integers
|
// Return number of selections and an array of selected integers
|
||||||
int wxListBox::GetSelections(wxArrayInt& aSelections) const
|
int wxListBox::GetSelections(wxArrayInt& aSelections) const
|
||||||
|
@@ -1434,9 +1434,11 @@ void MDISetMenu(wxWindow *win, HMENU hmenuFrame, HMENU hmenuWindow)
|
|||||||
{
|
{
|
||||||
DWORD err = ::GetLastError();
|
DWORD err = ::GetLastError();
|
||||||
if ( err )
|
if ( err )
|
||||||
|
{
|
||||||
wxLogApiError(_T("SendMessage(WM_MDISETMENU)"), err);
|
wxLogApiError(_T("SendMessage(WM_MDISETMENU)"), err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// update menu bar of the parent window
|
// update menu bar of the parent window
|
||||||
wxWindow *parent = win->GetParent();
|
wxWindow *parent = win->GetParent();
|
||||||
|
@@ -118,7 +118,9 @@ UINT GetMenuState(HMENU hMenu, UINT id, UINT flags)
|
|||||||
info.fMask = MIIM_STATE;
|
info.fMask = MIIM_STATE;
|
||||||
// MF_BYCOMMAND is zero so test MF_BYPOSITION
|
// MF_BYCOMMAND is zero so test MF_BYPOSITION
|
||||||
if ( !::GetMenuItemInfo(hMenu, id, flags & MF_BYPOSITION ? TRUE : FALSE , & info) )
|
if ( !::GetMenuItemInfo(hMenu, id, flags & MF_BYPOSITION ? TRUE : FALSE , & info) )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("GetMenuItemInfo"));
|
wxLogLastError(wxT("GetMenuItemInfo"));
|
||||||
|
}
|
||||||
return info.fState;
|
return info.fState;
|
||||||
}
|
}
|
||||||
#endif // __WXWINCE__
|
#endif // __WXWINCE__
|
||||||
@@ -569,8 +571,10 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
mi.fMask = MIM_STYLE;
|
mi.fMask = MIM_STYLE;
|
||||||
mi.dwStyle = MNS_CHECKORBMP;
|
mi.dwStyle = MNS_CHECKORBMP;
|
||||||
if ( !(*pfnSetMenuInfo)(GetHmenu(), &mi) )
|
if ( !(*pfnSetMenuInfo)(GetHmenu(), &mi) )
|
||||||
|
{
|
||||||
wxLogLastError(_T("SetMenuInfo(MNS_NOCHECK)"));
|
wxLogLastError(_T("SetMenuInfo(MNS_NOCHECK)"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// tell the item that it's not really owner-drawn but only
|
// tell the item that it's not really owner-drawn but only
|
||||||
// needs to draw its bitmap, the rest is done by Windows
|
// needs to draw its bitmap, the rest is done by Windows
|
||||||
@@ -1446,10 +1450,14 @@ bool wxMenuBar::AddAdornments(long style)
|
|||||||
if (style & wxCLOSE_BOX)
|
if (style & wxCLOSE_BOX)
|
||||||
{
|
{
|
||||||
if (!CommandBar_AddAdornments((HWND) m_commandBar, 0, 0))
|
if (!CommandBar_AddAdornments((HWND) m_commandBar, 0, 0))
|
||||||
|
{
|
||||||
wxLogLastError(wxT("CommandBar_AddAdornments"));
|
wxLogLastError(wxT("CommandBar_AddAdornments"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -580,7 +580,9 @@ bool wxSpinCtrl::Reparent(wxWindowBase *newParent)
|
|||||||
// destroy the old spin button
|
// destroy the old spin button
|
||||||
UnsubclassWin();
|
UnsubclassWin();
|
||||||
if ( !::DestroyWindow(GetHwnd()) )
|
if ( !::DestroyWindow(GetHwnd()) )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("DestroyWindow"));
|
wxLogLastError(wxT("DestroyWindow"));
|
||||||
|
}
|
||||||
|
|
||||||
// create and initialize the new one
|
// create and initialize the new one
|
||||||
if ( !wxSpinButton::Create(GetParent(), GetId(),
|
if ( !wxSpinButton::Create(GetParent(), GetId(),
|
||||||
|
@@ -236,7 +236,9 @@ void wxStatusBar::SetFieldsWidth()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !StatusBar_SetParts(GetHwnd(), m_panes.GetCount(), pWidths) )
|
if ( !StatusBar_SetParts(GetHwnd(), m_panes.GetCount(), pWidths) )
|
||||||
|
{
|
||||||
wxLogLastError("StatusBar_SetParts");
|
wxLogLastError("StatusBar_SetParts");
|
||||||
|
}
|
||||||
|
|
||||||
delete [] pWidths;
|
delete [] pWidths;
|
||||||
|
|
||||||
@@ -324,7 +326,9 @@ void wxStatusBar::UpdateFieldText(int nField)
|
|||||||
// Set the status text in the native control passing both field number and style.
|
// Set the status text in the native control passing both field number and style.
|
||||||
// NOTE: MSDN library doesn't mention that nField and style have to be 'ORed'
|
// NOTE: MSDN library doesn't mention that nField and style have to be 'ORed'
|
||||||
if ( !StatusBar_SetText(GetHwnd(), nField | style, text.wx_str()) )
|
if ( !StatusBar_SetText(GetHwnd(), nField | style, text.wx_str()) )
|
||||||
|
{
|
||||||
wxLogLastError("StatusBar_SetText");
|
wxLogLastError("StatusBar_SetText");
|
||||||
|
}
|
||||||
|
|
||||||
if (HasFlag(wxSTB_SHOW_TIPS))
|
if (HasFlag(wxSTB_SHOW_TIPS))
|
||||||
{
|
{
|
||||||
@@ -388,7 +392,9 @@ bool wxStatusBar::GetFieldRect(int i, wxRect& rect) const
|
|||||||
|
|
||||||
RECT r;
|
RECT r;
|
||||||
if ( !::SendMessage(GetHwnd(), SB_GETRECT, i, (LPARAM)&r) )
|
if ( !::SendMessage(GetHwnd(), SB_GETRECT, i, (LPARAM)&r) )
|
||||||
|
{
|
||||||
wxLogLastError("SendMessage(SB_GETRECT)");
|
wxLogLastError("SendMessage(SB_GETRECT)");
|
||||||
|
}
|
||||||
|
|
||||||
#if wxUSE_UXTHEME
|
#if wxUSE_UXTHEME
|
||||||
wxUxThemeHandle theme(const_cast<wxStatusBar*>(this), L"Status");
|
wxUxThemeHandle theme(const_cast<wxStatusBar*>(this), L"Status");
|
||||||
@@ -518,9 +524,11 @@ void wxStatusBar::SetStatusStyles(int n, const int styles[])
|
|||||||
// NOTE: MSDN library doesn't mention that nField and style have to be 'ORed'
|
// NOTE: MSDN library doesn't mention that nField and style have to be 'ORed'
|
||||||
wxString text = GetStatusText(i);
|
wxString text = GetStatusText(i);
|
||||||
if (!StatusBar_SetText(GetHwnd(), style | i, text.wx_str()))
|
if (!StatusBar_SetText(GetHwnd(), style | i, text.wx_str()))
|
||||||
|
{
|
||||||
wxLogLastError("StatusBar_SetText");
|
wxLogLastError("StatusBar_SetText");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WXLRESULT
|
WXLRESULT
|
||||||
wxStatusBar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
wxStatusBar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
|
@@ -1600,9 +1600,11 @@ void wxToolBar::OnEraseBackground(wxEraseEvent& event)
|
|||||||
// it can also return S_FALSE which seems to simply say that it
|
// it can also return S_FALSE which seems to simply say that it
|
||||||
// didn't draw anything but no error really occurred
|
// didn't draw anything but no error really occurred
|
||||||
if ( FAILED(hr) )
|
if ( FAILED(hr) )
|
||||||
|
{
|
||||||
wxLogApiError(_T("DrawThemeParentBackground(toolbar)"), hr);
|
wxLogApiError(_T("DrawThemeParentBackground(toolbar)"), hr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Only draw a rebar theme on Vista, since it doesn't jive so well with XP
|
// Only draw a rebar theme on Vista, since it doesn't jive so well with XP
|
||||||
if ( !UseBgCol() && majorVersion >= 6 )
|
if ( !UseBgCol() && majorVersion >= 6 )
|
||||||
@@ -1623,9 +1625,11 @@ void wxToolBar::OnEraseBackground(wxEraseEvent& event)
|
|||||||
// it can also return S_FALSE which seems to simply say that it
|
// it can also return S_FALSE which seems to simply say that it
|
||||||
// didn't draw anything but no error really occurred
|
// didn't draw anything but no error really occurred
|
||||||
if ( FAILED(hr) )
|
if ( FAILED(hr) )
|
||||||
|
{
|
||||||
wxLogApiError(_T("DrawThemeParentBackground(toolbar)"), hr);
|
wxLogApiError(_T("DrawThemeParentBackground(toolbar)"), hr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif // wxUSE_UXTHEME
|
#endif // wxUSE_UXTHEME
|
||||||
|
|
||||||
|
@@ -923,7 +923,9 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
|
|||||||
|
|
||||||
// close unneeded handle
|
// close unneeded handle
|
||||||
if ( !::CloseHandle(pi.hThread) )
|
if ( !::CloseHandle(pi.hThread) )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("CloseHandle(hThread)"));
|
wxLogLastError(wxT("CloseHandle(hThread)"));
|
||||||
|
}
|
||||||
|
|
||||||
if ( !hThread )
|
if ( !hThread )
|
||||||
{
|
{
|
||||||
|
@@ -611,8 +611,10 @@ wxIcon wxFSVolume::GetIcon(wxFSIconType type) const
|
|||||||
long rc = SHGetFileInfo(m_volName.wx_str(), 0, &fi, sizeof(fi), flags);
|
long rc = SHGetFileInfo(m_volName.wx_str(), 0, &fi, sizeof(fi), flags);
|
||||||
m_icons[type].SetHICON((WXHICON)fi.hIcon);
|
m_icons[type].SetHICON((WXHICON)fi.hIcon);
|
||||||
if (!rc || !fi.hIcon)
|
if (!rc || !fi.hIcon)
|
||||||
|
{
|
||||||
wxLogError(_("Cannot load icon from '%s'."), m_volName.c_str());
|
wxLogError(_("Cannot load icon from '%s'."), m_volName.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return m_icons[type];
|
return m_icons[type];
|
||||||
} // GetIcon
|
} // GetIcon
|
||||||
|
@@ -564,8 +564,10 @@ wxWindowMSW::~wxWindowMSW()
|
|||||||
//if (::IsWindow(GetHwnd()))
|
//if (::IsWindow(GetHwnd()))
|
||||||
{
|
{
|
||||||
if ( !::DestroyWindow(GetHwnd()) )
|
if ( !::DestroyWindow(GetHwnd()) )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("DestroyWindow"));
|
wxLogLastError(wxT("DestroyWindow"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// remove hWnd <-> wxWindow association
|
// remove hWnd <-> wxWindow association
|
||||||
wxRemoveHandleAssociation(this);
|
wxRemoveHandleAssociation(this);
|
||||||
@@ -1258,8 +1260,10 @@ void wxWindowMSW::AssociateHandle(WXWidget handle)
|
|||||||
if ( m_hWnd )
|
if ( m_hWnd )
|
||||||
{
|
{
|
||||||
if ( !::DestroyWindow(GetHwnd()) )
|
if ( !::DestroyWindow(GetHwnd()) )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("DestroyWindow"));
|
wxLogLastError(wxT("DestroyWindow"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WXHWND wxhwnd = (WXHWND)handle;
|
WXHWND wxhwnd = (WXHWND)handle;
|
||||||
|
|
||||||
@@ -4694,9 +4698,13 @@ bool wxWindowMSW::HandlePaint()
|
|||||||
{
|
{
|
||||||
HRGN hRegion = ::CreateRectRgn(0, 0, 0, 0); // Dummy call to get a handle
|
HRGN hRegion = ::CreateRectRgn(0, 0, 0, 0); // Dummy call to get a handle
|
||||||
if ( !hRegion )
|
if ( !hRegion )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("CreateRectRgn"));
|
wxLogLastError(wxT("CreateRectRgn"));
|
||||||
|
}
|
||||||
if ( ::GetUpdateRgn(GetHwnd(), hRegion, FALSE) == ERROR )
|
if ( ::GetUpdateRgn(GetHwnd(), hRegion, FALSE) == ERROR )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("GetUpdateRgn"));
|
wxLogLastError(wxT("GetUpdateRgn"));
|
||||||
|
}
|
||||||
|
|
||||||
m_updateRegion = wxRegion((WXHRGN) hRegion);
|
m_updateRegion = wxRegion((WXHRGN) hRegion);
|
||||||
|
|
||||||
|
@@ -60,7 +60,9 @@ bool wxOpenClipboard()
|
|||||||
gs_wxClipboardIsOpen = ::OpenClipboard((HWND)win->GetHWND()) != 0;
|
gs_wxClipboardIsOpen = ::OpenClipboard((HWND)win->GetHWND()) != 0;
|
||||||
|
|
||||||
if ( !gs_wxClipboardIsOpen )
|
if ( !gs_wxClipboardIsOpen )
|
||||||
|
{
|
||||||
wxLogSysError(_("Failed to open the clipboard."));
|
wxLogSysError(_("Failed to open the clipboard."));
|
||||||
|
}
|
||||||
|
|
||||||
return gs_wxClipboardIsOpen;
|
return gs_wxClipboardIsOpen;
|
||||||
}
|
}
|
||||||
|
@@ -372,7 +372,9 @@ bool wxIniConfig::Write(const wxString& szKey, const wxString& WXUNUSED(szValue)
|
|||||||
// szValue, m_strLocalFilename) != 0;
|
// szValue, m_strLocalFilename) != 0;
|
||||||
|
|
||||||
if ( !bOk )
|
if ( !bOk )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("WritePrivateProfileString"));
|
wxLogLastError(wxT("WritePrivateProfileString"));
|
||||||
|
}
|
||||||
|
|
||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
@@ -417,7 +419,9 @@ bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso)
|
|||||||
// NULL, m_strLocalFilename) != 0;
|
// NULL, m_strLocalFilename) != 0;
|
||||||
|
|
||||||
if ( !bOk )
|
if ( !bOk )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("WritePrivateProfileString"));
|
wxLogLastError(wxT("WritePrivateProfileString"));
|
||||||
|
}
|
||||||
|
|
||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
@@ -432,7 +436,9 @@ bool wxIniConfig::DeleteGroup(const wxString& szKey)
|
|||||||
// NULL, m_strLocalFilename) != 0;
|
// NULL, m_strLocalFilename) != 0;
|
||||||
|
|
||||||
if ( !bOk )
|
if ( !bOk )
|
||||||
|
{
|
||||||
wxLogLastError(wxT("WritePrivateProfileString"));
|
wxLogLastError(wxT("WritePrivateProfileString"));
|
||||||
|
}
|
||||||
|
|
||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
|
@@ -1097,7 +1097,9 @@ void wxMenuBar::Attach(
|
|||||||
,m_vAccelTable.GetHACCEL()
|
,m_vAccelTable.GetHACCEL()
|
||||||
,(HWND)pFrame->GetFrame()
|
,(HWND)pFrame->GetFrame()
|
||||||
))
|
))
|
||||||
|
{
|
||||||
wxLogLastError(wxT("WinSetAccelTable"));
|
wxLogLastError(wxT("WinSetAccelTable"));
|
||||||
|
}
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
} // end of wxMenuBar::Attach
|
} // end of wxMenuBar::Attach
|
||||||
|
|
||||||
|
@@ -124,9 +124,11 @@ wxMutexInternal::~wxMutexInternal()
|
|||||||
if (m_vMutex)
|
if (m_vMutex)
|
||||||
{
|
{
|
||||||
if (::DosCloseMutexSem(m_vMutex))
|
if (::DosCloseMutexSem(m_vMutex))
|
||||||
|
{
|
||||||
wxLogLastError(_T("DosCloseMutexSem(mutex)"));
|
wxLogLastError(_T("DosCloseMutexSem(mutex)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wxMutexError wxMutexInternal::TryLock()
|
wxMutexError wxMutexInternal::TryLock()
|
||||||
{
|
{
|
||||||
|
@@ -71,7 +71,9 @@ void wxToolTip::Create(
|
|||||||
,NULL
|
,NULL
|
||||||
);
|
);
|
||||||
if (!m_hWnd)
|
if (!m_hWnd)
|
||||||
|
{
|
||||||
wxLogError(_T("Unable to create tooltip window"));
|
wxLogError(_T("Unable to create tooltip window"));
|
||||||
|
}
|
||||||
|
|
||||||
wxColour vColor( wxT("YELLOW") );
|
wxColour vColor( wxT("YELLOW") );
|
||||||
lColor = (LONG)vColor.GetPixel();
|
lColor = (LONG)vColor.GetPixel();
|
||||||
|
@@ -352,7 +352,9 @@ wxWindowOS2::~wxWindowOS2()
|
|||||||
if (m_hWnd)
|
if (m_hWnd)
|
||||||
{
|
{
|
||||||
if(!::WinDestroyWindow(GetHWND()))
|
if(!::WinDestroyWindow(GetHWND()))
|
||||||
|
{
|
||||||
wxLogLastError(wxT("DestroyWindow"));
|
wxLogLastError(wxT("DestroyWindow"));
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// remove hWnd <-> wxWindow association
|
// remove hWnd <-> wxWindow association
|
||||||
//
|
//
|
||||||
|
@@ -249,7 +249,9 @@ void wxMDIParentFrame::MacActivate(long timestamp, bool activating)
|
|||||||
else // schedule ourselves for deactivation
|
else // schedule ourselves for deactivation
|
||||||
{
|
{
|
||||||
if (s_macDeactivateWindow)
|
if (s_macDeactivateWindow)
|
||||||
|
{
|
||||||
wxLogTrace(TRACE_MDI, wxT("window=%p SHOULD have been deactivated, oh well!"), s_macDeactivateWindow);
|
wxLogTrace(TRACE_MDI, wxT("window=%p SHOULD have been deactivated, oh well!"), s_macDeactivateWindow);
|
||||||
|
}
|
||||||
wxLogTrace(TRACE_MDI, wxT("Scheduling delayed MDI Parent deactivation"));
|
wxLogTrace(TRACE_MDI, wxT("Scheduling delayed MDI Parent deactivation"));
|
||||||
|
|
||||||
s_macDeactivateWindow = this;
|
s_macDeactivateWindow = this;
|
||||||
@@ -402,7 +404,9 @@ void wxMDIChildFrame::MacActivate(long timestamp, bool activating)
|
|||||||
else // schedule ourselves for deactivation
|
else // schedule ourselves for deactivation
|
||||||
{
|
{
|
||||||
if (s_macDeactivateWindow)
|
if (s_macDeactivateWindow)
|
||||||
|
{
|
||||||
wxLogTrace(TRACE_MDI, wxT("window=%p SHOULD have been deactivated, oh well!"), s_macDeactivateWindow);
|
wxLogTrace(TRACE_MDI, wxT("window=%p SHOULD have been deactivated, oh well!"), s_macDeactivateWindow);
|
||||||
|
}
|
||||||
wxLogTrace(TRACE_MDI, wxT("Scheduling delayed deactivation"));
|
wxLogTrace(TRACE_MDI, wxT("Scheduling delayed deactivation"));
|
||||||
|
|
||||||
s_macDeactivateWindow = this;
|
s_macDeactivateWindow = this;
|
||||||
|
@@ -1404,7 +1404,9 @@ wxFileType* wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
|
|||||||
wxString sError;
|
wxString sError;
|
||||||
bInfoOpenSuccess = cfdInfo.ReadAsXML(cfdaInDict, &sError);
|
bInfoOpenSuccess = cfdInfo.ReadAsXML(cfdaInDict, &sError);
|
||||||
if (!bInfoOpenSuccess)
|
if (!bInfoOpenSuccess)
|
||||||
|
{
|
||||||
wxLogDebug(sError);
|
wxLogDebug(sError);
|
||||||
|
}
|
||||||
indictfile.Close();
|
indictfile.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1752,7 +1754,9 @@ wxMimeTypesManagerImpl::Unassociate(wxFileType *pFileType)
|
|||||||
wxString sError;
|
wxString sError;
|
||||||
bInfoOpenSuccess = cfdInfo.ReadAsXML(cfdaInDict, &sError);
|
bInfoOpenSuccess = cfdInfo.ReadAsXML(cfdaInDict, &sError);
|
||||||
if (!bInfoOpenSuccess)
|
if (!bInfoOpenSuccess)
|
||||||
|
{
|
||||||
wxLogDebug(sError);
|
wxLogDebug(sError);
|
||||||
|
}
|
||||||
indictfile.Close();
|
indictfile.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1853,9 +1857,11 @@ wxMimeTypesManagerImpl::Unassociate(wxFileType *pFileType)
|
|||||||
wxLogDebug(sPrintOut);
|
wxLogDebug(sPrintOut);
|
||||||
|
|
||||||
for (size_t i = 0; i < asExtensions.GetCount(); ++i)
|
for (size_t i = 0; i < asExtensions.GetCount(); ++i)
|
||||||
|
{
|
||||||
wxLogDebug(asExtensions[i]);
|
wxLogDebug(asExtensions[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("No doc types array found"));
|
wxLogDebug(wxT("No doc types array found"));
|
||||||
|
@@ -235,7 +235,9 @@ inline bool wxInitQT ()
|
|||||||
int nError;
|
int nError;
|
||||||
//-2093 no dll
|
//-2093 no dll
|
||||||
if ((nError = InitializeQTML(0)) != noErr)
|
if ((nError = InitializeQTML(0)) != noErr)
|
||||||
|
{
|
||||||
wxLogSysError(wxString::Format(wxT("Couldn't Initialize Quicktime-%i"), nError));
|
wxLogSysError(wxString::Format(wxT("Couldn't Initialize Quicktime-%i"), nError));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
EnterMovies();
|
EnterMovies();
|
||||||
return true;
|
return true;
|
||||||
|
@@ -193,7 +193,9 @@ bool wxHIDDevice::Create (int nClass, int nType, int nDev)
|
|||||||
|
|
||||||
//open the HID interface...
|
//open the HID interface...
|
||||||
if ( (*m_ppDevice)->open(m_ppDevice, 0) != S_OK )
|
if ( (*m_ppDevice)->open(m_ppDevice, 0) != S_OK )
|
||||||
|
{
|
||||||
wxLogDebug(_T("HID device: open failed"));
|
wxLogDebug(_T("HID device: open failed"));
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//Now the hard part - in order to scan things we need "cookies"
|
//Now the hard part - in order to scan things we need "cookies"
|
||||||
@@ -316,8 +318,10 @@ void wxHIDDevice::AddCookieInQueue(CFTypeRef Data, int i)
|
|||||||
//3rd Param flags (none yet)
|
//3rd Param flags (none yet)
|
||||||
AddCookie(Data, i);
|
AddCookie(Data, i);
|
||||||
if ( (*m_ppQueue)->addElement(m_ppQueue, m_pCookies[i], 0) != S_OK )
|
if ( (*m_ppQueue)->addElement(m_ppQueue, m_pCookies[i], 0) != S_OK )
|
||||||
|
{
|
||||||
wxLogDebug(_T("HID device: adding element failed"));
|
wxLogDebug(_T("HID device: adding element failed"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxHIDDevice::InitCookies
|
// wxHIDDevice::InitCookies
|
||||||
|
@@ -2331,9 +2331,13 @@ wxPGProperty* wxPGProperty::GetItemAtY( unsigned int y,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
if ( current )
|
if ( current )
|
||||||
|
{
|
||||||
wxLogDebug(wxT("%s::GetItemAtY(%i) -> %s"),this->GetLabel().c_str(),y,current->GetLabel().c_str());
|
wxLogDebug(wxT("%s::GetItemAtY(%i) -> %s"),this->GetLabel().c_str(),y,current->GetLabel().c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogDebug(wxT("%s::GetItemAtY(%i) -> NULL"),this->GetLabel().c_str(),y);
|
wxLogDebug(wxT("%s::GetItemAtY(%i) -> NULL"),this->GetLabel().c_str(),y);
|
||||||
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return (wxPGProperty*) result;
|
return (wxPGProperty*) result;
|
||||||
|
@@ -3245,10 +3245,14 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
if (p)
|
if (p)
|
||||||
|
{
|
||||||
wxLogDebug(wxT("SelectProperty( %s (%s[%i]) )"),p->m_label.c_str(),
|
wxLogDebug(wxT("SelectProperty( %s (%s[%i]) )"),p->m_label.c_str(),
|
||||||
p->m_parent->m_label.c_str(),p->GetIndexInParent());
|
p->m_parent->m_label.c_str(),p->GetIndexInParent());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogDebug(wxT("SelectProperty( NULL, -1 )"));
|
wxLogDebug(wxT("SelectProperty( NULL, -1 )"));
|
||||||
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( m_inDoSelectProperty )
|
if ( m_inDoSelectProperty )
|
||||||
|
@@ -181,10 +181,14 @@ bool wxRichTextXMLHandler::ImportXML(wxRichTextBuffer* buffer, wxXmlNode* node)
|
|||||||
|
|
||||||
// note: 0 == wxBITMAP_TYPE_INVALID
|
// note: 0 == wxBITMAP_TYPE_INVALID
|
||||||
if (type <= 0 || type >= wxBITMAP_TYPE_MAX)
|
if (type <= 0 || type >= wxBITMAP_TYPE_MAX)
|
||||||
|
{
|
||||||
wxLogWarning("Invalid bitmap type specified for <image> tag: %d", type);
|
wxLogWarning("Invalid bitmap type specified for <image> tag: %d", type);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
imageType = (wxBitmapType)type;
|
imageType = (wxBitmapType)type;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wxString data;
|
wxString data;
|
||||||
|
|
||||||
|
@@ -2456,7 +2456,9 @@ void wxMenuBar::OnDismissMenu(bool dismissMenuBar)
|
|||||||
void wxMenuBar::OnDismiss()
|
void wxMenuBar::OnDismiss()
|
||||||
{
|
{
|
||||||
if ( ReleaseMouseCapture() )
|
if ( ReleaseMouseCapture() )
|
||||||
|
{
|
||||||
wxLogTrace(_T("mousecapture"), _T("Releasing mouse from wxMenuBar::OnDismiss"));
|
wxLogTrace(_T("mousecapture"), _T("Releasing mouse from wxMenuBar::OnDismiss"));
|
||||||
|
}
|
||||||
|
|
||||||
if ( m_current != -1 )
|
if ( m_current != -1 )
|
||||||
{
|
{
|
||||||
|
@@ -690,8 +690,10 @@ PangoContext* wxApp::GetPangoContext()
|
|||||||
s_pangoContext = pango_x_get_context(dpy);
|
s_pangoContext = pango_x_get_context(dpy);
|
||||||
|
|
||||||
if (!PANGO_IS_CONTEXT(s_pangoContext))
|
if (!PANGO_IS_CONTEXT(s_pangoContext))
|
||||||
|
{
|
||||||
wxLogError( wxT("No pango context.") );
|
wxLogError( wxT("No pango context.") );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return s_pangoContext;
|
return s_pangoContext;
|
||||||
}
|
}
|
||||||
|
@@ -522,7 +522,9 @@ void wxWindowX11::DoCaptureMouse()
|
|||||||
msg.Printf(wxT("Failed to grab pointer for window %s"), this->GetClassInfo()->GetClassName());
|
msg.Printf(wxT("Failed to grab pointer for window %s"), this->GetClassInfo()->GetClassName());
|
||||||
wxLogDebug(msg);
|
wxLogDebug(msg);
|
||||||
if (res == GrabNotViewable)
|
if (res == GrabNotViewable)
|
||||||
|
{
|
||||||
wxLogDebug( wxT("This is not a viewable window - perhaps not shown yet?") );
|
wxLogDebug( wxT("This is not a viewable window - perhaps not shown yet?") );
|
||||||
|
}
|
||||||
|
|
||||||
g_captureWindow = NULL;
|
g_captureWindow = NULL;
|
||||||
return;
|
return;
|
||||||
|
@@ -388,8 +388,10 @@ void TempDir::RemoveDir(wxString& path)
|
|||||||
wxRmdir(tmp + wxFileName(dirs[i], wxPATH_UNIX).GetFullPath());
|
wxRmdir(tmp + wxFileName(dirs[i], wxPATH_UNIX).GetFullPath());
|
||||||
|
|
||||||
if (!wxRmdir(m_tmp))
|
if (!wxRmdir(m_tmp))
|
||||||
|
{
|
||||||
wxLogSysError(_T("can't remove temporary dir '%s'"), m_tmp.c_str());
|
wxLogSysError(_T("can't remove temporary dir '%s'"), m_tmp.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -356,7 +356,9 @@ void GetVolumeInfo(const wxString& path)
|
|||||||
&volumeFlags,
|
&volumeFlags,
|
||||||
volumeType,
|
volumeType,
|
||||||
WXSIZEOF(volumeType)))
|
WXSIZEOF(volumeType)))
|
||||||
|
{
|
||||||
wxLogSysError(_T("GetVolumeInformation() failed"));
|
wxLogSysError(_T("GetVolumeInformation() failed"));
|
||||||
|
}
|
||||||
|
|
||||||
volumeInfoInit = true;
|
volumeInfoInit = true;
|
||||||
}
|
}
|
||||||
|
@@ -400,16 +400,22 @@ void zlibStream::doDecompress_ExternalData(const unsigned char *data, const char
|
|||||||
break;
|
break;
|
||||||
case wxZLIB_ZLIB:
|
case wxZLIB_ZLIB:
|
||||||
if (!(data_size >= 1 && data[0] == 0x78))
|
if (!(data_size >= 1 && data[0] == 0x78))
|
||||||
|
{
|
||||||
wxLogError(_T("zlib data seems to not be zlib data!"));
|
wxLogError(_T("zlib data seems to not be zlib data!"));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case wxZLIB_GZIP:
|
case wxZLIB_GZIP:
|
||||||
if (!(data_size >= 2 && data[0] == 0x1F && data[1] == 0x8B))
|
if (!(data_size >= 2 && data[0] == 0x1F && data[1] == 0x8B))
|
||||||
|
{
|
||||||
wxLogError(_T("gzip data seems to not be gzip data!"));
|
wxLogError(_T("gzip data seems to not be gzip data!"));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case wxZLIB_AUTO:
|
case wxZLIB_AUTO:
|
||||||
if (!(data_size >= 1 && data[0] == 0x78) ||
|
if (!(data_size >= 1 && data[0] == 0x78) ||
|
||||||
!(data_size >= 2 && data[0] == 0x1F && data[1] == 0x8B))
|
!(data_size >= 2 && data[0] == 0x1F && data[1] == 0x8B))
|
||||||
|
{
|
||||||
wxLogError(_T("Data seems to not be zlib or gzip data!"));
|
wxLogError(_T("Data seems to not be zlib or gzip data!"));
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
wxLogError(_T("Unknown flag, skipping quick test."));
|
wxLogError(_T("Unknown flag, skipping quick test."));
|
||||||
};
|
};
|
||||||
|
@@ -117,7 +117,9 @@ bool TestExec(const wxVector<wxFileName>& programs, long timeout)
|
|||||||
|
|
||||||
long pid = wxExecute(programs[i].GetFullPath(), wxEXEC_ASYNC, &dt->process);
|
long pid = wxExecute(programs[i].GetFullPath(), wxEXEC_ASYNC, &dt->process);
|
||||||
if (pid == 0)
|
if (pid == 0)
|
||||||
|
{
|
||||||
wxLogError("could not run the program '%s'", programs[i].GetFullPath());
|
wxLogError("could not run the program '%s'", programs[i].GetFullPath());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLogMessage("started program '%s' (pid %d)...",
|
wxLogMessage("started program '%s' (pid %d)...",
|
||||||
|
@@ -282,10 +282,14 @@ bool wxRemoteHtmlHelpController::Quit()
|
|||||||
if ( sig == 0 )
|
if ( sig == 0 )
|
||||||
{
|
{
|
||||||
if ( wxProcess::Exists(m_pid) )
|
if ( wxProcess::Exists(m_pid) )
|
||||||
|
{
|
||||||
wxLogStatus(_T("Process %ld is running."), m_pid);
|
wxLogStatus(_T("Process %ld is running."), m_pid);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxLogStatus(_T("No process with pid = %ld."), m_pid);
|
wxLogStatus(_T("No process with pid = %ld."), m_pid);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else // not SIGNONE
|
else // not SIGNONE
|
||||||
{
|
{
|
||||||
wxKillError rc = wxProcess::Kill(m_pid, (wxSignal)sig);
|
wxKillError rc = wxProcess::Kill(m_pid, (wxSignal)sig);
|
||||||
@@ -349,7 +353,9 @@ bool wxRemoteHtmlHelpController::AddBook(const wxString& book, bool show_wait_ms
|
|||||||
|
|
||||||
if( isconn_1 ) {
|
if( isconn_1 ) {
|
||||||
if (!m_connection->Poke( wxT("--AddBook"), (char*)book.c_str() ) )
|
if (!m_connection->Poke( wxT("--AddBook"), (char*)book.c_str() ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("wxRemoteHtmlHelpController - AddBook Failed"));
|
wxLogError(wxT("wxRemoteHtmlHelpController - AddBook Failed"));
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,9 +376,11 @@ void wxRemoteHtmlHelpController::DisplayIndex()
|
|||||||
{
|
{
|
||||||
if( isconn_1 ) {
|
if( isconn_1 ) {
|
||||||
if (!m_connection->Poke( wxT("--DisplayIndex"), wxT("") ) )
|
if (!m_connection->Poke( wxT("--DisplayIndex"), wxT("") ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("wxRemoteHtmlHelpController - DisplayIndex Failed"));
|
wxLogError(wxT("wxRemoteHtmlHelpController - DisplayIndex Failed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
bool wxRemoteHtmlHelpController::KeywordSearch(const wxString& keyword)
|
bool wxRemoteHtmlHelpController::KeywordSearch(const wxString& keyword)
|
||||||
{
|
{
|
||||||
if( isconn_1 ) {
|
if( isconn_1 ) {
|
||||||
@@ -391,15 +399,19 @@ void wxRemoteHtmlHelpController::SetTitleFormat(const wxString& format)
|
|||||||
|
|
||||||
if( isconn_1 ) {
|
if( isconn_1 ) {
|
||||||
if (!m_connection->Poke( wxT("--SetTitleFormat"), (char*)format.c_str() ) )
|
if (!m_connection->Poke( wxT("--SetTitleFormat"), (char*)format.c_str() ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("wxRemoteHtmlHelpController - SetTitleFormat Failed"));
|
wxLogError(wxT("wxRemoteHtmlHelpController - SetTitleFormat Failed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void wxRemoteHtmlHelpController::SetTempDir(const wxString& path)
|
void wxRemoteHtmlHelpController::SetTempDir(const wxString& path)
|
||||||
{
|
{
|
||||||
if( isconn_1 ) {
|
if( isconn_1 ) {
|
||||||
if (!m_connection->Poke( wxT("--SetTempDir"), (char*)path.c_str() ) )
|
if (!m_connection->Poke( wxT("--SetTempDir"), (char*)path.c_str() ) )
|
||||||
|
{
|
||||||
wxLogError(wxT("wxRemoteHtmlHelpController - SetTempDir Failed"));
|
wxLogError(wxT("wxRemoteHtmlHelpController - SetTempDir Failed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -214,7 +214,9 @@ bool IfaceCheckApp::Compare()
|
|||||||
interfaces.GetCount());
|
interfaces.GetCount());
|
||||||
|
|
||||||
if (!m_strToMatch.IsEmpty())
|
if (!m_strToMatch.IsEmpty())
|
||||||
|
{
|
||||||
wxLogMessage("Processing only header files matching '%s' expression.", m_strToMatch);
|
wxLogMessage("Processing only header files matching '%s' expression.", m_strToMatch);
|
||||||
|
}
|
||||||
|
|
||||||
for (unsigned int i=0; i<interfaces.GetCount(); i++)
|
for (unsigned int i=0; i<interfaces.GetCount(); i++)
|
||||||
{
|
{
|
||||||
@@ -224,8 +226,10 @@ bool IfaceCheckApp::Compare()
|
|||||||
(interfaces[i].GetAvailability() & m_gccInterface.GetInterfacePort()) == 0) {
|
(interfaces[i].GetAvailability() & m_gccInterface.GetInterfacePort()) == 0) {
|
||||||
|
|
||||||
if (g_verbose)
|
if (g_verbose)
|
||||||
|
{
|
||||||
wxLogMessage("skipping class '%s' since it's not available for the %s port.",
|
wxLogMessage("skipping class '%s' since it's not available for the %s port.",
|
||||||
interfaces[i].GetName(), m_gccInterface.GetInterfacePortName());
|
interfaces[i].GetName(), m_gccInterface.GetInterfacePortName());
|
||||||
|
}
|
||||||
|
|
||||||
continue; // skip this method
|
continue; // skip this method
|
||||||
}
|
}
|
||||||
@@ -299,8 +303,10 @@ int IfaceCheckApp::CompareClasses(const wxClass* iface, const wxClass* api)
|
|||||||
(m.GetAvailability() & m_gccInterface.GetInterfacePort()) == 0) {
|
(m.GetAvailability() & m_gccInterface.GetInterfacePort()) == 0) {
|
||||||
|
|
||||||
if (g_verbose)
|
if (g_verbose)
|
||||||
|
{
|
||||||
wxLogMessage("skipping method '%s' since it's not available for the %s port.",
|
wxLogMessage("skipping method '%s' since it's not available for the %s port.",
|
||||||
m.GetAsString(), m_gccInterface.GetInterfacePortName());
|
m.GetAsString(), m_gccInterface.GetInterfacePortName());
|
||||||
|
}
|
||||||
|
|
||||||
continue; // skip this method
|
continue; // skip this method
|
||||||
}
|
}
|
||||||
@@ -355,7 +361,9 @@ int IfaceCheckApp::CompareClasses(const wxClass* iface, const wxClass* api)
|
|||||||
|
|
||||||
// modify interface header
|
// modify interface header
|
||||||
if (FixMethod(iface->GetHeader(), &m, &tmp))
|
if (FixMethod(iface->GetHeader(), &m, &tmp))
|
||||||
|
{
|
||||||
wxLogMessage("Adjusted attributes of '%s' method", m.GetAsString());
|
wxLogMessage("Adjusted attributes of '%s' method", m.GetAsString());
|
||||||
|
}
|
||||||
|
|
||||||
proceed = false;
|
proceed = false;
|
||||||
break;
|
break;
|
||||||
@@ -397,8 +405,10 @@ int IfaceCheckApp::CompareClasses(const wxClass* iface, const wxClass* api)
|
|||||||
// TODO: decide which of these overloads is the most "similar" to m
|
// TODO: decide which of these overloads is the most "similar" to m
|
||||||
// and eventually modify it
|
// and eventually modify it
|
||||||
if (m_modify)
|
if (m_modify)
|
||||||
|
{
|
||||||
wxLogWarning("\tmanual fix is required");
|
wxLogWarning("\tmanual fix is required");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxASSERT(overloads.GetCount() == 1);
|
wxASSERT(overloads.GetCount() == 1);
|
||||||
@@ -574,7 +584,9 @@ bool IfaceCheckApp::FixMethod(const wxString& header, const wxMethod* iface, con
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (g_verbose)
|
if (g_verbose)
|
||||||
|
{
|
||||||
wxLogMessage("\tthe final row offset for following methods is %d lines.", nOffset);
|
wxLogMessage("\tthe final row offset for following methods is %d lines.", nOffset);
|
||||||
|
}
|
||||||
|
|
||||||
// update the other method's locations for those methods which belong to the modified header
|
// update the other method's locations for those methods which belong to the modified header
|
||||||
// and are placed _below_ the modified method
|
// and are placed _below_ the modified method
|
||||||
|
@@ -234,8 +234,10 @@ bool wxArgumentType::operator==(const wxArgumentType& m) const
|
|||||||
(m.m_strDefaultValueForCmp.IsNumber() && m_strDefaultValueForCmp.StartsWith("wx")))
|
(m.m_strDefaultValueForCmp.IsNumber() && m_strDefaultValueForCmp.StartsWith("wx")))
|
||||||
{
|
{
|
||||||
if (g_verbose)
|
if (g_verbose)
|
||||||
|
{
|
||||||
wxLogMessage("Supposing '%s' default value to be the same of '%s'...",
|
wxLogMessage("Supposing '%s' default value to be the same of '%s'...",
|
||||||
m_strDefaultValueForCmp, m.m_strDefaultValueForCmp);
|
m_strDefaultValueForCmp, m.m_strDefaultValueForCmp);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -260,8 +262,10 @@ bool wxArgumentType::operator==(const wxArgumentType& m) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_verbose)
|
if (g_verbose)
|
||||||
|
{
|
||||||
wxLogMessage("Argument type '%s = %s' has different default value from '%s = %s'",
|
wxLogMessage("Argument type '%s = %s' has different default value from '%s = %s'",
|
||||||
m_strType, m_strDefaultValueForCmp, m.m_strType, m.m_strDefaultValueForCmp);
|
m_strType, m_strDefaultValueForCmp, m.m_strType, m.m_strDefaultValueForCmp);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,14 +334,18 @@ bool wxMethod::MatchesExceptForAttributes(const wxMethod& m) const
|
|||||||
GetName() != m.GetName())
|
GetName() != m.GetName())
|
||||||
{
|
{
|
||||||
if (g_verbose)
|
if (g_verbose)
|
||||||
|
{
|
||||||
wxLogMessage("The method '%s' does not match method '%s'; different names/rettype", GetName(), m.GetName());
|
wxLogMessage("The method '%s' does not match method '%s'; different names/rettype", GetName(), m.GetName());
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_args.GetCount()!=m.m_args.GetCount()) {
|
if (m_args.GetCount()!=m.m_args.GetCount()) {
|
||||||
if (g_verbose)
|
if (g_verbose)
|
||||||
|
{
|
||||||
wxLogMessage("Method '%s' has %d arguments while '%s' has %d arguments",
|
wxLogMessage("Method '%s' has %d arguments while '%s' has %d arguments",
|
||||||
m_strName, m_args.GetCount(), m_strName, m.m_args.GetCount());
|
m_strName, m_args.GetCount(), m_strName, m.m_args.GetCount());
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,7 +380,9 @@ bool wxMethod::operator==(const wxMethod& m) const
|
|||||||
GetAccessSpecifier() != m.GetAccessSpecifier())
|
GetAccessSpecifier() != m.GetAccessSpecifier())
|
||||||
{
|
{
|
||||||
if (g_verbose)
|
if (g_verbose)
|
||||||
|
{
|
||||||
wxLogMessage("The method '%s' does not match method '%s'; different attributes", GetName(), m.GetName());
|
wxLogMessage("The method '%s' does not match method '%s'; different attributes", GetName(), m.GetName());
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1009,8 +1019,10 @@ bool wxXmlGccInterface::Parse(const wxString& filename)
|
|||||||
// they're never used as return/argument types by wxWidgets methods
|
// they're never used as return/argument types by wxWidgets methods
|
||||||
|
|
||||||
if (g_verbose)
|
if (g_verbose)
|
||||||
|
{
|
||||||
wxLogWarning("Type node '%s' with ID '%s' does not have name attribute",
|
wxLogWarning("Type node '%s' with ID '%s' does not have name attribute",
|
||||||
n, child->GetAttribute("id"));
|
n, child->GetAttribute("id"));
|
||||||
|
}
|
||||||
|
|
||||||
types[id] = "TOFIX";
|
types[id] = "TOFIX";
|
||||||
}
|
}
|
||||||
@@ -1028,8 +1040,10 @@ bool wxXmlGccInterface::Parse(const wxString& filename)
|
|||||||
while (toResolveTypes.size()>0)
|
while (toResolveTypes.size()>0)
|
||||||
{
|
{
|
||||||
if (g_verbose)
|
if (g_verbose)
|
||||||
|
{
|
||||||
wxLogMessage("%d types were collected; %d types need yet to be resolved...",
|
wxLogMessage("%d types were collected; %d types need yet to be resolved...",
|
||||||
types.size(), toResolveTypes.size());
|
types.size(), toResolveTypes.size());
|
||||||
|
}
|
||||||
|
|
||||||
for (wxToResolveTypeHashMap::iterator i = toResolveTypes.begin();
|
for (wxToResolveTypeHashMap::iterator i = toResolveTypes.begin();
|
||||||
i != toResolveTypes.end();)
|
i != toResolveTypes.end();)
|
||||||
@@ -1468,7 +1482,9 @@ bool wxXmlDoxygenInterface::ParseCompoundDefinition(const wxString& filename)
|
|||||||
int nodes = 0;
|
int nodes = 0;
|
||||||
|
|
||||||
if (g_verbose)
|
if (g_verbose)
|
||||||
|
{
|
||||||
wxLogMessage("Parsing %s...", filename);
|
wxLogMessage("Parsing %s...", filename);
|
||||||
|
}
|
||||||
|
|
||||||
if (!doc.Load(filename)) {
|
if (!doc.Load(filename)) {
|
||||||
wxLogError("can't load %s", filename);
|
wxLogError("can't load %s", filename);
|
||||||
@@ -1576,11 +1592,15 @@ bool wxXmlDoxygenInterface::ParseCompoundDefinition(const wxString& filename)
|
|||||||
|
|
||||||
// add a new class
|
// add a new class
|
||||||
if (klass.IsOk())
|
if (klass.IsOk())
|
||||||
|
{
|
||||||
m_classes.Add(klass);
|
m_classes.Add(klass);
|
||||||
|
}
|
||||||
else if (g_verbose)
|
else if (g_verbose)
|
||||||
|
{
|
||||||
wxLogWarning("discarding class '%s' with %d methods...",
|
wxLogWarning("discarding class '%s' with %d methods...",
|
||||||
klass.GetName(), klass.GetMethodCount());
|
klass.GetName(), klass.GetMethodCount());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
child = child->GetNext();
|
child = child->GetNext();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user