]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/dialog.cpp
Modified OnSashPositionChange to take an int& instead of an int.
[wxWidgets.git] / src / gtk1 / dialog.cpp
index ee60f258f2873bb61975b7746d2b90f91e9eb5e6..a6616c919c496678ce923d704c210907b9f362f3 100644 (file)
@@ -245,6 +245,8 @@ bool wxDialog::Create( wxWindow *parent,
 
 wxDialog::~wxDialog()
 {
+    m_isBeingDeleted = TRUE;
+    
     wxTopLevelWindows.DeleteObject( this );
 
     if (wxTheApp->GetTopWindow() == this)
@@ -290,18 +292,14 @@ void wxDialog::OnCancel( wxCommandEvent &WXUNUSED(event) )
 
 void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
 {
-    printf( "OnOK 1.\n" );
     if (Validate() && TransferDataFromWindow())
     {
-        printf( "OnOK 2.\n" );
         if (IsModal())
         {
-            printf( "OnOK: modal.\n" );
             EndModal(wxID_OK);
         }
         else
         {
-            printf( "OnOK: non-modal.\n" );
             SetReturnCode(wxID_OK);
             this->Show(FALSE);
         }
@@ -577,6 +575,8 @@ void wxDialog::SetIcon( const wxIcon &icon )
     m_icon = icon;
     if (!icon.Ok()) return;
 
+    if (!m_widget->window) return;
+
     wxMask *mask = icon.GetMask();
     GdkBitmap *bm = (GdkBitmap *) NULL;
     if (mask) bm = mask->GetBitmap();