git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30698
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ((paramFile = wxFopen(PARAM_FILENAME, wxT("r"))) == NULL)
{
wxString tStr;
if ((paramFile = wxFopen(PARAM_FILENAME, wxT("r"))) == NULL)
{
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);
return false;
wxMessageBox(tStr,wxT("File I/O Error..."),wxOK | wxICON_EXCLAMATION);
return false;
if ((paramFile = wxFopen(PARAM_FILENAME, wxT("wt"))) == NULL)
{
wxString tStr;
if ((paramFile = wxFopen(PARAM_FILENAME, wxT("wt"))) == NULL)
{
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);
return false;
}
wxMessageBox(tStr,wxT("File I/O Error..."),wxOK | wxICON_EXCLAMATION);
return false;
}
- if (saveName.IsEmpty())
{
wxGetApp().Contact->Initialize();
PutData();
{
wxGetApp().Contact->Initialize();
PutData();
}
// Enable/Disable the reset button
}
// Enable/Disable the reset button
- pResetBtn->Enable(!wxGetApp().Contact->qryWhereStr.IsEmpty());
+ pResetBtn->Enable(!wxGetApp().Contact->qryWhereStr.empty());
return;
} // Query button
return;
} // Query button
wxGetApp().DbConnectInf->GetDefaultDir()))
{
wxString tStr;
wxGetApp().DbConnectInf->GetDefaultDir()))
{
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);
if (!createTable)
bool createTable = (wxMessageBox(tStr.c_str(),wxT("Confirm"),wxYES_NO|wxICON_QUESTION) == wxYES);
if (!createTable)
wxGetApp().DbConnectInf->GetDefaultDir()))
{
wxString tStr;
wxGetApp().DbConnectInf->GetDefaultDir()))
{
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__),
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),wxGetApp().Contact->GetDb(),__TFILE__,__LINE__),
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
wxGetApp().DbConnectInf->GetDefaultDir()))
{
wxString tStr;
wxGetApp().DbConnectInf->GetDefaultDir()))
{
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__),
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
}
wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),wxGetApp().Contact->GetDb(),__TFILE__,__LINE__),
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
}
pPictSizeTxt = new wxTextCtrl(this, EDITOR_DIALOG_PIC_SIZE_TEXT, wxEmptyString, wxPoint(175,447), wxSize(120, 25), 0, wxDefaultValidator, wxT("PictSizeTxt"));
#endif
pPictSizeTxt = new wxTextCtrl(this, EDITOR_DIALOG_PIC_SIZE_TEXT, wxEmptyString, wxPoint(175,447), wxSize(120, 25), 0, wxDefaultValidator, wxT("PictSizeTxt"));
#endif
- // Now that all the widgets on the panel are created, its safe to allow ::OnCommand() to
+ // Now that all the widgets on the panel are created, its safe to allow ::OnCommand() to
// handle all widget processing
widgetPtrsSet = true;
// handle all widget processing
widgetPtrsSet = true;
pPrevBtn->Enable( !edit );
pNextBtn->Enable( !edit );
pQueryBtn->Enable( !edit );
pPrevBtn->Enable( !edit );
pNextBtn->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 );
}
w += wxT("'");
// If a query where string is currently set, append that criteria
w += wxT("'");
// 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 += wxGetApp().Contact->qryWhereStr;
{
w += wxT(" AND (");
w += wxGetApp().Contact->qryWhereStr;
w += wxT("'");
// If a query where string is currently set, append that criteria
w += wxT("'");
// 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 += wxGetApp().Contact->qryWhereStr;
{
w += wxT(" AND (");
w += wxGetApp().Contact->qryWhereStr;
CimageDlg::CimageDlg(wxWindow *parent, wxChar *pImageData, off_t iSize)
: wxDialog(parent, IMAGE_DIALOG, wxT("BLOB Image"), wxDefaultPosition, wxDefaultSize),
CimageDlg::CimageDlg(wxWindow *parent, wxChar *pImageData, off_t iSize)
: wxDialog(parent, IMAGE_DIALOG, wxT("BLOB Image"), wxDefaultPosition, wxDefaultSize),
{
wxMemoryInputStream inStream(pImageData, iSize);
{
wxMemoryInputStream inStream(pImageData, iSize);
wxGetApp().DbConnectInf->GetDefaultDir()))
{
wxString tStr;
wxGetApp().DbConnectInf->GetDefaultDir()))
{
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__),
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
}
wxMessageBox(wxDbLogExtendedErrorMsg(tStr.c_str(),wxGetApp().Contact->GetDb(),__TFILE__,__LINE__),
wxT("ODBC Error..."),wxOK | wxICON_EXCLAMATION);
}
switch ( Get3StateValue() )
{
switch ( Get3StateValue() )
{
- case wxCHK_CHECKED: flags |= wxCONTROL_CHECKED;
- case wxCHK_UNDETERMINED: flags |= wxCONTROL_UNDETERMINED;
+ case wxCHK_CHECKED: flags |= wxCONTROL_CHECKED; break;
+ 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));
{
case Status_Checked: return wxCHK_CHECKED;
case Status_Unchecked: return wxCHK_UNCHECKED;
{
case Status_Checked: return wxCHK_CHECKED;
case Status_Unchecked: return wxCHK_UNCHECKED;
+ default: /* go further */ break;
}
return wxCHK_UNDETERMINED;
}
}
return wxCHK_UNDETERMINED;
}
#include "wx/dcmemory.h"
#include "wx/button.h"
#include "wx/dcmemory.h"
#include "wx/button.h"
+ #include "wx/bmpbuttn.h"
#include "wx/listbox.h"
#include "wx/checklst.h"
#include "wx/combobox.h"
#include "wx/listbox.h"
#include "wx/checklst.h"
#include "wx/combobox.h"