]> git.saurik.com Git - wxWidgets.git/commitdiff
GCC fixes.
authorWłodzimierz Skiba <abx@abx.art.pl>
Mon, 22 Nov 2004 17:48:33 +0000 (17:48 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Mon, 22 Nov 2004 17:48:33 +0000 (17:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/db/dbtest.cpp
src/univ/checkbox.cpp
src/univ/themes/win32.cpp

index 2e0bcc003cab1b03d2e730fe52787d2a01f3ce8c..ef03c414985ec49902f98cf0a554de5915d2390b 100644 (file)
@@ -737,7 +737,7 @@ bool DatabaseDemoApp::ReadParamFile(Cparameters &params)
     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;
@@ -772,7 +772,7 @@ bool DatabaseDemoApp::WriteParamFile(Cparameters &WXUNUSED(params))
     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;
     }
@@ -1287,7 +1287,7 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
         if (!Ok)
             return;
 
-        if (saveName.IsEmpty())
+        if (saveName.empty())
         {
             wxGetApp().Contact->Initialize();
             PutData();
@@ -1403,7 +1403,7 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event))
         }
 
         // Enable/Disable the reset button
-        pResetBtn->Enable(!wxGetApp().Contact->qryWhereStr.IsEmpty());
+        pResetBtn->Enable(!wxGetApp().Contact->qryWhereStr.empty());
 
         return;
     }  // Query button
@@ -1523,7 +1523,7 @@ bool CeditorDlg::Initialize()
                                           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)
@@ -1552,7 +1552,7 @@ bool CeditorDlg::Initialize()
                                                 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);
@@ -1564,7 +1564,7 @@ bool CeditorDlg::Initialize()
                                            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);
         }
@@ -1636,7 +1636,7 @@ bool CeditorDlg::Initialize()
     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;
 
@@ -1802,7 +1802,7 @@ void CeditorDlg::SetMode(enum DialogModes m)
         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 );
     }
 
@@ -2049,7 +2049,7 @@ bool CeditorDlg::GetNextRec()
     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;
@@ -2085,7 +2085,7 @@ bool CeditorDlg::GetPrevRec()
     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;
@@ -2893,9 +2893,9 @@ END_EVENT_TABLE()
 
 CimageDlg::CimageDlg(wxWindow *parent, wxChar *pImageData, off_t iSize)
 : wxDialog(parent, IMAGE_DIALOG, wxT("BLOB Image"), wxDefaultPosition, wxDefaultSize),
-m_pImage(NULL),
+m_pDisplayBmp(NULL),
 m_pBmp(NULL),
-m_pDisplayBmp(NULL)
+m_pImage(NULL)
 {
     wxMemoryInputStream inStream(pImageData, iSize);
 
@@ -3351,7 +3351,7 @@ bool DbGridFrame::Initialize()
                                           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);
         }
index fa84b05a95d2ac82a9824ed3bc41f46bd371879e..48d4fd2b6c0bff761ea4776ba5a551aea33f7235 100644 (file)
@@ -141,8 +141,9 @@ void wxCheckBox::DoDraw(wxControlRenderer *renderer)
 
     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));
@@ -224,6 +225,7 @@ wxCheckBoxState wxCheckBox::DoGet3StateValue() const
     {
         case Status_Checked:    return wxCHK_CHECKED;
         case Status_Unchecked:  return wxCHK_UNCHECKED;
+        default:                /* go further */ break;
     }
     return wxCHK_UNDETERMINED;
 }
index 5e313e615d83a69cfa76609ce3c6dbc3f42e7791..f3ff3b79e5246f2a5af9abc7767200358a59e2af 100644 (file)
@@ -33,6 +33,7 @@
     #include "wx/dcmemory.h"
 
     #include "wx/button.h"
+    #include "wx/bmpbuttn.h"
     #include "wx/listbox.h"
     #include "wx/checklst.h"
     #include "wx/combobox.h"