X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5440a04fa89937d7977c485d88183295dede061d..2c6725e622910760652e23b9ff7ea16f76a60436:/src/gtk/textctrl.cpp?ds=sidebyside diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 1a1985f805..d21be8967f 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -159,7 +159,16 @@ static void wxGtkTextApplyTagsFromAttr(GtkWidget *text, case wxTEXT_ALIGNMENT_CENTER: align = GTK_JUSTIFY_CENTER; break; - // gtk+ doesn't support justify as of gtk+-2.7.4 +// gtk+ doesn't support justify before gtk+-2.11.0 with pango-1.17 being available +// (but if new enough pango isn't available it's a mere gtk warning) +#if GTK_CHECK_VERSION(2,11,0) + case wxTEXT_ALIGNMENT_JUSTIFIED: + if (!gtk_check_version(2,11,0)) + align = GTK_JUSTIFY_FILL; + else + align = GTK_JUSTIFY_LEFT; + break; +#endif } g_snprintf(buf, sizeof(buf), "WXALIGNMENT %d", align); @@ -298,9 +307,6 @@ gtk_insert_text_callback(GtkEditable *editable, gint *position, wxTextCtrl *win) { - if (g_isIdle) - wxapp_install_idle_handler(); - // we should only be called if we have a max len limit at all GtkEntry *entry = GTK_ENTRY (editable); @@ -547,9 +553,6 @@ gtk_text_changed_callback( GtkWidget *widget, wxTextCtrl *win ) if (!win->m_hasVMT) return; - if (g_isIdle) - wxapp_install_idle_handler(); - if ( win->MarkDirtyOnChange() ) win->MarkDirty(); @@ -691,8 +694,6 @@ bool wxTextCtrl::Create( wxWindow *parent, const wxValidator& validator, const wxString &name ) { - m_needParent = true; - if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, validator, name )) {