]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/app.cpp
Bug fix in GetLabelFromText
[wxWidgets.git] / src / gtk1 / app.cpp
index 7bc83fdbd7deb4b3816b14b56c81aeed255db09e..c0004485a60b90465f7fcacbcfa0540f71f43ad7 100644 (file)
@@ -49,6 +49,8 @@ wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NUL
 
 extern bool g_isIdle;
 
+bool g_mainThreadLocked = FALSE;
+
 //-----------------------------------------------------------------------------
 // local functions
 //-----------------------------------------------------------------------------
@@ -200,6 +202,8 @@ gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) )
 
     // unblock other threads wishing to do some GUI things
     wxMutexGuiLeave();
+    
+    g_mainThreadLocked = TRUE;
 
     // wake up other threads
     wxUsleep( 1 );
@@ -207,6 +211,8 @@ gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) )
     // block other thread again
     wxMutexGuiEnter();
 
+    g_mainThreadLocked = FALSE;
+
     wxapp_install_thread_wakeup();
 
     // release lock again
@@ -476,17 +482,16 @@ bool wxApp::Initialize()
     wxPendingEventsLocker = new wxCriticalSection();
 #endif
 
-/*
-    wxTheFontNameDirectory =  new wxFontNameDirectory;
-    wxTheFontNameDirectory->Initialize();
-*/
-
     wxTheColourDatabase = new wxColourDatabase( wxKEY_STRING );
     wxTheColourDatabase->Initialize();
 
     wxInitializeStockLists();
     wxInitializeStockObjects();
 
+#if wxUSE_WX_RESOURCES
+    wxInitializeResourceSystem();
+#endif
+
     wxModule::RegisterModules();
     if (!wxModule::InitializeModules()) return FALSE;
 
@@ -497,15 +502,15 @@ void wxApp::CleanUp()
 {
     wxModule::CleanUpModules();
 
+#if wxUSE_WX_RESOURCES
+    wxCleanUpResourceSystem();
+#endif
+
     if (wxTheColourDatabase)
         delete wxTheColourDatabase;
+        
     wxTheColourDatabase = (wxColourDatabase*) NULL;
 
-/*
-    if (wxTheFontNameDirectory) delete wxTheFontNameDirectory;
-    wxTheFontNameDirectory = (wxFontNameDirectory*) NULL;
-*/
-
     wxDeleteStockObjects();
 
     wxDeleteStockLists();