[wxGTK2] Support wxTEXT_ALIGNMENT_JUSTIFIED in wxTextCtrl if GTK+ version is at least 2.11. This is for future benefits as stable gtk+-2.12 should come out much before wxWidgets new stable cycle

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp
2007-05-11 07:25:07 +00:00
parent 36def90d09
commit 5dd5470a3b
2 changed files with 12 additions and 1 deletions

View File

@@ -144,7 +144,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);