GCC fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -737,7 +737,7 @@ bool DatabaseDemoApp::ReadParamFile(Cparameters ¶ms)
|
|||||||
if ((paramFile = wxFopen(PARAM_FILENAME, wxT("r"))) == NULL)
|
if ((paramFile = wxFopen(PARAM_FILENAME, wxT("r"))) == NULL)
|
||||||
{
|
{
|
||||||
wxString tStr;
|
wxString tStr;
|
||||||
tStr.Printf(wxT("Unable to open the parameter file '%s' for reading.\n\nYou must specify the data source, user name, and\npassword that will be used and save those settings."),PARAM_FILENAME);
|
tStr.Printf(wxT("Unable to open the parameter file '%s' for reading.\n\nYou must specify the data source, user name, and\npassword that will be used and save those settings."),PARAM_FILENAME.c_str());
|
||||||
wxMessageBox(tStr,wxT("File I/O Error..."),wxOK | wxICON_EXCLAMATION);
|
wxMessageBox(tStr,wxT("File I/O Error..."),wxOK | wxICON_EXCLAMATION);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -772,7 +772,7 @@ bool DatabaseDemoApp::WriteParamFile(Cparameters &WXUNUSED(params))
|
|||||||
if ((paramFile = wxFopen(PARAM_FILENAME, wxT("wt"))) == NULL)
|
if ((paramFile = wxFopen(PARAM_FILENAME, wxT("wt"))) == NULL)
|
||||||
{
|
{
|
||||||
wxString tStr;
|
wxString tStr;
|
||||||
tStr.Printf(wxT("Unable to write/overwrite '%s'."),PARAM_FILENAME);
|
tStr.Printf(wxT("Unable to write/overwrite '%s'."),PARAM_FILENAME.c_str());
|
||||||
wxMessageBox(tStr,wxT("File I/O Error..."),wxOK | wxICON_EXCLAMATION);
|
wxMessageBox(tStr,wxT("File I/O Error..."),wxOK | wxICON_EXCLAMATION);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1287,7 +1287,7 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
|
|||||||
if (!Ok)
|
if (!Ok)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (saveName.IsEmpty())
|
if (saveName.empty())
|
||||||
{
|
{
|
||||||
wxGetApp().Contact->Initialize();
|
wxGetApp().Contact->Initialize();
|
||||||
PutData();
|
PutData();
|
||||||
@@ -1403,7 +1403,7 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Enable/Disable the reset button
|
// Enable/Disable the reset button
|
||||||
pResetBtn->Enable(!wxGetApp().Contact->qryWhereStr.IsEmpty());
|
pResetBtn->Enable(!wxGetApp().Contact->qryWhereStr.empty());
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} // Query button
|
} // Query button
|
||||||
@@ -1523,7 +1523,7 @@ bool CeditorDlg::Initialize()
|
|||||||
wxGetApp().DbConnectInf->GetDefaultDir()))
|
wxGetApp().DbConnectInf->GetDefaultDir()))
|
||||||
{
|
{
|
||||||
wxString tStr;
|
wxString tStr;
|
||||||
tStr.Printf(wxT("Unable to open the table '%s'. The table may\nneed to be created.\n\nDo you wish to try to create/clear the table?\n\n"),CONTACT_TABLE_NAME);
|
tStr.Printf(wxT("Unable to open the table '%s'. The table may\nneed to be created.\n\nDo you wish to try to create/clear the table?\n\n"),CONTACT_TABLE_NAME.c_str());
|
||||||
bool createTable = (wxMessageBox(tStr.c_str(),wxT("Confirm"),wxYES_NO|wxICON_QUESTION) == wxYES);
|
bool createTable = (wxMessageBox(tStr.c_str(),wxT("Confirm"),wxYES_NO|wxICON_QUESTION) == wxYES);
|
||||||
|
|
||||||
if (!createTable)
|
if (!createTable)
|
||||||
@@ -1552,7 +1552,7 @@ bool CeditorDlg::Initialize()
|
|||||||
wxGetApp().DbConnectInf->GetDefaultDir()))
|
wxGetApp().DbConnectInf->GetDefaultDir()))
|
||||||
{
|
{
|
||||||
wxString tStr;
|
wxString tStr;
|
||||||
tStr.Printf(wxT("Unable to open the table '%s' (likely due to\ninsufficient privileges of the logged in user).\n\n"),CONTACT_TABLE_NAME);
|
tStr.Printf(wxT("Unable to open the table '%s' (likely due to\ninsufficient privileges of the logged in user).\n\n"),CONTACT_TABLE_NAME.c_str());
|
||||||
|
|
||||||
wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),wxGetApp().Contact->GetDb(),__TFILE__,__LINE__),
|
wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),wxGetApp().Contact->GetDb(),__TFILE__,__LINE__),
|
||||||
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
|
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
|
||||||
@@ -1564,7 +1564,7 @@ bool CeditorDlg::Initialize()
|
|||||||
wxGetApp().DbConnectInf->GetDefaultDir()))
|
wxGetApp().DbConnectInf->GetDefaultDir()))
|
||||||
{
|
{
|
||||||
wxString tStr;
|
wxString tStr;
|
||||||
tStr.Printf(wxT("Unable to open the table '%s' as the table\ndoes not appear to exist in the tablespace available\nto the currently logged in user.\n\n"),CONTACT_TABLE_NAME);
|
tStr.Printf(wxT("Unable to open the table '%s' as the table\ndoes not appear to exist in the tablespace available\nto the currently logged in user.\n\n"),CONTACT_TABLE_NAME.c_str());
|
||||||
wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),wxGetApp().Contact->GetDb(),__TFILE__,__LINE__),
|
wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),wxGetApp().Contact->GetDb(),__TFILE__,__LINE__),
|
||||||
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
|
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
|
||||||
}
|
}
|
||||||
@@ -1802,7 +1802,7 @@ void CeditorDlg::SetMode(enum DialogModes m)
|
|||||||
pPrevBtn->Enable( !edit );
|
pPrevBtn->Enable( !edit );
|
||||||
pNextBtn->Enable( !edit );
|
pNextBtn->Enable( !edit );
|
||||||
pQueryBtn->Enable( !edit );
|
pQueryBtn->Enable( !edit );
|
||||||
pResetBtn->Enable( !edit && !wxGetApp().Contact->qryWhereStr.IsEmpty() );
|
pResetBtn->Enable( !edit && !wxGetApp().Contact->qryWhereStr.empty() );
|
||||||
pNameListBtn->Enable( !edit );
|
pNameListBtn->Enable( !edit );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2049,7 +2049,7 @@ bool CeditorDlg::GetNextRec()
|
|||||||
w += wxT("'");
|
w += wxT("'");
|
||||||
|
|
||||||
// If a query where string is currently set, append that criteria
|
// If a query where string is currently set, append that criteria
|
||||||
if (!wxGetApp().Contact->qryWhereStr.IsEmpty())
|
if (!wxGetApp().Contact->qryWhereStr.empty())
|
||||||
{
|
{
|
||||||
w += wxT(" AND (");
|
w += wxT(" AND (");
|
||||||
w += wxGetApp().Contact->qryWhereStr;
|
w += wxGetApp().Contact->qryWhereStr;
|
||||||
@@ -2085,7 +2085,7 @@ bool CeditorDlg::GetPrevRec()
|
|||||||
w += wxT("'");
|
w += wxT("'");
|
||||||
|
|
||||||
// If a query where string is currently set, append that criteria
|
// If a query where string is currently set, append that criteria
|
||||||
if (!wxGetApp().Contact->qryWhereStr.IsEmpty())
|
if (!wxGetApp().Contact->qryWhereStr.empty())
|
||||||
{
|
{
|
||||||
w += wxT(" AND (");
|
w += wxT(" AND (");
|
||||||
w += wxGetApp().Contact->qryWhereStr;
|
w += wxGetApp().Contact->qryWhereStr;
|
||||||
@@ -2893,9 +2893,9 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
CimageDlg::CimageDlg(wxWindow *parent, wxChar *pImageData, off_t iSize)
|
CimageDlg::CimageDlg(wxWindow *parent, wxChar *pImageData, off_t iSize)
|
||||||
: wxDialog(parent, IMAGE_DIALOG, wxT("BLOB Image"), wxDefaultPosition, wxDefaultSize),
|
: wxDialog(parent, IMAGE_DIALOG, wxT("BLOB Image"), wxDefaultPosition, wxDefaultSize),
|
||||||
m_pImage(NULL),
|
m_pDisplayBmp(NULL),
|
||||||
m_pBmp(NULL),
|
m_pBmp(NULL),
|
||||||
m_pDisplayBmp(NULL)
|
m_pImage(NULL)
|
||||||
{
|
{
|
||||||
wxMemoryInputStream inStream(pImageData, iSize);
|
wxMemoryInputStream inStream(pImageData, iSize);
|
||||||
|
|
||||||
@@ -3351,7 +3351,7 @@ bool DbGridFrame::Initialize()
|
|||||||
wxGetApp().DbConnectInf->GetDefaultDir()))
|
wxGetApp().DbConnectInf->GetDefaultDir()))
|
||||||
{
|
{
|
||||||
wxString tStr;
|
wxString tStr;
|
||||||
tStr.Printf(wxT("Unable to open the table '%s'.\n\n"),CONTACT_TABLE_NAME);
|
tStr.Printf(wxT("Unable to open the table '%s'.\n\n"),CONTACT_TABLE_NAME.c_str());
|
||||||
wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),wxGetApp().Contact->GetDb(),__TFILE__,__LINE__),
|
wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),wxGetApp().Contact->GetDb(),__TFILE__,__LINE__),
|
||||||
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
|
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
|
||||||
}
|
}
|
||||||
|
@@ -141,8 +141,9 @@ void wxCheckBox::DoDraw(wxControlRenderer *renderer)
|
|||||||
|
|
||||||
switch ( Get3StateValue() )
|
switch ( Get3StateValue() )
|
||||||
{
|
{
|
||||||
case wxCHK_CHECKED: flags |= wxCONTROL_CHECKED;
|
case wxCHK_CHECKED: flags |= wxCONTROL_CHECKED; break;
|
||||||
case wxCHK_UNDETERMINED: flags |= wxCONTROL_UNDETERMINED;
|
case wxCHK_UNDETERMINED: flags |= wxCONTROL_UNDETERMINED; break;
|
||||||
|
default: /* do nothing */ break;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmap bitmap(GetBitmap(GetState(flags), m_status));
|
wxBitmap bitmap(GetBitmap(GetState(flags), m_status));
|
||||||
@@ -224,6 +225,7 @@ wxCheckBoxState wxCheckBox::DoGet3StateValue() const
|
|||||||
{
|
{
|
||||||
case Status_Checked: return wxCHK_CHECKED;
|
case Status_Checked: return wxCHK_CHECKED;
|
||||||
case Status_Unchecked: return wxCHK_UNCHECKED;
|
case Status_Unchecked: return wxCHK_UNCHECKED;
|
||||||
|
default: /* go further */ break;
|
||||||
}
|
}
|
||||||
return wxCHK_UNDETERMINED;
|
return wxCHK_UNDETERMINED;
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include "wx/dcmemory.h"
|
#include "wx/dcmemory.h"
|
||||||
|
|
||||||
#include "wx/button.h"
|
#include "wx/button.h"
|
||||||
|
#include "wx/bmpbuttn.h"
|
||||||
#include "wx/listbox.h"
|
#include "wx/listbox.h"
|
||||||
#include "wx/checklst.h"
|
#include "wx/checklst.h"
|
||||||
#include "wx/combobox.h"
|
#include "wx/combobox.h"
|
||||||
|
Reference in New Issue
Block a user