summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatoly Spektor <aspektor@redhat.com>2012-08-08 17:13:02 -0400
committerAnatoly Spektor <aspektor@redhat.com>2012-08-08 17:13:02 -0400
commit70ee8f1bcbdc65eccc6fc4743b12434df472d8ab (patch)
tree89d411c2a3aff885010b281756c30b7b8376e406
parent20845387f4c107d57b920af308b15b14cb2464fc (diff)
downloadeclipse.platform.swt-gtk_accel_string.tar.gz
eclipse.platform.swt-gtk_accel_string.tar.xz
eclipse.platform.swt-gtk_accel_string.zip
Omit use of deprecated SET_ACCEL_STRING and GET_ACCEL_STRING constantsgtk_accel_string
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java5
6 files changed, 3 insertions, 77 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 484442f232..358fc0c85d 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
@@ -115,28 +115,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(GPollFD_1sizeof)
}
#endif
-#ifndef NO_GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING
-JNIEXPORT jintLong JNICALL OS_NATIVE(GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING_FUNC);
- rc = (jintLong)GTK_ACCEL_LABEL_GET_ACCEL_STRING((GtkAccelLabel *)arg0);
- OS_NATIVE_EXIT(env, that, GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO_GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING
-JNIEXPORT void JNICALL OS_NATIVE(GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- OS_NATIVE_ENTER(env, that, GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING_FUNC);
- GTK_ACCEL_LABEL_SET_ACCEL_STRING((GtkAccelLabel *)arg0, (gchar *)arg1);
- OS_NATIVE_EXIT(env, that, GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING_FUNC);
-}
-#endif
-
#ifndef NO_GTK_1ENTRY_1IM_1CONTEXT
JNIEXPORT jintLong JNICALL OS_NATIVE(GTK_1ENTRY_1IM_1CONTEXT)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -7326,26 +7304,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1accel_1group_1new)
}
#endif
-#ifndef NO__1gtk_1accel_1label_1get_1accel_1widget
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1accel_1label_1get_1accel_1widget)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, _1gtk_1accel_1label_1get_1accel_1widget_FUNC);
-/*
- rc = (jintLong)gtk_accel_label_get_accel_widget((GtkAccelLabel *)arg0);
-*/
- {
- OS_LOAD_FUNCTION(fp, gtk_accel_label_get_accel_widget)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkAccelLabel *))fp)((GtkAccelLabel *)arg0);
- }
- }
- OS_NATIVE_EXIT(env, that, _1gtk_1accel_1label_1get_1accel_1widget_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1gtk_1accel_1label_1set_1accel_1widget
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1accel_1label_1set_1accel_1widget)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
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 a5cc1eee30..62239e9019 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
@@ -326,7 +326,6 @@
#define gtk_printer_get_backend_LIB LIB_GTK
#define gtk_printer_get_name_LIB LIB_GTK
#define gtk_printer_is_default_LIB LIB_GTK
-#define gtk_accel_label_get_accel_widget_LIB LIB_GTK
#define ubuntu_menu_proxy_get_LIB LIB_GTK
#define FcConfigAppFontAddFile_LIB LIB_FONTCONFIG
@@ -366,8 +365,6 @@
/* Field accessors */
#define G_OBJECT_CLASS_CONSTRUCTOR(arg0) (arg0)->constructor
#define G_OBJECT_CLASS_SET_CONSTRUCTOR(arg0, arg1) (arg0)->constructor = (GObject* (*) (GType, guint, GObjectConstructParam *))arg1
-#define GTK_ACCEL_LABEL_SET_ACCEL_STRING(arg0, arg1) (arg0)->accel_string = arg1
-#define GTK_ACCEL_LABEL_GET_ACCEL_STRING(arg0) (arg0)->accel_string
#define GTK_RANGE_SLIDER_START(arg0) (arg0)->slider_start
#define GTK_RANGE_SLIDER_END(arg0) (arg0)->slider_end
#define GTK_RANGE_HAS_STEPPER_A(arg0) (arg0)->has_stepper_a
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 f2ab3345d4..6b9261b149 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 = 1336;
-int OS_nativeFunctionCallCount[1336];
+int OS_nativeFunctionCount = 1333;
+int OS_nativeFunctionCallCount[1333];
char * OS_nativeFunctionNames[] = {
#ifndef JNI64
"Call__IIII",
@@ -36,8 +36,6 @@ char * OS_nativeFunctionNames[] = {
"GDK_1WINDOWING_1X11",
"GInterfaceInfo_1sizeof",
"GPollFD_1sizeof",
- "GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING",
- "GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING",
"GTK_1ENTRY_1IM_1CONTEXT",
"GTK_1RANGE_1HAS_1STEPPER_1A",
"GTK_1RANGE_1HAS_1STEPPER_1B",
@@ -587,7 +585,6 @@ char * OS_nativeFunctionNames[] = {
"_1glib_1micro_1version",
"_1glib_1minor_1version",
"_1gtk_1accel_1group_1new",
- "_1gtk_1accel_1label_1get_1accel_1widget",
"_1gtk_1accel_1label_1set_1accel_1widget",
"_1gtk_1accelerator_1get_1default_1mod_1mask",
"_1gtk_1accelerator_1parse",
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 cc5ebec505..650bbb409c 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
@@ -44,8 +44,6 @@ typedef enum {
GDK_1WINDOWING_1X11_FUNC,
GInterfaceInfo_1sizeof_FUNC,
GPollFD_1sizeof_FUNC,
- GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING_FUNC,
- GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING_FUNC,
GTK_1ENTRY_1IM_1CONTEXT_FUNC,
GTK_1RANGE_1HAS_1STEPPER_1A_FUNC,
GTK_1RANGE_1HAS_1STEPPER_1B_FUNC,
@@ -595,7 +593,6 @@ typedef enum {
_1glib_1micro_1version_FUNC,
_1glib_1minor_1version_FUNC,
_1gtk_1accel_1group_1new_FUNC,
- _1gtk_1accel_1label_1get_1accel_1widget_FUNC,
_1gtk_1accel_1label_1set_1accel_1widget_FUNC,
_1gtk_1accelerator_1get_1default_1mod_1mask_FUNC,
_1gtk_1accelerator_1parse_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 9fa691a87f..b20c122295 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
@@ -717,13 +717,6 @@ public static final native int /*long*/ GTK_SCROLLED_WINDOW_HSCROLLBAR(int /*lon
public static final native int /*long*/ GTK_SCROLLED_WINDOW_VSCROLLBAR(int /*long*/ widget);
/** @param widget cast=(GtkScrolledWindow *) */
public static final native int GTK_SCROLLED_WINDOW_SCROLLBAR_SPACING(int /*long*/ widget);
-/**
- * @param acce_label cast=(GtkAccelLabel *)
- * @param string cast=(gchar *)
- */
-public static final native void GTK_ACCEL_LABEL_SET_ACCEL_STRING(int /*long*/ acce_label, int /*long*/ string);
-/** @param acce_label cast=(GtkAccelLabel *) */
-public static final native int /*long*/ GTK_ACCEL_LABEL_GET_ACCEL_STRING(int /*long*/ acce_label);
/** @param widget cast=(GtkEntry *) */
public static final native int /*long*/ GTK_ENTRY_IM_CONTEXT(int /*long*/ widget);
/** @param widget cast=(GtkTextView *) */
@@ -5496,19 +5489,6 @@ public static final void gtk_accel_label_set_accel_widget(int /*long*/ accel_lab
lock.unlock();
}
}
-/**
- * @method flags=dynamic
- * @param accel_label cast=(GtkAccelLabel *)
- * */
-public static final native int /*long*/ _gtk_accel_label_get_accel_widget(int /*long*/ accel_label);
-public static final int /*long*/ gtk_accel_label_get_accel_widget(int /*long*/ accel_label) {
- lock.lock();
- try {
- return _gtk_accel_label_get_accel_widget(accel_label);
- } finally {
- lock.unlock();
- }
-}
/** @param adjustment cast=(GtkAdjustment *) */
public static final native void _gtk_adjustment_changed(int /*long*/ adjustment);
public static final void gtk_adjustment_changed(int /*long*/ adjustment) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
index 2b51d4973d..cf56c9e8d8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
@@ -899,10 +899,7 @@ public void setText (String string) {
int /*long*/ ptr = OS.g_malloc (buffer.length);
OS.memmove (ptr, buffer, buffer.length);
if (OS.GTK_IS_ACCEL_LABEL(label)) {
- int /*long*/ oldPtr = OS.GTK_ACCEL_LABEL_GET_ACCEL_STRING (label);
- System.out.println("Old "+oldPtr+" New: " + OS.gtk_accel_label_get_accel_widget(label));
- OS.GTK_ACCEL_LABEL_SET_ACCEL_STRING (label, ptr);
- if (oldPtr != 0) OS.g_free (oldPtr);
+ OS.gtk_accel_label_set_accel_widget (label, handle);
}
}
}