#include "gtk/gtk.h"
#include "gdk/gdkkeysyms.h"
+//-----------------------------------------------------------------------------
+// idle system
+//-----------------------------------------------------------------------------
+
+extern void wxapp_install_idle_handler();
+extern bool g_isIdle;
+
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
static void
gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
if (!win->m_hasVMT) return;
win->SetModified();
static void
gtk_scrollbar_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
if (!win->m_hasVMT) return;
win->CalculateScrollbar();
if (multi_line)
{
- gtk_widget_realize(m_text);
+// gtk_widget_realize(m_text);
gtk_widget_show(m_text);
}
{
gint len = gtk_text_get_length( GTK_TEXT(m_text) );
char *text = gtk_editable_get_chars( GTK_EDITABLE(m_text), 0, len );
-#if wxUSE_UNICODE
tmp = wxString(text,*wxConv_current);
-#else
- tmp = text;
-#endif
g_free( text );
}
else
{
- tmp = gtk_entry_get_text( GTK_ENTRY(m_text) );
+ tmp = wxString(gtk_entry_get_text( GTK_ENTRY(m_text) ),*wxConv_current);
}
return tmp;
}