From: Stefan Csomor <csomor@advancedconcepts.ch>
Date: Wed, 14 Aug 2002 13:01:05 +0000 (+0000)
Subject: added creation of dialog - perhaps needed for all platforms
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1bab9242a9dfbb1067d58e02cf7911c39ea5a27c?ds=inline

added creation of dialog - perhaps needed for all platforms


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/generic/fontdlgg.cpp b/src/generic/fontdlgg.cpp
index 6ca1b71e4c..1e5ecf63dd 100644
--- a/src/generic/fontdlgg.cpp
+++ b/src/generic/fontdlgg.cpp
@@ -167,6 +167,7 @@ void wxGenericFontDialog::Init()
 {
   m_useEvents = FALSE;
   m_previewer = NULL;
+  Create( m_parent ) ;
 }
 
 wxGenericFontDialog::~wxGenericFontDialog()
@@ -180,6 +181,14 @@ void wxGenericFontDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
 
 bool wxGenericFontDialog::DoCreate(wxWindow *parent)
 {
+#ifdef __WXMAC__
+    if ( !wxDialog::Create( parent , -1 , _T("Choose Font") , wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE,
+        _T("fontdialog") ) )
+    {
+        wxFAIL_MSG( wxT("wxFontDialog creation failed") );
+        return FALSE;
+    }
+#endif
   InitializeFont();
   CreateWidgets();
  
@@ -188,7 +197,7 @@ bool wxGenericFontDialog::DoCreate(wxWindow *parent)
 
 int wxGenericFontDialog::ShowModal()
 {
-  int ret = wxDialog::ShowModal();
+    int ret = wxDialog::ShowModal();
 
     if (ret != wxID_CANCEL)
     {