diff --git a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp index 4b7f15ed8b..8b6ce8757a 100644 --- a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp @@ -74,7 +74,8 @@ enum { MSG_LOCATE_SOURCE_IF_NEEDED = 'lsin', MSG_SOURCE_ENTRY_QUERY_COMPLETE = 'seqc', MSG_CLEAR_STACK_TRACE = 'clst', - MSG_HANDLE_LOAD_SETTINGS = 'hlst' + MSG_HANDLE_LOAD_SETTINGS = 'hlst', + MSG_UPDATE_STATUS_BAR = 'upsb' }; @@ -133,6 +134,7 @@ TeamWindow::TeamWindow(::Team* team, UserInterfaceListener* listener) fStepOutButton(NULL), fMenuBar(NULL), fSourcePathView(NULL), + fStatusBarView(NULL), fConsoleOutputView(NULL), fFunctionSplitView(NULL), fSourceSplitView(NULL), @@ -525,6 +527,13 @@ TeamWindow::MessageReceived(BMessage* message) _LoadSettings(settings); break; } + case MSG_UPDATE_STATUS_BAR: + { + const char* messageText; + if (message->FindString("message", &messageText) == B_OK) + fStatusBarView->SetText(messageText); + break; + } case MSG_TEAM_RENAMED: { _UpdateTitle(); @@ -725,6 +734,15 @@ TeamWindow::SaveSettings(GuiTeamUiSettings* settings) } +void +TeamWindow::DisplayBackgroundStatus(const char* message) +{ + BMessage updateMessage(MSG_UPDATE_STATUS_BAR); + updateMessage.AddString("message", message); + PostMessage(&updateMessage); +} + + void TeamWindow::ThreadSelectionChanged(::Thread* thread) { @@ -995,7 +1013,11 @@ TeamWindow::_Init() .SetInsets(0.0) .Add(fConsoleOutputView = ConsoleOutputView::Create()) .End() - .End(); + .End() + .Add(fStatusBarView = new BStringView("status", "Ready.")); + + fStatusBarView->SetExplicitMinSize(BSize(50.0, B_SIZE_UNSET)); + fStatusBarView->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET)); // add source view sourceScrollView->SetTarget(fSourceView = SourceView::Create(fTeam, this)); diff --git a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.h b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.h index f9be9461df..825ecf0d03 100644 --- a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.h +++ b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.h @@ -71,6 +71,8 @@ public: status_t SaveSettings( GuiTeamUiSettings* settings); + void DisplayBackgroundStatus(const char* message); + private: enum ActiveSourceObject { @@ -228,6 +230,7 @@ private: BButton* fStepOutButton; BMenuBar* fMenuBar; BStringView* fSourcePathView; + BStringView* fStatusBarView; ConsoleOutputView* fConsoleOutputView; BSplitView* fFunctionSplitView; BSplitView* fSourceSplitView;