Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-09-17 12:21:58 +0000
committerAlexander Kurtakov2018-09-17 12:21:58 +0000
commita313c8ddf51c1ec98cba03ae96404b91038e0ee7 (patch)
tree455e64506edf6a7de6e997415d9ef75fa9020248
parent2c981a5d0ca27f5265fb0d25636bb1ffc8df676b (diff)
downloadeclipse.platform.swt-a313c8ddf51c1ec98cba03ae96404b91038e0ee7.tar.gz
eclipse.platform.swt-a313c8ddf51c1ec98cba03ae96404b91038e0ee7.tar.xz
eclipse.platform.swt-a313c8ddf51c1ec98cba03ae96404b91038e0ee7.zip
Bug 530841: [GTK2] Remove GTK 2.x support
Cleanup dialogs. Change-Id: I7eaced1e0838b9164efb2d8af86fc1ab8d9c293b Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c214
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java141
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java21
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java33
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java13
9 files changed, 13 insertions, 450 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 8c9d98dccf..92c911debe 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
@@ -3676,30 +3676,6 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(_1GTK_1IS_1WINDOW)
}
#endif
-#ifndef NO__1GTK_1STOCK_1CANCEL
-JNIEXPORT jintLong JNICALL GTK_NATIVE(_1GTK_1STOCK_1CANCEL)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1STOCK_1CANCEL_FUNC);
- rc = (jintLong)GTK_STOCK_CANCEL;
- GTK_NATIVE_EXIT(env, that, _1GTK_1STOCK_1CANCEL_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1GTK_1STOCK_1OK
-JNIEXPORT jintLong JNICALL GTK_NATIVE(_1GTK_1STOCK_1OK)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1GTK_1STOCK_1OK_FUNC);
- rc = (jintLong)GTK_STOCK_OK;
- GTK_NATIVE_EXIT(env, that, _1GTK_1STOCK_1OK_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1GTK_1TYPE_1CELL_1RENDERER_1PIXBUF
JNIEXPORT jintLong JNICALL GTK_NATIVE(_1GTK_1TYPE_1CELL_1RENDERER_1PIXBUF)
(JNIEnv *env, jclass that)
@@ -4713,88 +4689,6 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1color_1chooser_1set_1use_1alpha)
}
#endif
-#ifndef NO__1gtk_1color_1selection_1dialog_1get_1color_1selection
-JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1color_1selection_1dialog_1get_1color_1selection)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1dialog_1get_1color_1selection_FUNC);
-/*
- rc = (jintLong)gtk_color_selection_dialog_get_color_selection((GtkColorSelectionDialog *)arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_color_selection_dialog_get_color_selection)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkColorSelectionDialog *))fp)((GtkColorSelectionDialog *)arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1dialog_1get_1color_1selection_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1color_1selection_1dialog_1new
-JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1color_1selection_1dialog_1new)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1dialog_1new_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
-/*
- rc = (jintLong)gtk_color_selection_dialog_new((const gchar *)lparg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_color_selection_dialog_new)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(const gchar *))fp)((const gchar *)lparg0);
- }
- }
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1dialog_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1color_1selection_1palette_1to_1string
-JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1color_1selection_1palette_1to_1string)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1palette_1to_1string_FUNC);
-/*
- rc = (jintLong)gtk_color_selection_palette_to_string(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_color_selection_palette_to_string)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1palette_1to_1string_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1color_1selection_1set_1has_1palette
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1color_1selection_1set_1has_1palette)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1set_1has_1palette_FUNC);
-/*
- gtk_color_selection_set_has_palette(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_color_selection_set_has_palette)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1set_1has_1palette_FUNC);
-}
-#endif
-
#ifndef NO__1gtk_1combo_1box_1get_1active
JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1combo_1box_1get_1active)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -6177,74 +6071,6 @@ fail:
}
#endif
-#ifndef NO__1gtk_1font_1selection_1dialog_1get_1font_1name
-JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1font_1selection_1dialog_1get_1font_1name)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1font_1selection_1dialog_1get_1font_1name_FUNC);
-/*
- rc = (jintLong)gtk_font_selection_dialog_get_font_name(arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_font_selection_dialog_get_font_name)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1font_1selection_1dialog_1get_1font_1name_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1font_1selection_1dialog_1new
-JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1font_1selection_1dialog_1new)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1font_1selection_1dialog_1new_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
-/*
- rc = (jintLong)gtk_font_selection_dialog_new((const gchar *)lparg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_font_selection_dialog_new)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(const gchar *))fp)((const gchar *)lparg0);
- }
- }
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1font_1selection_1dialog_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1font_1selection_1dialog_1set_1font_1name
-JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1font_1selection_1dialog_1set_1font_1name)
- (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
-{
- jbyte *lparg1=NULL;
- jboolean rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1font_1selection_1dialog_1set_1font_1name_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-/*
- rc = (jboolean)gtk_font_selection_dialog_set_font_name(arg0, (const gchar *)lparg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_font_selection_dialog_set_font_name)
- if (fp) {
- rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, const gchar *))fp)(arg0, (const gchar *)lparg1);
- }
- }
-fail:
- if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
- GTK_NATIVE_EXIT(env, that, _1gtk_1font_1selection_1dialog_1set_1font_1name_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1gtk_1frame_1get_1label_1widget
JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1frame_1get_1label_1widget)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -6775,26 +6601,6 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1grab_1remove)
}
#endif
-#ifndef NO__1gtk_1hbox_1new
-JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1hbox_1new)
- (JNIEnv *env, jclass that, jboolean arg0, jint arg1)
-{
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1hbox_1new_FUNC);
-/*
- rc = (jintLong)gtk_hbox_new((gboolean)arg0, (gint)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_hbox_new)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(gboolean, gint))fp)((gboolean)arg0, (gint)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1hbox_1new_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1gtk_1hscale_1new
JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1hscale_1new)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -12121,26 +11927,6 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1tree_1view_1unset_1rows_1drag_1dest)
}
#endif
-#ifndef NO__1gtk_1vbox_1new
-JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1vbox_1new)
- (JNIEnv *env, jclass that, jboolean arg0, jint arg1)
-{
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1vbox_1new_FUNC);
-/*
- rc = (jintLong)gtk_vbox_new((gboolean)arg0, (gint)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_vbox_new)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(gboolean, gint))fp)((gboolean)arg0, (gint)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1vbox_1new_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1gtk_1viewport_1set_1shadow_1type
JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1viewport_1set_1shadow_1type)
(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
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 34d02b3903..98a8d28278 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
@@ -290,8 +290,6 @@ char * GTK_nativeFunctionNames[] = {
"_1GTK_1IS_1PLUG",
"_1GTK_1IS_1SCROLLED_1WINDOW",
"_1GTK_1IS_1WINDOW",
- "_1GTK_1STOCK_1CANCEL",
- "_1GTK_1STOCK_1OK",
"_1GTK_1TYPE_1CELL_1RENDERER_1PIXBUF",
"_1GTK_1TYPE_1CELL_1RENDERER_1TEXT",
"_1GTK_1TYPE_1CELL_1RENDERER_1TOGGLE",
@@ -369,10 +367,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1color_1chooser_1get_1use_1alpha",
"_1gtk_1color_1chooser_1set_1rgba",
"_1gtk_1color_1chooser_1set_1use_1alpha",
- "_1gtk_1color_1selection_1dialog_1get_1color_1selection",
- "_1gtk_1color_1selection_1dialog_1new",
- "_1gtk_1color_1selection_1palette_1to_1string",
- "_1gtk_1color_1selection_1set_1has_1palette",
"_1gtk_1combo_1box_1get_1active",
"_1gtk_1combo_1box_1get_1model",
"_1gtk_1combo_1box_1get_1wrap_1width",
@@ -482,9 +476,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1font_1chooser_1dialog_1new",
"_1gtk_1font_1chooser_1get_1font",
"_1gtk_1font_1chooser_1set_1font",
- "_1gtk_1font_1selection_1dialog_1get_1font_1name",
- "_1gtk_1font_1selection_1dialog_1new",
- "_1gtk_1font_1selection_1dialog_1set_1font_1name",
"_1gtk_1frame_1get_1label_1widget",
"_1gtk_1frame_1new",
"_1gtk_1frame_1set_1label_1widget",
@@ -515,7 +506,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1grab_1add",
"_1gtk_1grab_1get_1current",
"_1gtk_1grab_1remove",
- "_1gtk_1hbox_1new",
"_1gtk_1hscale_1new",
"_1gtk_1hscrollbar_1new",
"_1gtk_1hseparator_1new",
@@ -982,7 +972,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1tree_1view_1set_1model",
"_1gtk_1tree_1view_1set_1search_1column",
"_1gtk_1tree_1view_1unset_1rows_1drag_1dest",
- "_1gtk_1vbox_1new",
"_1gtk_1viewport_1set_1shadow_1type",
"_1gtk_1vscale_1new",
"_1gtk_1vscrollbar_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 cbf55d09b8..11ca8176fa 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
@@ -288,8 +288,6 @@ typedef enum {
_1GTK_1IS_1PLUG_FUNC,
_1GTK_1IS_1SCROLLED_1WINDOW_FUNC,
_1GTK_1IS_1WINDOW_FUNC,
- _1GTK_1STOCK_1CANCEL_FUNC,
- _1GTK_1STOCK_1OK_FUNC,
_1GTK_1TYPE_1CELL_1RENDERER_1PIXBUF_FUNC,
_1GTK_1TYPE_1CELL_1RENDERER_1TEXT_FUNC,
_1GTK_1TYPE_1CELL_1RENDERER_1TOGGLE_FUNC,
@@ -367,10 +365,6 @@ typedef enum {
_1gtk_1color_1chooser_1get_1use_1alpha_FUNC,
_1gtk_1color_1chooser_1set_1rgba_FUNC,
_1gtk_1color_1chooser_1set_1use_1alpha_FUNC,
- _1gtk_1color_1selection_1dialog_1get_1color_1selection_FUNC,
- _1gtk_1color_1selection_1dialog_1new_FUNC,
- _1gtk_1color_1selection_1palette_1to_1string_FUNC,
- _1gtk_1color_1selection_1set_1has_1palette_FUNC,
_1gtk_1combo_1box_1get_1active_FUNC,
_1gtk_1combo_1box_1get_1model_FUNC,
_1gtk_1combo_1box_1get_1wrap_1width_FUNC,
@@ -480,9 +474,6 @@ typedef enum {
_1gtk_1font_1chooser_1dialog_1new_FUNC,
_1gtk_1font_1chooser_1get_1font_FUNC,
_1gtk_1font_1chooser_1set_1font_FUNC,
- _1gtk_1font_1selection_1dialog_1get_1font_1name_FUNC,
- _1gtk_1font_1selection_1dialog_1new_FUNC,
- _1gtk_1font_1selection_1dialog_1set_1font_1name_FUNC,
_1gtk_1frame_1get_1label_1widget_FUNC,
_1gtk_1frame_1new_FUNC,
_1gtk_1frame_1set_1label_1widget_FUNC,
@@ -513,7 +504,6 @@ typedef enum {
_1gtk_1grab_1add_FUNC,
_1gtk_1grab_1get_1current_FUNC,
_1gtk_1grab_1remove_FUNC,
- _1gtk_1hbox_1new_FUNC,
_1gtk_1hscale_1new_FUNC,
_1gtk_1hscrollbar_1new_FUNC,
_1gtk_1hseparator_1new_FUNC,
@@ -980,7 +970,6 @@ typedef enum {
_1gtk_1tree_1view_1set_1model_FUNC,
_1gtk_1tree_1view_1set_1search_1column_FUNC,
_1gtk_1tree_1view_1unset_1rows_1drag_1dest_FUNC,
- _1gtk_1vbox_1new_FUNC,
_1gtk_1viewport_1set_1shadow_1type_FUNC,
_1gtk_1vscale_1new_FUNC,
_1gtk_1vscrollbar_1new_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
index f959970b8a..073c1f46e6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
@@ -14,7 +14,6 @@
*******************************************************************************/
package org.eclipse.swt.internal.gtk;
-
/**
* This class contains GTK specific native functions.
*
@@ -197,7 +196,6 @@ public class GTK extends OS {
/** Properties */
public static final byte[] gtk_alternative_button_order = OS.ascii("gtk-alternative-button-order");
- public static final byte[] gtk_color_palette = OS.ascii("gtk-color-palette");
public static final byte[] gtk_cursor_blink = OS.ascii("gtk-cursor-blink");
public static final byte[] gtk_cursor_blink_time = OS.ascii("gtk-cursor-blink-time");
public static final byte[] gtk_double_click_time = OS.ascii("gtk-double-click-time");
@@ -384,26 +382,6 @@ public class GTK extends OS {
}
}
/** @method flags=const */
- public static final native long /*int*/ _GTK_STOCK_CANCEL();
- public static final long /*int*/ GTK_STOCK_CANCEL() {
- lock.lock();
- try {
- return _GTK_STOCK_CANCEL();
- } finally {
- lock.unlock();
- }
- }
- /** @method flags=const */
- public static final native long /*int*/ _GTK_STOCK_OK();
- public static final long /*int*/ GTK_STOCK_OK() {
- lock.lock();
- try {
- return _GTK_STOCK_OK();
- } finally {
- lock.unlock();
- }
- }
- /** @method flags=const */
public static final native long /*int*/ _GTK_TYPE_CELL_RENDERER_TEXT();
public static final long /*int*/ GTK_TYPE_CELL_RENDERER_TEXT() {
lock.lock();
@@ -1307,20 +1285,6 @@ public class GTK extends OS {
}
/**
* @method flags=dynamic
- * @param title cast=(const gchar *)
- */
- public static final native long /*int*/ _gtk_color_selection_dialog_new(byte[] title);
- /** [GTK2/GTK3; 3.6 deprecated] */
- public static final long /*int*/ gtk_color_selection_dialog_new(byte[] title) {
- lock.lock();
- try {
- return _gtk_color_selection_dialog_new(title);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
* @param chooser cast=(GtkColorChooser *)
* @param orientation cast=(GtkOrientation)
* @param colors cast=(GdkRGBA *)
@@ -1374,20 +1338,6 @@ public class GTK extends OS {
}
/**
* @method flags=dynamic
- * @param color_dialog cast=(GtkColorSelectionDialog *)
- */
- public static final native long /*int*/ _gtk_color_selection_dialog_get_color_selection(long /*int*/ color_dialog);
- /** [GTK2/GTK3; 3.6 deprecated] */
- public static final long /*int*/ gtk_color_selection_dialog_get_color_selection(long /*int*/ color_dialog) {
- lock.lock();
- try {
- return _gtk_color_selection_dialog_get_color_selection(color_dialog);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
*/
public static final native void _gtk_color_chooser_set_rgba(long /*int*/ chooser, GdkRGBA color);
public static final void gtk_color_chooser_get_rgba(long /*int*/ chooser, GdkRGBA color) {
@@ -1410,28 +1360,6 @@ public class GTK extends OS {
lock.unlock();
}
}
- /** @method flags=dynamic */
- public static final native long /*int*/ _gtk_color_selection_palette_to_string(long /*int*/ colors, int n_colors);
- /** [GTK2/GTK3; 3.6 deprecated] */
- public static final long /*int*/ gtk_color_selection_palette_to_string(long /*int*/ colors, int n_colors) {
- lock.lock();
- try {
- return _gtk_color_selection_palette_to_string(colors, n_colors);
- } finally {
- lock.unlock();
- }
- }
- /** @method flags=dynamic */
- public static final native void _gtk_color_selection_set_has_palette(long /*int*/ colorsel, boolean has_palette);
- /** [GTK2/GTK3; 3.6 deprecated] */
- public static final void gtk_color_selection_set_has_palette(long /*int*/ colorsel, boolean has_palette) {
- lock.lock();
- try {
- _gtk_color_selection_set_has_palette(colorsel, has_palette);
- } finally {
- lock.unlock();
- }
- }
/**
* @method flags=dynamic
* @param combo cast=(GtkComboBox *)
@@ -2902,17 +2830,6 @@ public class GTK extends OS {
lock.unlock();
}
}
- /** @method flags=dynamic */
- public static final native long /*int*/ _gtk_font_selection_dialog_get_font_name(long /*int*/ fsd);
- /** [GTK2/GTK3; 3.2 deprecated] */
- public static final long /*int*/ gtk_font_selection_dialog_get_font_name(long /*int*/ fsd) {
- lock.lock();
- try {
- return _gtk_font_selection_dialog_get_font_name(fsd);
- } finally {
- lock.unlock();
- }
- }
/**
* @method flags=dynamic
* @param title cast=(const gchar *)
@@ -2950,34 +2867,6 @@ public class GTK extends OS {
lock.unlock();
}
}
- /**
- * @method flags=dynamic
- * @param title cast=(const gchar *)
- */
- public static final native long /*int*/ _gtk_font_selection_dialog_new(byte[] title);
- /** [GTK2/GTK3; 3.2 deprecated] */
- public static final long /*int*/ gtk_font_selection_dialog_new(byte[] title) {
- lock.lock();
- try {
- return _gtk_font_selection_dialog_new(title);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param fontname cast=(const gchar *)
- */
- public static final native boolean _gtk_font_selection_dialog_set_font_name(long /*int*/ fsd, byte[] fontname);
- /** [GTK2/GTK3; 2.x/3.2 deprecated] */
- public static final boolean gtk_font_selection_dialog_set_font_name(long /*int*/ fsd, byte[] fontname) {
- lock.lock();
- try {
- return _gtk_font_selection_dialog_set_font_name(fsd, fontname);
- } finally {
- lock.unlock();
- }
- }
/** @param label cast=(const gchar *) */
public static final native long /*int*/ _gtk_frame_new(byte[] label);
public static final long /*int*/ gtk_frame_new(byte[] label) {
@@ -3092,21 +2981,6 @@ public class GTK extends OS {
}
}
/**
- * @method flags=dynamic
- * @param homogeneous cast=(gboolean)
- * @param spacing cast=(gint)
- */
- public static final native long /*int*/ _gtk_hbox_new(boolean homogeneous, int spacing);
- /** [GTK2/GTK3; 3.2 deprecated] */
- public static final long /*int*/ gtk_hbox_new(boolean homogeneous, int spacing) {
- lock.lock();
- try {
- return _gtk_hbox_new(homogeneous, spacing);
- } finally {
- lock.unlock();
- }
- }
- /**
* @param h cast=(gdouble)
* @param s cast=(gdouble)
* @param v cast=(gdouble)
@@ -8102,21 +7976,6 @@ public class GTK extends OS {
}
}
/**
- * @method flags=dynamic
- * @param homogeneous cast=(gboolean)
- * @param spacing cast=(gint)
- */
- public static final native long /*int*/ _gtk_vbox_new(boolean homogeneous, int spacing);
- /** [GTK2/GTK3; 3.2 deprecated] */
- public static final long /*int*/ gtk_vbox_new(boolean homogeneous, int spacing) {
- lock.lock();
- try {
- return _gtk_vbox_new(homogeneous, spacing);
- } finally {
- lock.unlock();
- }
- }
- /**
* @param viewport cast=(GtkViewport *)
* @param type cast=(GtkShadowType)
*/
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
index 147987374c..b587aef4d1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
@@ -129,12 +129,7 @@ public RGB[] getRGBs() {
*/
public RGB open () {
byte [] buffer = Converter.wcsToMbcs (title, true);
- long /*int*/ handle = 0;
- if (GTK.GTK_VERSION >= OS.VERSION (3, 4, 0)) {
- handle = GTK.gtk_color_chooser_dialog_new (buffer, parent.topHandle ());
- } else {
- handle = GTK.gtk_color_selection_dialog_new (buffer);
- }
+ long /*int*/ handle = GTK.gtk_color_chooser_dialog_new (buffer, parent.topHandle ());
Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
GdkRGBA rgba;
rgba = new GdkRGBA ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
index aa62030669..22eb5e7e23 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -129,17 +129,9 @@ String openChooserDialog () {
Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
long /*int*/ handle = 0;
if (display.getDismissalAlignment() == SWT.RIGHT) {
- if (GTK.GTK3) {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, GTK.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, 0);
- } else {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, GTK.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK.GTK_STOCK_CANCEL (), GTK.GTK_RESPONSE_CANCEL, GTK.GTK_STOCK_OK (), GTK.GTK_RESPONSE_OK, 0);
- }
+ handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, GTK.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, 0);
} else {
- if (GTK.GTK3) {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, GTK.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, 0);
- } else {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, GTK.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK.GTK_STOCK_OK (), GTK.GTK_RESPONSE_OK, GTK.GTK_STOCK_CANCEL (), GTK.GTK_RESPONSE_CANCEL, 0);
- }
+ handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, GTK.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, 0);
}
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
long /*int*/ group = GTK.gtk_window_get_group(0);
@@ -182,13 +174,8 @@ String openChooserDialog () {
}
if (message.length () > 0) {
byte [] buffer = Converter.wcsToMbcs (message, true);
- long /*int*/ box = 0;
- if (GTK.GTK3) {
- box = GTK.gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, 0);
- GTK.gtk_box_set_homogeneous (box, false);
- } else {
- box = GTK.gtk_hbox_new (false, 0);
- }
+ long /*int*/ box = GTK.gtk_box_new (GTK.GTK_ORIENTATION_HORIZONTAL, 0);
+ GTK.gtk_box_set_homogeneous (box, false);
if (box == 0) error (SWT.ERROR_NO_HANDLES);
long /*int*/ label = GTK.gtk_label_new (buffer);
if (label == 0) error (SWT.ERROR_NO_HANDLES);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java
index 4347f3371f..892ef19c4c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java
@@ -312,17 +312,9 @@ String openChooserDialog () {
long /*int*/ shellHandle = parent.topHandle ();
Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
if (display.getDismissalAlignment() == SWT.RIGHT) {
- if (GTK.GTK3) {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, action, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, 0);
- } else {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, action, GTK.GTK_STOCK_CANCEL (), GTK.GTK_RESPONSE_CANCEL, GTK.GTK_STOCK_OK (), GTK.GTK_RESPONSE_OK, 0);
- }
+ handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, action, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, 0);
} else {
- if (GTK.GTK3) {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, action, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, 0);
- } else {
- handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, action, GTK.GTK_STOCK_OK (), GTK.GTK_RESPONSE_OK, GTK.GTK_STOCK_CANCEL (), GTK.GTK_RESPONSE_CANCEL, 0);
- }
+ handle = GTK.gtk_file_chooser_dialog_new (titleBytes, shellHandle, action, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_RESPONSE_OK, GTK.GTK_NAMED_LABEL_CANCEL, GTK.GTK_RESPONSE_CANCEL, 0);
}
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
GTK.gtk_window_set_modal (handle, true);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java
index a71ec679be..1c78bc0dc7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -159,7 +159,7 @@ public FontData open () {
byte [] titleBytes;
titleBytes = Converter.wcsToMbcs (title, true);
Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
- handle = gtk_font_chooser_dialog_new (titleBytes);
+ handle = GTK.gtk_font_chooser_dialog_new (titleBytes, 0);
if (parent!=null) {
long /*int*/ shellHandle = parent.topHandle ();
GTK.gtk_window_set_transient_for(handle, shellHandle);
@@ -175,7 +175,7 @@ public FontData open () {
C.memmove (buffer, fontName, length);
font.dispose();
OS.g_free (fontName);
- gtk_font_chooser_set_font (handle, buffer);
+ GTK.gtk_font_chooser_set_font (handle, buffer);
}
display.addIdleProc ();
Dialog oldModal = null;
@@ -207,7 +207,7 @@ public FontData open () {
}
boolean success = response == GTK.GTK_RESPONSE_OK;
if (success) {
- long /*int*/ fontName = gtk_font_chooser_get_font (handle);
+ long /*int*/ fontName = GTK.gtk_font_chooser_get_font (handle);
int length = C.strlen (fontName);
byte [] buffer = new byte [length + 1];
C.memmove (buffer, fontName, length);
@@ -285,29 +285,4 @@ public void setRGB (RGB rgb) {
this.rgb = rgb;
}
-long /*int*/ gtk_font_chooser_get_font(long /*int*/ fontchooser) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 2, 0)) {
- return GTK.gtk_font_chooser_get_font(fontchooser);
- } else {
- return GTK.gtk_font_selection_dialog_get_font_name(fontchooser);
- }
-}
-
-long /*int*/ gtk_font_chooser_dialog_new (byte[] title) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 2, 0)) {
- return GTK.gtk_font_chooser_dialog_new (title, 0);
- } else {
- return GTK.gtk_font_selection_dialog_new (title);
- }
-}
-
-
-void gtk_font_chooser_set_font(long /*int*/ fsd, byte[] fontname) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 2, 0)) {
- GTK.gtk_font_chooser_set_font(fsd, fontname);
- } else {
- GTK.gtk_font_selection_dialog_set_font_name(fsd, fontname);
- }
-}
-
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
index 2bac6bcd1b..323026abbb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
@@ -1806,17 +1806,8 @@ int gdk_event_get_state (long /*int*/ event) {
long /*int*/ gtk_box_new (int orientation, boolean homogeneous, int spacing) {
- long /*int*/ box = 0;
- if (GTK.GTK3) {
- box = GTK.gtk_box_new (orientation, spacing);
- GTK.gtk_box_set_homogeneous (box, homogeneous);
- } else {
- if (orientation == GTK.GTK_ORIENTATION_HORIZONTAL) {
- box = GTK.gtk_hbox_new (homogeneous, spacing);
- } else {
- box = GTK.gtk_vbox_new (homogeneous, spacing);
- }
- }
+ long /*int*/ box = GTK.gtk_box_new (orientation, spacing);
+ GTK.gtk_box_set_homogeneous (box, homogeneous);
return box;
}

Back to the top