debug_server: Be a bit more enthusiastic

* Improved the "Oh no!" text of the button.

Change-Id: I9b15f3dccca24a5e394d42890985fd42c49f7587
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1925
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Stephan Aßmus <[email protected]>
This commit is contained in:
Axel Dörfler
2019-10-25 07:26:50 +00:00
committed by Stephan Aßmus
parent caf05af5dd
commit 09250fd50f
2 changed files with 7 additions and 3 deletions
+5 -2
View File
@@ -3,6 +3,7 @@
* Distributed under the terms of the MIT License.
*/
#include "DebugWindow.h"
#include <algorithm>
@@ -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;
}
+2 -1
View File
@@ -2,7 +2,6 @@
* Copyright 2019, Adrien Destugues, [email protected].
* 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;
};