g_isIdle = FALSE;
}
-/*
#if wxUSE_THREADS
-static gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) )
+
+/* forward declaration */
+static gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) );
+
+void wxapp_install_thread_wakeup()
{
+ if (wxTheApp->m_wakeUpTimerTag) return;
+
+ wxTheApp->m_wakeUpTimerTag = gtk_timeout_add( 100, wxapp_wakeup_timerout_callback, (gpointer) NULL );
+}
+
+void wxapp_uninstall_thread_wakeup()
+{
+ if (!wxTheApp->m_wakeUpTimerTag) return;
+
gtk_timeout_remove( wxTheApp->m_wakeUpTimerTag );
wxTheApp->m_wakeUpTimerTag = 0;
+}
+
+static gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) )
+{
+ wxapp_uninstall_thread_wakeup();
#if (GTK_MINOR_VERSION > 0)
// when getting called from GDK's time-out handler
GDK_THREADS_LEAVE ();
#endif
- wxTheApp->m_wakeUpTimerTag = gtk_timeout_add( 20, wxapp_wakeup_timerout_callback, (gpointer) NULL );
+ wxapp_install_thread_wakeup();
return TRUE;
}
#endif
-*/
//-----------------------------------------------------------------------------
// wxApp
m_idleTag = gtk_idle_add( wxapp_idle_callback, (gpointer) NULL );
-/*
#if wxUSE_THREADS
- m_wakeUpTimerTag = gtk_timeout_add( 20, wxapp_wakeup_timerout_callback, (gpointer) NULL );
+ m_wakeUpTimerTag = 0;
+ wxapp_install_thread_wakeup();
#endif
-*/
m_colorCube = (unsigned char*) NULL;
}
{
if (m_idleTag) gtk_idle_remove( m_idleTag );
-/*
#if wxUSE_THREADS
- if (m_wakeUpTimerTag) gtk_timeout_remove( m_wakeUpTimerTag );
+ wxapp_uninstall_thread_wakeup();
#endif
-*/
if (m_colorCube) free(m_colorCube);
}
wxCHECK_MSG( wxTheApp, -1, _T("wxWindows error: no application object") );
wxTheApp->argc = argc;
+#if wxUSE_UNICODE
+ wxTheApp->argv = new wxChar*[argc+1];
+ int mb_argc = 0;
+ while (mb_argc < argc) {
+ wxTheApp->argv[mb_argc] = wxStrdup(wxConvLibc.cMB2WX(argv[mb_argc]));
+ mb_argc++;
+ }
+ wxTheApp->argv[mb_argc] = (wxChar *)NULL;
+#else
wxTheApp->argv = argv;
+#endif
wxString name(wxFileNameFromPath(argv[0]));
wxStripExtension( name );
return wxIcon(warning_xpm);
default:
- wxFAIL_MSG("requested non existent standard icon");
+ wxFAIL_MSG(_T("requested non existent standard icon"));
// still fall through
case wxICON_HAND: