]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/dialog.cpp
added pragmas to disable icc warning when va_arg is used with a pointer type
[wxWidgets.git] / src / motif / dialog.cpp
index 84ca36e6db39082941c35c982da5a26393918e9b..0b812eadba4a4bd01c9b8ef9613ca964903f8bc5 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "dialog.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -151,12 +147,13 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
     return true;
 }
 
-bool wxDialog::DoCreate( wxWindow* parent, wxWindowID id,
-                         const wxString& title,
-                         const wxPoint& pos,
-                         const wxSize& size,
-                         long style,
-                         const wxString& name )
+bool wxDialog::XmDoCreateTLW(wxWindow* parent,
+                             wxWindowID id,
+                             const wxString& title,
+                             const wxPoint& pos,
+                             const wxSize& size,
+                             long style,
+                             const wxString& name)
 {
     Widget parentWidget = (Widget) 0;
     if( parent )
@@ -233,12 +230,8 @@ wxDialog::~wxDialog()
     }
 
     PreDestroy();
-    DoDestroy();
-}
 
-void wxDialog::DoDestroy()
-{
-    if( m_mainWidget )
+    if ( m_mainWidget )
     {
         wxDeleteWindowFromTable( (Widget)m_mainWidget );
         XtDestroyWidget( (Widget)m_mainWidget );
@@ -296,6 +289,14 @@ bool wxDialog::Show( bool show )
 
     m_isShown = show;
 
+    if (show)
+    {
+        // this usually will result in TransferDataToWindow() being called
+        // which will change the controls values so do it before showing as
+        // otherwise we could have some flicker
+        InitDialog();
+    }
+
     if (show)
     {
         if (!wxUSE_INVISIBLE_RESIZE)
@@ -365,6 +366,8 @@ void wxDialog::EndModal(int retCode)
 
     m_modalShowing = false;
     m_eventLoop->Exit();
+
+    SetModal(false);
 }
 
 // Standard buttons