_HEAD\src\src\main.cpp(936):
void MainFrame::DoUpdateStatusBar()
{
#if wxUSE_STATUSBAR
if (!GetStatusBar())
return;
cbEditor* ed = m_pEdMan->GetBuiltinActiveEditor();
if (ed)
{
int pos = ed->GetControl()->GetCurrentPos();
wxString msg;
msg.Printf(_("Line %d, Column %d"), ed->GetControl()->GetCurrentLine() + 1, ed->GetControl()->GetColumn(pos) + 1);
SetStatusText(msg, 1);
SetStatusText(ed->GetControl()->GetOvertype() ? _("Overwrite") : _("Insert"), 2);
SetStatusText(ed->GetModified() ? _("Modified") : wxEmptyString, 3);
SetStatusText(ed->GetControl()->GetReadOnly() ? _("Read only") : _("Read/Write"), 4);
SetStatusText(ed->GetFilename(), 0); //tiwag 050818
}
else
{
SetStatusText(_("Welcome to "APP_NAME"!")); //tiwag 050818
SetStatusText(wxEmptyString, 1);
SetStatusText(wxEmptyString, 2);
SetStatusText(wxEmptyString, 3);
SetStatusText(wxEmptyString, 4);
}
#endif // wxUSE_STATUSBAR
}
please don't dream about timers and other complex stuff ...
i just edited two lines, and it works as i proposed...
kiss (keep it simple stupid)
[update]
here's the patch, if someone wants to try it ...
Index: src/src/main.cpp
===================================================================
RCS file: /cvsroot/codeblocks/codeblocks/src/src/main.cpp,v
retrieving revision 1.84
diff -u -r1.84 main.cpp
--- src/src/main.cpp 1 Aug 2005 11:28:31 -0000 1.84
+++ src/src/main.cpp 18 Aug 2005 12:54:00 -0000
@@ -948,9 +948,11 @@
SetStatusText(ed->GetControl()->GetOvertype() ? _("Overwrite") : _("Insert"), 2);
SetStatusText(ed->GetModified() ? _("Modified") : wxEmptyString, 3);
SetStatusText(ed->GetControl()->GetReadOnly() ? _("Read only") : _("Read/Write"), 4);
+ SetStatusText(ed->GetFilename(), 0); //tiwag 050818
}
else
{
+ SetStatusText(_("Welcome to "APP_NAME"!")); //tiwag 050818
SetStatusText(wxEmptyString, 1);
SetStatusText(wxEmptyString, 2);
SetStatusText(wxEmptyString, 3);
btw - i found a small flaw in CodeBlocks CVS-HEAD,
the statusbar (Line, Column) doesn't get updated
when you are only changing between notebooks but don't start edit them
it can be fixed by adding a wxNotebookEvent Handler for PageChanged
here's the code to patch main.cpp
//event table entry
EVT_NOTEBOOK_PAGE_CHANGED(-1, MainFrame::OnEditorUpdateUI_NB)
//handle notebook event
void MainFrame::OnEditorUpdateUI_NB(wxNotebookEvent& event)
{
if (m_pEdMan ) DoUpdateStatusBar(); //tiwag 050818
event.Skip();
}
[update] patchfile appended
[attachment deleted by admin]