diff options
author | Alexander Kurtakov <akurtako@redhat.com> | 2012-01-25 01:15:11 +0200 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-01-31 17:50:28 -0500 |
commit | 6a6819c42d1e3be98b1484b2432fe381c3569546 (patch) | |
tree | 74282a9b7d55d08fbf747551cae3b31292f47a30 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java | |
parent | 5db5c1dca04aab70c6da0d8e51099b4a60336357 (diff) | |
download | eclipse.platform.swt-6a6819c42d1e3be98b1484b2432fe381c3569546.tar.gz eclipse.platform.swt-6a6819c42d1e3be98b1484b2432fe381c3569546.tar.xz eclipse.platform.swt-6a6819c42d1e3be98b1484b2432fe381c3569546.zip |
Make gdk_pango_context_set_colormap dynamic.
This function needs to be called only on GTK versions prior to 2.6. On
newer versions the colormap is set automatically.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java index bf75352497..23f6ec879b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java @@ -612,7 +612,12 @@ void createLayout() { data.layout = layout; OS.pango_context_set_language(context, OS.gtk_get_default_language()); OS.pango_context_set_base_dir(context, (data.style & SWT.MIRRORED) != 0 ? OS.PANGO_DIRECTION_RTL : OS.PANGO_DIRECTION_LTR); - OS.gdk_pango_context_set_colormap(context, OS.gdk_colormap_get_system()); + /* + * Colormap is automatically set for GTK 2.6.0 and newer. + */ + if (OS.GTK_VERSION < OS.VERSION(2, 6, 0)) { + OS.gdk_pango_context_set_colormap(context, OS.gdk_colormap_get_system()); + } if (OS.GTK_VERSION >= OS.VERSION(2, 4, 0)) { OS.pango_layout_set_auto_dir(layout, false); } |