]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/msgdlg.cpp
added wxMemoryInputStream(wxInputStream&, size_t) ctor (modified patch 1680108)
[wxWidgets.git] / src / gtk / msgdlg.cpp
index 6c12db782e0bdceab0a9e46fb88c8d8e6848e994..e2b0a4ef26421f0d7cda8f5c7cc0db9aeabb433e 100644 (file)
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
 #if wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__)
 
 #include "wx/msgdlg.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/intl.h"
+#endif
+
 #include "wx/gtk/private.h"
 #include <gtk/gtk.h>
 
-#include "wx/intl.h"
-
 IMPLEMENT_CLASS(wxMessageDialog, wxDialog)
 
 wxMessageDialog::wxMessageDialog(wxWindow *parent,
@@ -42,7 +45,10 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
 
     if (style & wxYES_NO)
     {
-        buttons = GTK_BUTTONS_YES_NO;
+        if (style & wxCANCEL)
+            buttons = GTK_BUTTONS_NONE;
+        else
+            buttons = GTK_BUTTONS_YES_NO;
     }
 
     if (style & wxOK)
@@ -78,8 +84,14 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
     if (style & wxYES_NO)
     {
         if (style & wxCANCEL)
+        {
+            gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_NO,
+                                  GTK_RESPONSE_NO);
             gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_CANCEL,
                                   GTK_RESPONSE_CANCEL);
+            gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_YES,
+                                  GTK_RESPONSE_YES);
+        }
         if (style & wxNO_DEFAULT)
             gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_NO);
         else
@@ -126,5 +138,4 @@ int wxMessageDialog::ShowModal()
 }
 
 
-#endif // wxUSE_MSGDLG && defined(__WXGTK20__)
-
+#endif // wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__)