Skip to content

Commit b44fe0f

Browse files
committed
haiku: Rename BE_* entities to HAIKU_*
In favor Bugzilla #2349. Update copyright years to 2019. Partially fixes Bugzilla #4442.
1 parent 33ae5e5 commit b44fe0f

3 files changed

Lines changed: 25 additions & 25 deletions

File tree

src/video/SDL_video.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3947,7 +3947,7 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
39473947
#if SDL_VIDEO_DRIVER_HAIKU
39483948
if (retval == -1 &&
39493949
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_HAIKU) &&
3950-
BE_ShowMessageBox(messageboxdata, buttonid) == 0) {
3950+
HAIKU_ShowMessageBox(messageboxdata, buttonid) == 0) {
39513951
retval = 0;
39523952
}
39533953
#endif

src/video/haiku/SDL_bmessagebox.cc

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
4-
Copyright (C) 2018 EXL <exlmotodev@gmail.com>
3+
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4+
Copyright (C) 2018-2019 EXL <exlmotodev@gmail.com>
55
66
This software is provided 'as-is', without any express or implied
77
warranty. In no event will the authors be held liable for any damages
@@ -54,7 +54,7 @@ enum
5454
G_MAX_STRING_LENGTH_BYTES = 120
5555
};
5656

57-
class BE_SDL_MessageBox : public BAlert
57+
class HAIKU_SDL_MessageBox : public BAlert
5858
{
5959
float fComputedMessageBoxWidth;
6060

@@ -68,9 +68,9 @@ class BE_SDL_MessageBox : public BAlert
6868
rgb_color fTextColor;
6969

7070
const char *fTitle;
71-
const char *BE_SDL_DefTitle;
72-
const char *BE_SDL_DefMessage;
73-
const char *BE_SDL_DefButton;
71+
const char *HAIKU_SDL_DefTitle;
72+
const char *HAIKU_SDL_DefMessage;
73+
const char *HAIKU_SDL_DefButton;
7474

7575
std::vector<const SDL_MessageBoxButtonData *> fButtons;
7676

@@ -133,15 +133,15 @@ class BE_SDL_MessageBox : public BAlert
133133
{
134134
if (aMessageBoxData == NULL)
135135
{
136-
SetTitle(BE_SDL_DefTitle);
137-
SetMessageText(BE_SDL_DefMessage);
138-
AddButton(BE_SDL_DefButton);
136+
SetTitle(HAIKU_SDL_DefTitle);
137+
SetMessageText(HAIKU_SDL_DefMessage);
138+
AddButton(HAIKU_SDL_DefButton);
139139
return;
140140
}
141141

142142
if (aMessageBoxData->numbuttons <= 0)
143143
{
144-
AddButton(BE_SDL_DefButton);
144+
AddButton(HAIKU_SDL_DefButton);
145145
}
146146
else
147147
{
@@ -155,9 +155,9 @@ class BE_SDL_MessageBox : public BAlert
155155
}
156156

157157
(aMessageBoxData->title != NULL) ?
158-
SetTitle(aMessageBoxData->title) : SetTitle(BE_SDL_DefTitle);
158+
SetTitle(aMessageBoxData->title) : SetTitle(HAIKU_SDL_DefTitle);
159159
(aMessageBoxData->message != NULL) ?
160-
SetMessageText(aMessageBoxData->message) : SetMessageText(BE_SDL_DefMessage);
160+
SetMessageText(aMessageBoxData->message) : SetMessageText(HAIKU_SDL_DefMessage);
161161

162162
SetType(ConvertMessageBoxType(static_cast<SDL_MessageBoxFlags>(aMessageBoxData->flags)));
163163
}
@@ -274,7 +274,7 @@ class BE_SDL_MessageBox : public BAlert
274274
fButtons.push_back(&aButtons[i]);
275275
}
276276

277-
std::sort(fButtons.begin(), fButtons.end(), &BE_SDL_MessageBox::SortButtonsPredicate);
277+
std::sort(fButtons.begin(), fButtons.end(), &HAIKU_SDL_MessageBox::SortButtonsPredicate);
278278

279279
size_t countButtons = fButtons.size();
280280
for (size_t i = 0; i < countButtons; ++i)
@@ -304,14 +304,14 @@ class BE_SDL_MessageBox : public BAlert
304304

305305
public:
306306
explicit
307-
BE_SDL_MessageBox(const SDL_MessageBoxData *aMessageBoxData)
307+
HAIKU_SDL_MessageBox(const SDL_MessageBoxData *aMessageBoxData)
308308
: BAlert(NULL, NULL, NULL, NULL, NULL, B_WIDTH_FROM_LABEL, B_WARNING_ALERT),
309309
fComputedMessageBoxWidth(0.0f),
310310
fCloseButton(G_CLOSE_BUTTON_ID), fDefaultButton(G_DEFAULT_BUTTON_ID),
311311
fCustomColorScheme(false), fThereIsLongLine(false),
312-
BE_SDL_DefTitle("SDL2 MessageBox"),
313-
BE_SDL_DefMessage("Some information has been lost."),
314-
BE_SDL_DefButton("OK")
312+
HAIKU_SDL_DefTitle("SDL2 MessageBox"),
313+
HAIKU_SDL_DefMessage("Some information has been lost."),
314+
HAIKU_SDL_DefButton("OK")
315315
{
316316
// MessageBox settings.
317317
// We need a title to display it.
@@ -333,7 +333,7 @@ class BE_SDL_MessageBox : public BAlert
333333
}
334334

335335
virtual
336-
~BE_SDL_MessageBox(void)
336+
~HAIKU_SDL_MessageBox(void)
337337
{
338338
fButtons.clear();
339339
}
@@ -365,7 +365,7 @@ extern "C" {
365365
#endif
366366

367367
int
368-
BE_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
368+
HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
369369
{
370370
// Initialize button by closed or error value first.
371371
*buttonid = G_CLOSE_BUTTON_ID;
@@ -384,10 +384,10 @@ BE_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
384384
}
385385
}
386386

387-
BE_SDL_MessageBox *SDL_MessageBox = new(std::nothrow) BE_SDL_MessageBox(messageboxdata);
387+
HAIKU_SDL_MessageBox *SDL_MessageBox = new(std::nothrow) HAIKU_SDL_MessageBox(messageboxdata);
388388
if (SDL_MessageBox == NULL)
389389
{
390-
return SDL_SetError("Cannot create the BE_SDL_MessageBox (BAlert inheritor) object. Lack of memory?");
390+
return SDL_SetError("Cannot create the HAIKU_SDL_MessageBox (BAlert inheritor) object. Lack of memory?");
391391
}
392392
const int closeButton = SDL_MessageBox->GetCloseButtonId();
393393
int pushedButton = SDL_MessageBox->Go();

src/video/haiku/SDL_bmessagebox.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
4-
Copyright (C) 2018 EXL <exlmotodev@gmail.com>
3+
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4+
Copyright (C) 2018-2019 EXL <exlmotodev@gmail.com>
55
66
This software is provided 'as-is', without any express or implied
77
warranty. In no event will the authors be held liable for any damages
@@ -32,7 +32,7 @@ extern "C" {
3232
#endif
3333

3434
extern int
35-
BE_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
35+
HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
3636

3737
#ifdef __cplusplus
3838
}

0 commit comments

Comments
 (0)