projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
initialize GdkColor so code which incorrectly accesses it will work as well as it...
[wxWidgets.git]
/
src
/
generic
/
msgdlgg.cpp
diff --git
a/src/generic/msgdlgg.cpp
b/src/generic/msgdlgg.cpp
index 37e5a23f1ea416f28bfe4096ca51ef824035bd89..f63df3e469f0d4cf3f5944e25864d288920ea9b5 100644
(file)
--- a/
src/generic/msgdlgg.cpp
+++ b/
src/generic/msgdlgg.cpp
@@
-1,5
+1,5
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: msgdlgg.cpp
+// Name:
src/generic/
msgdlgg.cpp
// Purpose: wxGenericMessageDialog
// Author: Julian Smart, Robert Roebling
// Modified by:
// Purpose: wxGenericMessageDialog
// Author: Julian Smart, Robert Roebling
// Modified by:
@@
-9,10
+9,6
@@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "msgdlgg.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@@
-20,7
+16,7
@@
#pragma hdrstop
#endif
#pragma hdrstop
#endif
-#if wxUSE_MSGDLG && (!defined(__WXGTK20__) || defined(__WXGPE__))
+#if wxUSE_MSGDLG && (!defined(__WXGTK20__) || defined(__WX
UNIVERSAL__) || defined(__WX
GPE__))
#ifndef WX_PRECOMP
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/utils.h"
@@
-33,17
+29,18
@@
#include "wx/icon.h"
#include "wx/sizer.h"
#include "wx/app.h"
#include "wx/icon.h"
#include "wx/sizer.h"
#include "wx/app.h"
+ #include "wx/settings.h"
#endif
#include <stdio.h>
#include <string.h>
#endif
#include <stdio.h>
#include <string.h>
-#include "wx/generic/msgdlgg.h"
+#define __WX_COMPILING_MSGDLGG_CPP__ 1
+#include "wx/msgdlg.h"
#include "wx/artprov.h"
#include "wx/artprov.h"
-#include "wx/settings.h"
#if wxUSE_STATLINE
#if wxUSE_STATLINE
- #include "wx/statline.h"
+
#include "wx/statline.h"
#endif
// ----------------------------------------------------------------------------
#endif
// ----------------------------------------------------------------------------
@@
-65,7
+62,7
@@
wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent,
const wxPoint& pos)
: wxDialog( parent, wxID_ANY, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE )
{
const wxPoint& pos)
: wxDialog( parent, wxID_ANY, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE )
{
-
m_dialogStyle = style
;
+
SetMessageDialogStyle(style)
;
bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
@@
-73,6
+70,7
@@
wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent,
wxBoxSizer *icon_text = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer *icon_text = new wxBoxSizer( wxHORIZONTAL );
+#if wxUSE_STATBMP
// 1) icon
if (style & wxICON_MASK)
{
// 1) icon
if (style & wxICON_MASK)
{
@@
-105,18
+103,25
@@
wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent,
else
icon_text->Add( icon, 0, wxCENTER );
}
else
icon_text->Add( icon, 0, wxCENTER );
}
+#endif // wxUSE_STATBMP
+#if wxUSE_STATTEXT
// 2) text
// 2) text
- icon_text->Add( CreateTextSizer( message ), 0, wxCENTER | wxLEFT, 10 );
+ icon_text->Add( CreateTextSizer( message ), 0, wx
ALIGN_
CENTER | wxLEFT, 10 );
topsizer->Add( icon_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
topsizer->Add( icon_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
+#endif // wxUSE_STATTEXT
+#if wxUSE_STATLINE
// 3) static line
topsizer->Add( new wxStaticLine( this, wxID_ANY ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
// 3) static line
topsizer->Add( new wxStaticLine( this, wxID_ANY ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
+#endif // wxUSE_STATLINE
// 4) buttons
// 4) buttons
+ int center_flag = wxEXPAND;
+ if (style & wxYES_NO) center_flag = wxALIGN_CENTRE;
topsizer->Add( CreateButtonSizer( style & (wxOK|wxCANCEL|wxYES_NO|wxYES_DEFAULT|wxNO_DEFAULT) ),
topsizer->Add( CreateButtonSizer( style & (wxOK|wxCANCEL|wxYES_NO|wxYES_DEFAULT|wxNO_DEFAULT) ),
- 0,
wxCENTRE
| wxALL, 10 );
+ 0,
center_flag
| wxALL, 10 );
SetAutoLayout( true );
SetSizer( topsizer );
SetAutoLayout( true );
SetSizer( topsizer );
@@
-147,11
+152,11
@@
void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
{
// Allow cancellation via ESC/Close button except if
// only YES and NO are specified.
{
// Allow cancellation via ESC/Close button except if
// only YES and NO are specified.
- if ( (m_dialogStyle & wxYES_NO) != wxYES_NO || (m_dialogStyle & wxCANCEL) )
+ const long style = GetMessageDialogStyle();
+ if ( (style & wxYES_NO) != wxYES_NO || (style & wxCANCEL) )
{
EndModal( wxID_CANCEL );
}
}
#endif // wxUSE_MSGDLG && !defined(__WXGTK20__)
{
EndModal( wxID_CANCEL );
}
}
#endif // wxUSE_MSGDLG && !defined(__WXGTK20__)
-