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 <pulkomandy@gmail.com> Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
This commit is contained in:
parent
caf05af5dd
commit
09250fd50f
@ -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,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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user