refactor(MenuWorld): code refactor for stddlg
Change-Id: Id73404d29ea75f61663e0306eeeb559286d77281 Reviewed-on: https://review.haiku-os.org/c/1072 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// stddlg.cpp
|
// stddlg.cpp
|
||||||
//
|
//
|
||||||
// Written by: Owen Smith
|
// Written by: Owen Smith
|
||||||
//
|
//
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -12,18 +12,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <string.h>
|
#include <String.h>
|
||||||
|
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "stddlg.h"
|
#include "stddlg.h"
|
||||||
|
|
||||||
|
|
||||||
void ierror(const char* msg)
|
void ierror(const char* msg)
|
||||||
{
|
{
|
||||||
char* fullMsg = new char[strlen(STR_IERROR) + strlen(msg) + 1];
|
BString fullMsg(STR_IERROR);
|
||||||
strcpy(fullMsg, STR_IERROR);
|
fullMsg << msg;
|
||||||
strcpy(fullMsg, msg);
|
|
||||||
BAlert alert("Internal Error", fullMsg, "OK", NULL, NULL,
|
BAlert alert("Internal Error", fullMsg, "OK", NULL, NULL,
|
||||||
B_WIDTH_AS_USUAL, B_STOP_ALERT);
|
B_WIDTH_AS_USUAL, B_STOP_ALERT);
|
||||||
alert.Go();
|
alert.Go();
|
||||||
delete [] fullMsg;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user