Fixes for wxUSE_STATUSBAR.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-07-19 09:39:38 +00:00
parent 1411f7eb1a
commit 67a9999283
17 changed files with 118 additions and 19 deletions

View File

@@ -216,9 +216,11 @@ bool MainApp::OnInit(void) // Does everything needed for a program start
menu_bar->Append(file_menu, _("&File"));
menu_bar->Append(help_menu, _("&Help"));
frame->SetMenuBar(menu_bar);
#if wxUSE_STATUSBAR
frame->CreateStatusBar(1);
Temp0.Printf(_("%s has started !"),p_ProgramCfg->GetAppName().c_str());
frame->SetStatusText(Temp0, 0);
#endif // wxUSE_STATUSBAR
//---------------------------------------------------------------------------------------
int width, height;
frame->GetClientSize(&width, &height);

View File

@@ -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);
}
#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);
}
#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);
#if wxUSE_STATUSBAR
pDoc->p_MainFrame->SetStatusText(Temp0, 0);
#endif // wxUSE_STATUSBAR
// The Grid has been filled, now leave
goto Weiter;
} // if ((ct_BrowserDB->pTableInf+x)->pColInf)

View File

@@ -221,8 +221,10 @@ int DBTree::OnPopulate()
z++;
// if (z % 10 == 0)
{
#if wxUSE_STATUSBAR
Temp0.Printf(_("-I-> DBTree::OnPopulate(%s) - Table %6d (from %d) has been read."),(ct_BrowserDB->pTableInf+x)->tableName,z,ct_BrowserDB->numTables);
pDoc->p_MainFrame->SetStatusText(Temp0, 0);
#endif // wxUSE_STATUSBAR
}
wxYield();
} // if ((ct_BrowserDB->pTableInf+x)->tableType == "TABLE" or VIEW)
@@ -235,7 +237,9 @@ int DBTree::OnPopulate()
wxEndBusyCursor();
Temp0.Printf(_("-I-> DBTree::OnPopulate() - %6d Tables have been read. - Time needed : %ld ms"),z,sw.Time());
wxLogMessage(Temp0);
#if wxUSE_STATUSBAR
pDoc->p_MainFrame->SetStatusText(Temp0, 0);
#endif // wxUSE_STATUSBAR
} // if((pDoc->db_Br+i_Which)->Initialize(false))
else
{
@@ -264,7 +268,9 @@ void DBTree::OnSelChanged(wxTreeEvent& WXUNUSED(event))
{
int i;
Temp0.Empty();
#if wxUSE_STATUSBAR
pDoc->p_MainFrame->SetStatusText(Temp0,0);
#endif // wxUSE_STATUSBAR
// Get the Information that we need
wxTreeItemId itemId = GetSelection();
DBTreeData *item = (DBTreeData *)GetItemData(itemId);

View File

@@ -144,9 +144,11 @@ bool MainDoc::OnInitView()
// return false;
OnInitODBC();
//---------------------------------------------------------------------------------------
#if wxUSE_STATUSBAR
Temp0.Printf(_("-I-> MainDoc::OnInitView() - End - %d DSN's found"),i_DSN);
p_MainFrame->SetStatusText(Temp0, 0);
wxLogMessage(Temp0);
#endif // wxUSE_STATUSBAR
return true;
}

View File

@@ -137,7 +137,9 @@ void PgmCtrl::OnSelChanged(wxMouseEvent& WXUNUSED(event))
{
int i;
Temp0.Empty(); Temp1.Empty();
#if wxUSE_STATUSBAR
pDoc->p_MainFrame->SetStatusText(Temp0,0);
#endif // wxUSE_STATUSBAR
// Get the Information that we need
wxTreeItemId itemId = GetSelection();
TreeData *item = (TreeData *)GetItemData(itemId);

View File

@@ -198,7 +198,9 @@ FortyFrame::FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos
SetSizer( topsizer );
topsizer->SetSizeHints( this );
#if wxUSE_STATUSBAR
CreateStatusBar();
#endif // wxUSE_STATUSBAR
}
FortyFrame::~FortyFrame()

View File

@@ -261,9 +261,11 @@ LifeFrame::LifeFrame() : wxFrame( (wxFrame *) NULL, wxID_ANY,
toolBar->Realize();
toolBar->EnableTool(ID_STOP, false); // must be after Realize() !
#if wxUSE_STATUSBAR
// status bar
CreateStatusBar(2);
SetStatusText(_("Welcome to Life!"));
#endif // wxUSE_STATUSBAR
// game and timer
m_life = new Life();
@@ -884,10 +886,12 @@ void LifeCanvas::OnMouse(wxMouseEvent& event)
wxInt32 i = XToCell( event.GetX() );
wxInt32 j = YToCell( event.GetY() );
#if wxUSE_STATUSBAR
// set statusbar text
wxString msg;
msg.Printf(_("Cell: (%d, %d)"), i, j);
((LifeFrame *) wxGetApp().GetTopWindow())->SetStatusText(msg, 1);
#endif // wxUSE_STATUSBAR
// NOTE that wxMouseEvent::LeftDown() and wxMouseEvent::LeftIsDown()
// have different semantics. The first one is used to signal that the