]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dialog.cpp
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / src / gtk / dialog.cpp
index dc66c237787529d7274c1901a0d048f7acacb01d..fe9a0036c2ccfc19736164db2c7bdc283f220439 100644 (file)
 
 #include <gtk/gtk.h>
 
-//-----------------------------------------------------------------------------
-// global data
-//-----------------------------------------------------------------------------
-
-// Don't allow window closing if there are open dialogs
-int g_openDialogs;
+// this is defined in src/gtk/toplevel.cpp
+extern int wxOpenModalDialogsCount;
 
 //-----------------------------------------------------------------------------
 // wxDialog
@@ -120,7 +116,7 @@ int wxDialog::ShowModal()
 
     m_modalShowing = true;
 
-    g_openDialogs++;
+    wxOpenModalDialogsCount++;
 
     // NOTE: gtk_window_set_modal internally calls gtk_grab_add() !
     gtk_window_set_modal(GTK_WINDOW(m_widget), TRUE);
@@ -129,7 +125,7 @@ int wxDialog::ShowModal()
 
     gtk_window_set_modal(GTK_WINDOW(m_widget), FALSE);
 
-    g_openDialogs--;
+    wxOpenModalDialogsCount--;
 
     return GetReturnCode();
 }