- if (m_windowStyle & wxTE_MULTILINE)
- {
- gint pos = 0;
- gtk_editable_insert_text( GTK_EDITABLE(m_text), text, len, &pos );
- }
- else
- {
- gtk_entry_set_text( GTK_ENTRY(m_text), text );
+ gtk_signal_disconnect_by_func( GTK_OBJECT(m_text),
+ GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
+
+ if (m_windowStyle & wxTE_MULTILINE)
+ {
+ gint pos = 0;
+ gtk_editable_insert_text( GTK_EDITABLE(m_text), text, len, &pos );
+ }
+ else
+ {
+ gtk_entry_set_text( GTK_ENTRY(m_text), text );
+ }
+
+ gtk_signal_connect( GTK_OBJECT(m_text), "changed",
+ GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
+
+ free (text);
+ m_modified = FALSE;
+ return TRUE;