]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/app.cpp
Fixed a bug so the toggle flag is set correctly
[wxWidgets.git] / src / gtk / app.cpp
index 965f9967f221c4ca1f57f1f4dba9b3110ca13314..ba0fd8ed6b4f902579a1d912ad66df54f84d08c9 100644 (file)
@@ -111,7 +111,7 @@ void wxWakeUpIdle()
 {
 #if wxUSE_THREADS
     if (!wxThread::IsMain())
-        gdk_threads_enter();
+        wxMutexGuiEnter();
 #endif
 
     if (g_isIdle) 
@@ -119,7 +119,7 @@ void wxWakeUpIdle()
     
 #if wxUSE_THREADS
     if (!wxThread::IsMain())
-        gdk_threads_leave();
+        wxMutexGuiLeave();
 #endif
 }
 
@@ -194,7 +194,6 @@ gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) )
     // when getting called from GDK's time-out handler
     // we are no longer within GDK's grab on the GUI
     // thread so we must lock it here ourselves
-    
     gdk_threads_enter();
 
     wxapp_uninstall_thread_wakeup();
@@ -477,17 +476,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;
 
@@ -498,15 +496,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();