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:
committed by
Stephan Aßmus
parent
caf05af5dd
commit
09250fd50f
@@ -3,6 +3,7 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "DebugWindow.h"
|
#include "DebugWindow.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -70,7 +71,7 @@ DebugWindow::DebugWindow(const char* appName)
|
|||||||
BRadioButton *core = new BRadioButton("core",
|
BRadioButton *core = new BRadioButton("core",
|
||||||
B_TRANSLATE("Write core file"), new BMessage(kActionWriteCoreFile));
|
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));
|
new BMessage(B_QUIT_REQUESTED));
|
||||||
|
|
||||||
terminate->SetValue(B_CONTROL_ON);
|
terminate->SetValue(B_CONTROL_ON);
|
||||||
@@ -89,7 +90,7 @@ DebugWindow::DebugWindow(const char* appName)
|
|||||||
.End()
|
.End()
|
||||||
.AddGroup(B_HORIZONTAL)
|
.AddGroup(B_HORIZONTAL)
|
||||||
.AddGlue()
|
.AddGlue()
|
||||||
.Add(close)
|
.Add(fOKButton)
|
||||||
.End()
|
.End()
|
||||||
.End()
|
.End()
|
||||||
.End();
|
.End();
|
||||||
@@ -118,6 +119,8 @@ DebugWindow::MessageReceived(BMessage* message)
|
|||||||
case kActionWriteCoreFile:
|
case kActionWriteCoreFile:
|
||||||
case kActionSaveReportTeam:
|
case kActionSaveReportTeam:
|
||||||
fAction = message->what;
|
fAction = message->what;
|
||||||
|
fOKButton->SetLabel(fAction == kActionDebugTeam
|
||||||
|
? B_TRANSLATE("Oh yeah!") : B_TRANSLATE("Oh no!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
* Copyright 2019, Adrien Destugues, [email protected].
|
* Copyright 2019, Adrien Destugues, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DEBUGWINDOW_H
|
#ifndef DEBUGWINDOW_H
|
||||||
#define DEBUGWINDOW_H
|
#define DEBUGWINDOW_H
|
||||||
|
|
||||||
@@ -33,11 +32,13 @@ public:
|
|||||||
|
|
||||||
void MessageReceived(BMessage* message);
|
void MessageReceived(BMessage* message);
|
||||||
int32 Go();
|
int32 Go();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static BRect IconSize();
|
static BRect IconSize();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BBitmap fBitmap;
|
BBitmap fBitmap;
|
||||||
|
BButton* fOKButton;
|
||||||
sem_id fSemaphore;
|
sem_id fSemaphore;
|
||||||
int32 fAction;
|
int32 fAction;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user