From 5db5c1dca04aab70c6da0d8e51099b4a60336357 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Wed, 25 Jan 2012 00:36:23 +0200 Subject: Get rid of gtk_calendar_display_options. This function has been used only for pre-2.4 GTK, is deprecated for long time and is removed in GTK 3. --- .../org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c | 18 ------------------ .../Eclipse SWT PI/gtk/library/os_stats.c | 5 ++--- .../Eclipse SWT PI/gtk/library/os_stats.h | 1 - .../gtk/org/eclipse/swt/internal/gtk/OS.java | 14 -------------- .../gtk/org/eclipse/swt/widgets/DateTime.java | 6 +----- 5 files changed, 3 insertions(+), 41 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 b7aca3fc8c..511f2aa00b 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 @@ -7702,24 +7702,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1calendar_1clear_1marks) } #endif -#ifndef NO__1gtk_1calendar_1display_1options -JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1calendar_1display_1options) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1) -{ - OS_NATIVE_ENTER(env, that, _1gtk_1calendar_1display_1options_FUNC); -/* - gtk_calendar_display_options((GtkCalendar *)arg0, (GtkCalendarDisplayOptions)arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gtk_calendar_display_options) - if (fp) { - ((void (CALLING_CONVENTION*)(GtkCalendar *, GtkCalendarDisplayOptions))fp)((GtkCalendar *)arg0, (GtkCalendarDisplayOptions)arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gtk_1calendar_1display_1options_FUNC); -} -#endif - #ifndef NO__1gtk_1calendar_1get_1date JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1calendar_1get_1date) (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2, jintArray arg3) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c index e3e9a7d6f4..fc78945e22 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c @@ -18,8 +18,8 @@ #ifdef NATIVE_STATS -int OS_nativeFunctionCount = 1380; -int OS_nativeFunctionCallCount[1380]; +int OS_nativeFunctionCount = 1379; +int OS_nativeFunctionCallCount[1379]; char * OS_nativeFunctionNames[] = { #ifndef JNI64 "Call__IIII", @@ -631,7 +631,6 @@ char * OS_nativeFunctionNames[] = { "_1gtk_1button_1new", "_1gtk_1button_1set_1relief", "_1gtk_1calendar_1clear_1marks", - "_1gtk_1calendar_1display_1options", "_1gtk_1calendar_1get_1date", "_1gtk_1calendar_1mark_1day", "_1gtk_1calendar_1new", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h index 494ac90691..311f8bee1f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h @@ -639,7 +639,6 @@ typedef enum { _1gtk_1button_1new_FUNC, _1gtk_1button_1set_1relief_FUNC, _1gtk_1calendar_1clear_1marks_FUNC, - _1gtk_1calendar_1display_1options_FUNC, _1gtk_1calendar_1get_1date_FUNC, _1gtk_1calendar_1mark_1day_FUNC, _1gtk_1calendar_1new_FUNC, 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 c43f3966e9..95aba417a5 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 @@ -6081,20 +6081,6 @@ public static final void gtk_calendar_set_display_options(int /*long*/ calendar, lock.unlock(); } } -/** - * @method flags=dynamic - * @param calendar cast=(GtkCalendar *) - * @param flags cast=(GtkCalendarDisplayOptions) - */ -public static final native void _gtk_calendar_display_options(int /*long*/ calendar, int flags); -public static final void gtk_calendar_display_options(int /*long*/ calendar, int flags) { - lock.lock(); - try { - _gtk_calendar_display_options(calendar, flags); - } finally { - lock.unlock(); - } -} /** * @method flags=dynamic * @param calendar cast=(GtkCalendar *) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java index 0d8c8097a6..020e8a958c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java @@ -343,11 +343,7 @@ void createHandle (int index) { handle = OS.gtk_calendar_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); - if (OS.GTK_VERSION >= OS.VERSION(2, 4, 0)) { - OS.gtk_calendar_set_display_options(handle, OS.GTK_CALENDAR_SHOW_HEADING | OS.GTK_CALENDAR_SHOW_DAY_NAMES); - } else { - OS.gtk_calendar_display_options(handle, OS.GTK_CALENDAR_SHOW_HEADING | OS.GTK_CALENDAR_SHOW_DAY_NAMES); - } + OS.gtk_calendar_set_display_options(handle, OS.GTK_CALENDAR_SHOW_HEADING | OS.GTK_CALENDAR_SHOW_DAY_NAMES); } else { super.createHandle(index); } -- cgit v1.2.3