]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/msgdlg.cpp
Disable wxUSE_ENH_METAFILE for wxGTK builds.
[wxWidgets.git] / src / gtk / msgdlg.cpp
index 906867c25415689f1bebe3d075122f6cfbf11274..6d1104ae6272f90466f67d11b19d9885180b5001 100644 (file)
     #include "wx/intl.h"
 #endif
 
     #include "wx/intl.h"
 #endif
 
+#include "wx/modalhook.h"
+
 #include <gtk/gtk.h>
 #include "wx/gtk/private.h"
 #include "wx/gtk/private/messagetype.h"
 #include "wx/gtk/private/mnemonics.h"
 #include <gtk/gtk.h>
 #include "wx/gtk/private.h"
 #include "wx/gtk/private/messagetype.h"
 #include "wx/gtk/private/mnemonics.h"
+#include "wx/gtk/private/dialogcount.h"
 
 #if wxUSE_LIBHILDON
     #include <hildon-widgets/hildon-note.h>
 
 #if wxUSE_LIBHILDON
     #include <hildon-widgets/hildon-note.h>
@@ -273,6 +276,8 @@ void wxMessageDialog::GTKCreateMsgDialog()
 
 int wxMessageDialog::ShowModal()
 {
 
 int wxMessageDialog::ShowModal()
 {
+    WX_HOOK_MODAL_DIALOG();
+
     // break the mouse capture as it would interfere with modal dialog (see
     // wxDialog::ShowModal)
     wxWindow * const win = wxWindow::GetCapture();
     // break the mouse capture as it would interfere with modal dialog (see
     // wxDialog::ShowModal)
     wxWindow * const win = wxWindow::GetCapture();
@@ -291,7 +296,10 @@ int wxMessageDialog::ShowModal()
     if (m_parent)
         gtk_window_present( GTK_WINDOW(m_parent->m_widget) );
 
     if (m_parent)
         gtk_window_present( GTK_WINDOW(m_parent->m_widget) );
 
+    wxOpenModalDialogLocker modalLocker;
+
     gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
     gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
+    GTKDisconnect(m_widget);
     gtk_widget_destroy(m_widget);
     g_object_unref(m_widget);
     m_widget = NULL;
     gtk_widget_destroy(m_widget);
     g_object_unref(m_widget);
     m_widget = NULL;