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
|
||||
//
|
||||
// Written by: Owen Smith
|
||||
//
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
@@ -12,18 +12,17 @@
|
||||
*/
|
||||
|
||||
#include <Alert.h>
|
||||
#include <string.h>
|
||||
#include <String.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "stddlg.h"
|
||||
|
||||
|
||||
void ierror(const char* msg)
|
||||
{
|
||||
char* fullMsg = new char[strlen(STR_IERROR) + strlen(msg) + 1];
|
||||
strcpy(fullMsg, STR_IERROR);
|
||||
strcpy(fullMsg, msg);
|
||||
BString fullMsg(STR_IERROR);
|
||||
fullMsg << msg;
|
||||
BAlert alert("Internal Error", fullMsg, "OK", NULL, NULL,
|
||||
B_WIDTH_AS_USUAL, B_STOP_ALERT);
|
||||
alert.Go();
|
||||
delete [] fullMsg;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user