]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/dbbrowse/dbgrid.cpp
use wx.ART_NEW
[wxWidgets.git] / demos / dbbrowse / dbgrid.cpp
index 409f79b4c0f41ed6dc153e98816ac02e56c0f646..8647a88c441afe98f89146863ac77a117c5ed935 100644 (file)
@@ -67,9 +67,9 @@ wxGrid(parent, id, pos, size, style)
 {
     b_EditModus = false;
     //---------------------------------------------------------------------------------------
 {
     b_EditModus = false;
     //---------------------------------------------------------------------------------------
-    popupMenu1 = new wxMenu(_T(""));
+    popupMenu1 = new wxMenu;
     popupMenu1->Append(GRID_EDIT, _("Edit Modus"));
     popupMenu1->Append(GRID_EDIT, _("Edit Modus"));
-    popupMenu2 = new wxMenu(_T(""));
+    popupMenu2 = new wxMenu;
     popupMenu2->Append(GRID_BROWSE, _("Browse Modus"));
 }
 
     popupMenu2->Append(GRID_BROWSE, _("Browse Modus"));
 }
 
@@ -125,15 +125,19 @@ int  DBGrid::OnTableView(wxString Table)
                         { // BrowserDB::OnGetNext Formats the field Value into tablename
                             SetCellValue(z, y,((db_Br+i_Which)->cl_BrowserDB+y)->tableName);
                         }
                         { // BrowserDB::OnGetNext Formats the field Value into tablename
                             SetCellValue(z, y,((db_Br+i_Which)->cl_BrowserDB+y)->tableName);
                         }
+#if wxUSE_STATUSBAR
                         if (z % 50 == 0)
                         {
                             Temp0.Printf(_("-I-> DBGrid::OnTableView(%s) - Record %6d (from %d) has been read."),Table.c_str(),z,(db_Br+i_Which)->i_Records);
                             pDoc->p_MainFrame->SetStatusText(Temp0, 0);
                         }
                         if (z % 50 == 0)
                         {
                             Temp0.Printf(_("-I-> DBGrid::OnTableView(%s) - Record %6d (from %d) has been read."),Table.c_str(),z,(db_Br+i_Which)->i_Records);
                             pDoc->p_MainFrame->SetStatusText(Temp0, 0);
                         }
+#endif // wxUSE_STATUSBAR
                     }  // for (z=0;z<(db_Br+i_Which)->i_Records;z++)
                     Temp0.Printf(_("-I-> DBGrid::OnTableView(%s) - %6d Records have been read. - Time needed : %ld ms"),Table.c_str(),z,sw.Time());
                     wxLogMessage(Temp0);
                     }  // for (z=0;z<(db_Br+i_Which)->i_Records;z++)
                     Temp0.Printf(_("-I-> DBGrid::OnTableView(%s) - %6d Records have been read. - Time needed : %ld ms"),Table.c_str(),z,sw.Time());
                     wxLogMessage(Temp0);
+#if wxUSE_STATUSBAR
                     pDoc->p_MainFrame->SetStatusText(Temp0, 0);
                     pDoc->p_MainFrame->SetStatusText(Temp0, 0);
+#endif // wxUSE_STATUSBAR
                     // The Grid has been filled, now leave
                     goto Weiter;
                 }   // if ((ct_BrowserDB->pTableInf+x)->pColInf)
                     // The Grid has been filled, now leave
                     goto Weiter;
                 }   // if ((ct_BrowserDB->pTableInf+x)->pColInf)
@@ -188,7 +192,7 @@ void DBGrid::OnEditorHidden( wxGridEvent& ev )
 //----------------------------------------------------------------------------------------
 void DBGrid::OnSelectCell( wxGridEvent& ev )
 {
 //----------------------------------------------------------------------------------------
 void DBGrid::OnSelectCell( wxGridEvent& ev )
 {
-    logBuf = _T("");
+    logBuf = wxEmptyString;
     logBuf << _T("Selected cell at row ") << ev.GetRow()
         << _T(" col ") << ev.GetCol();
     wxLogMessage( _T("%s"), logBuf.c_str() );
     logBuf << _T("Selected cell at row ") << ev.GetRow()
         << _T(" col ") << ev.GetCol();
     wxLogMessage( _T("%s"), logBuf.c_str() );