rename g_openDialogs to wxOpenModalDialogsCount and define it in toplevel.cpp to fix wxUniv/GTK linking issues

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-11-17 20:50:44 +00:00
parent 660e7fda2c
commit 64c11164f0
2 changed files with 8 additions and 10 deletions

View File

@@ -20,12 +20,8 @@
#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();
}