diff options
| author | Alexander Kurtakov | 2011-12-13 22:07:19 +0000 |
|---|---|---|
| committer | Silenio Quarti | 2012-01-20 17:30:05 +0000 |
| commit | 8ec41706f7dfc4f4b8a5be57c3df193eec4545a2 (patch) | |
| tree | 5cce1faad6c71cf3e9ee77167fb7118578d8a406 | |
| parent | 9d8bc4eaeeb5f3a034598df91710e598770f6a2b (diff) | |
| download | eclipse.platform.swt-8ec41706f7dfc4f4b8a5be57c3df193eec4545a2.tar.gz eclipse.platform.swt-8ec41706f7dfc4f4b8a5be57c3df193eec4545a2.tar.xz eclipse.platform.swt-8ec41706f7dfc4f4b8a5be57c3df193eec4545a2.zip | |
Bug 369152 - Make gtk_set_locale dynamic. (reviewed)
5 files changed, 16 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c index 378b22b858..714d5b5b35 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c @@ -13043,7 +13043,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1set_1locale) { jintLong rc = 0; OS_NATIVE_ENTER(env, that, _1gtk_1set_1locale_FUNC); +/* rc = (jintLong)gtk_set_locale(); +*/ + { + OS_LOAD_FUNCTION(fp, gtk_set_locale) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)(); + } + } OS_NATIVE_EXIT(env, that, _1gtk_1set_1locale_FUNC); return rc; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h index 9020f7f850..f52d9290de 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h @@ -126,6 +126,7 @@ #define gtk_menu_item_remove_submenu_LIB LIB_GTK #define gtk_menu_shell_set_take_focus_LIB LIB_GTK #define gtk_window_set_keep_below_LIB LIB_GTK +#define gtk_set_locale_LIB LIB_GTK #define gtk_toolbar_set_orientation_LIB LIB_GTK #define gtk_tooltip_trigger_tooltip_query_LIB LIB_GTK #define gtk_tooltips_set_tip_LIB LIB_GTK diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java index 1c402afc4b..c17328018f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java @@ -10077,6 +10077,7 @@ public static final int /*long*/ gtk_separator_menu_item_new() { lock.unlock(); } } +/** @method flags=dynamic */ public static final native int /*long*/ _gtk_set_locale(); public static final int /*long*/ gtk_set_locale() { lock.lock(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java index 7957addae0..73f04041d4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java @@ -73,7 +73,9 @@ static void gtk_init() { if (!OS.g_thread_supported ()) { OS.g_thread_init (0); } - OS.gtk_set_locale(); + if (OS.GTK_VERSION < OS.VERSION(2, 24, 0)) { + OS.gtk_set_locale(); + } if (!OS.gtk_init_check (new int /*long*/ [] {0}, null)) { SWT.error (SWT.ERROR_NO_HANDLES, null, " [gtk_init_check() failed]"); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java index 2f05d62981..3aadcabda2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java @@ -905,7 +905,9 @@ void createDisplay (DeviceData data) { if (!OS.g_thread_supported ()) { OS.g_thread_init (0); } - OS.gtk_set_locale(); + if (OS.GTK_VERSION < OS.VERSION(2, 24, 0)) { + OS.gtk_set_locale(); + } if (!OS.gtk_init_check (new int /*long*/ [] {0}, null)) { SWT.error (SWT.ERROR_NO_HANDLES, null, " [gtk_init_check() failed]"); //$NON-NLS-1$ } |
