diff --git a/src/servers/debug/DebugWindow.cpp b/src/servers/debug/DebugWindow.cpp index 0dd295f3d6..ed369a04f6 100644 --- a/src/servers/debug/DebugWindow.cpp +++ b/src/servers/debug/DebugWindow.cpp @@ -3,6 +3,7 @@ * Distributed under the terms of the MIT License. */ + #include "DebugWindow.h" #include @@ -70,7 +71,7 @@ DebugWindow::DebugWindow(const char* appName) BRadioButton *core = new BRadioButton("core", B_TRANSLATE("Write core file"), new BMessage(kActionWriteCoreFile)); - BButton *close = new BButton("close", B_TRANSLATE("Oh no!"), + fOKButton = new BButton("close", B_TRANSLATE("Oh no!"), new BMessage(B_QUIT_REQUESTED)); terminate->SetValue(B_CONTROL_ON); @@ -89,7 +90,7 @@ DebugWindow::DebugWindow(const char* appName) .End() .AddGroup(B_HORIZONTAL) .AddGlue() - .Add(close) + .Add(fOKButton) .End() .End() .End(); @@ -118,6 +119,8 @@ DebugWindow::MessageReceived(BMessage* message) case kActionWriteCoreFile: case kActionSaveReportTeam: fAction = message->what; + fOKButton->SetLabel(fAction == kActionDebugTeam + ? B_TRANSLATE("Oh yeah!") : B_TRANSLATE("Oh no!")); return; } diff --git a/src/servers/debug/DebugWindow.h b/src/servers/debug/DebugWindow.h index 9a4fc40b5b..a3418c109d 100644 --- a/src/servers/debug/DebugWindow.h +++ b/src/servers/debug/DebugWindow.h @@ -2,7 +2,6 @@ * Copyright 2019, Adrien Destugues, pulkomandy@pulkomandy.tk. * Distributed under the terms of the MIT License. */ - #ifndef DEBUGWINDOW_H #define DEBUGWINDOW_H @@ -33,11 +32,13 @@ public: void MessageReceived(BMessage* message); int32 Go(); + private: static BRect IconSize(); private: BBitmap fBitmap; + BButton* fOKButton; sem_id fSemaphore; int32 fAction; };