mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 06:01:13 +02:00
Move AudacityMessageBox to its own files...
... breaking cycles among low-level files introduced by 273ba9f
This commit is contained in:
17
src/widgets/AudacityMessageBox.cpp
Normal file
17
src/widgets/AudacityMessageBox.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
AudacityMessageBox.cpp
|
||||
|
||||
Paul Licameli split this out of ErrorDialog.cpp
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "AudacityMessageBox.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
wxString AudacityMessageBoxCaptionStr()
|
||||
{
|
||||
return _("Message");
|
||||
}
|
28
src/widgets/AudacityMessageBox.h
Normal file
28
src/widgets/AudacityMessageBox.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
AudacityMessageBox.h
|
||||
|
||||
Paul Licameli split this out of ErrorDialog.h
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_MESSAGE_BOX__
|
||||
#define __AUDACITY_MESSAGE_BOX__
|
||||
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
extern wxString AudacityMessageBoxCaptionStr();
|
||||
|
||||
// Do not use wxMessageBox!! Its default window title does not translate!
|
||||
inline int AudacityMessageBox(const wxString& message,
|
||||
const wxString& caption = AudacityMessageBoxCaptionStr(),
|
||||
long style = wxOK | wxCENTRE,
|
||||
wxWindow *parent = NULL,
|
||||
int x = wxDefaultCoord, int y = wxDefaultCoord)
|
||||
{
|
||||
return ::wxMessageBox(message, caption, style, parent, x, y);
|
||||
}
|
||||
|
||||
#endif
|
@@ -169,11 +169,6 @@ void ShowModelessErrorDialog(wxWindow *parent,
|
||||
// but in practice Destroy() in OnOK does that
|
||||
}
|
||||
|
||||
extern wxString AudacityMessageBoxCaptionStr()
|
||||
{
|
||||
return _("Message");
|
||||
}
|
||||
|
||||
void AudacityTextEntryDialog::SetInsertionPointEnd()
|
||||
{
|
||||
mSetInsertionPointEnd = true;
|
||||
|
@@ -58,19 +58,6 @@ void ShowModelessErrorDialog(wxWindow *parent,
|
||||
const wxString &helpPage,
|
||||
bool Close = true);
|
||||
|
||||
extern wxString AudacityMessageBoxCaptionStr();
|
||||
|
||||
// Do not use wxMessageBox!! Its default window title does not translate!
|
||||
inline int AudacityMessageBox(const wxString& message,
|
||||
const wxString& caption = AudacityMessageBoxCaptionStr(),
|
||||
long style = wxOK | wxCENTRE,
|
||||
wxWindow *parent = NULL,
|
||||
int x = wxDefaultCoord, int y = wxDefaultCoord)
|
||||
{
|
||||
return ::wxMessageBox(message, caption, style, parent, x, y);
|
||||
}
|
||||
|
||||
|
||||
#include <wx/textdlg.h> // to inherit
|
||||
|
||||
/**************************************************************************//**
|
||||
|
@@ -27,7 +27,8 @@
|
||||
|
||||
#include <wx/setup.h> // for wxUSE_* macros
|
||||
|
||||
#include "ErrorDialog.h"
|
||||
#include "AudacityMessageBox.h"
|
||||
#include "../Internat.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
|
Reference in New Issue
Block a user