aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2011-11-08 18:32:18 (EST)
committerSilenio Quarti2011-11-25 11:47:45 (EST)
commit0bab5ef16bf9ed26100e0695fd20f73178a7c073 (patch)
tree773643097c94afcb33141cdb6a6bfb768135bf45
parent4b6f3d6ef93f821147ed56467d58afcd45e822e5 (diff)
downloadeclipse.platform.swt-0bab5ef16bf9ed26100e0695fd20f73178a7c073.zip
eclipse.platform.swt-0bab5ef16bf9ed26100e0695fd20f73178a7c073.tar.gz
eclipse.platform.swt-0bab5ef16bf9ed26100e0695fd20f73178a7c073.tar.bz2
Bug 364764 - Kill GtkFileSelection.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c103
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c88
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFileSelection.java59
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java72
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java103
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java174
10 files changed, 3 insertions, 638 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 cbab2d5..0c5be84 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
@@ -891,18 +891,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(GtkColorSelectionDialog_1sizeof)
}
#endif
-#ifndef NO_GtkFileSelection_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(GtkFileSelection_1sizeof)
- (JNIEnv *env, jclass that)
-{
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, GtkFileSelection_1sizeof_FUNC);
- rc = (jint)GtkFileSelection_sizeof();
- OS_NATIVE_EXIT(env, that, GtkFileSelection_1sizeof_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_GtkFixedClass_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(GtkFixedClass_1sizeof)
(JNIEnv *env, jclass that)
@@ -9492,76 +9480,6 @@ fail:
}
#endif
-#ifndef NO__1gtk_1file_1selection_1get_1filename
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1file_1selection_1get_1filename)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, _1gtk_1file_1selection_1get_1filename_FUNC);
- rc = (jintLong)gtk_file_selection_get_filename((GtkFileSelection *)arg0);
- OS_NATIVE_EXIT(env, that, _1gtk_1file_1selection_1get_1filename_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1file_1selection_1get_1selections
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1file_1selection_1get_1selections)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, _1gtk_1file_1selection_1get_1selections_FUNC);
- rc = (jintLong)gtk_file_selection_get_selections((GtkFileSelection *)arg0);
- OS_NATIVE_EXIT(env, that, _1gtk_1file_1selection_1get_1selections_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1file_1selection_1hide_1fileop_1buttons
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1file_1selection_1hide_1fileop_1buttons)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- OS_NATIVE_ENTER(env, that, _1gtk_1file_1selection_1hide_1fileop_1buttons_FUNC);
- gtk_file_selection_hide_fileop_buttons((GtkFileSelection *)arg0);
- OS_NATIVE_EXIT(env, that, _1gtk_1file_1selection_1hide_1fileop_1buttons_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1file_1selection_1new
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1file_1selection_1new)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, _1gtk_1file_1selection_1new_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jintLong)gtk_file_selection_new((const gchar *)lparg0);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, _1gtk_1file_1selection_1new_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1file_1selection_1set_1filename
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1file_1selection_1set_1filename)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- OS_NATIVE_ENTER(env, that, _1gtk_1file_1selection_1set_1filename_FUNC);
- gtk_file_selection_set_filename((GtkFileSelection *)arg0, (const gchar *)arg1);
- OS_NATIVE_EXIT(env, that, _1gtk_1file_1selection_1set_1filename_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1file_1selection_1set_1select_1multiple
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1file_1selection_1set_1select_1multiple)
- (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
-{
- OS_NATIVE_ENTER(env, that, _1gtk_1file_1selection_1set_1select_1multiple_FUNC);
- gtk_file_selection_set_select_multiple((GtkFileSelection *)arg0, (gboolean)arg1);
- OS_NATIVE_EXIT(env, that, _1gtk_1file_1selection_1set_1select_1multiple_FUNC);
-}
-#endif
-
#ifndef NO__1gtk_1fixed_1move
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1fixed_1move)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3)
@@ -19636,27 +19554,6 @@ JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkColor
}
#endif
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
-#endif
-{
-#ifndef JNI64
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2I_FUNC);
-#else
- OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2J_FUNC);
-#endif
- if (arg0) setGtkFileSelectionFields(env, arg0, (GtkFileSelection *)arg1);
-#ifndef JNI64
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2I_FUNC);
-#else
- OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2J_FUNC);
-#endif
-}
-#endif
-
#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkFixed_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkFixed_2J) && defined(JNI64))
#ifndef JNI64
JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkFixed_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
index b3711bb..d965f37 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
@@ -18,9 +18,9 @@
#define NDEBUG
-/*
#define G_DISABLE_DEPRECATED
#define GTK_DISABLE_DEPRECATED
+/*
*/
#include <stdlib.h>
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 39e39ce..a586ecb 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 = 1385;
-int OS_nativeFunctionCallCount[1385];
+int OS_nativeFunctionCount = 1377;
+int OS_nativeFunctionCallCount[1377];
char * OS_nativeFunctionNames[] = {
#ifndef JNI64
"Call__IIII",
@@ -102,7 +102,6 @@ char * OS_nativeFunctionNames[] = {
"GtkCellRendererToggleClass_1sizeof",
"GtkCellRendererToggle_1sizeof",
"GtkColorSelectionDialog_1sizeof",
- "GtkFileSelection_1sizeof",
"GtkFixedClass_1sizeof",
"GtkFixed_1sizeof",
"GtkRequisition_1sizeof",
@@ -750,12 +749,6 @@ char * OS_nativeFunctionNames[] = {
"_1gtk_1file_1filter_1get_1name",
"_1gtk_1file_1filter_1new",
"_1gtk_1file_1filter_1set_1name",
- "_1gtk_1file_1selection_1get_1filename",
- "_1gtk_1file_1selection_1get_1selections",
- "_1gtk_1file_1selection_1hide_1fileop_1buttons",
- "_1gtk_1file_1selection_1new",
- "_1gtk_1file_1selection_1set_1filename",
- "_1gtk_1file_1selection_1set_1select_1multiple",
"_1gtk_1fixed_1move",
"_1gtk_1fixed_1new",
"_1gtk_1fixed_1set_1has_1window",
@@ -1696,11 +1689,6 @@ char * OS_nativeFunctionNames[] = {
"memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2J",
#endif
#ifndef JNI64
- "memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2I",
-#else
- "memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2J",
-#endif
-#ifndef JNI64
"memmove__Lorg_eclipse_swt_internal_gtk_GtkFixed_2I",
#else
"memmove__Lorg_eclipse_swt_internal_gtk_GtkFixed_2J",
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 34b6baf..2961535 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
@@ -110,7 +110,6 @@ typedef enum {
GtkCellRendererToggleClass_1sizeof_FUNC,
GtkCellRendererToggle_1sizeof_FUNC,
GtkColorSelectionDialog_1sizeof_FUNC,
- GtkFileSelection_1sizeof_FUNC,
GtkFixedClass_1sizeof_FUNC,
GtkFixed_1sizeof_FUNC,
GtkRequisition_1sizeof_FUNC,
@@ -758,12 +757,6 @@ typedef enum {
_1gtk_1file_1filter_1get_1name_FUNC,
_1gtk_1file_1filter_1new_FUNC,
_1gtk_1file_1filter_1set_1name_FUNC,
- _1gtk_1file_1selection_1get_1filename_FUNC,
- _1gtk_1file_1selection_1get_1selections_FUNC,
- _1gtk_1file_1selection_1hide_1fileop_1buttons_FUNC,
- _1gtk_1file_1selection_1new_FUNC,
- _1gtk_1file_1selection_1set_1filename_FUNC,
- _1gtk_1file_1selection_1set_1select_1multiple_FUNC,
_1gtk_1fixed_1move_FUNC,
_1gtk_1fixed_1new_FUNC,
_1gtk_1fixed_1set_1has_1window_FUNC,
@@ -1704,11 +1697,6 @@ typedef enum {
memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2J_FUNC,
#endif
#ifndef JNI64
- memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2I_FUNC,
-#else
- memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2J_FUNC,
-#endif
-#ifndef JNI64
memmove__Lorg_eclipse_swt_internal_gtk_GtkFixed_2I_FUNC,
#else
memmove__Lorg_eclipse_swt_internal_gtk_GtkFixed_2J_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
index df702c6..f40d3a9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
@@ -1506,94 +1506,6 @@ void setGtkColorSelectionDialogFields(JNIEnv *env, jobject lpObject, GtkColorSel
}
#endif
-#ifndef NO_GtkFileSelection
-typedef struct GtkFileSelection_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID dir_list, file_list, selection_entry, selection_text, main_vbox, ok_button, cancel_button, help_button, history_pulldown, history_menu, history_list, fileop_dialog, fileop_entry, fileop_file, cmpl_state, fileop_c_dir, fileop_del_file, fileop_ren_file, button_area, action_area;
-} GtkFileSelection_FID_CACHE;
-
-GtkFileSelection_FID_CACHE GtkFileSelectionFc;
-
-void cacheGtkFileSelectionFields(JNIEnv *env, jobject lpObject)
-{
- if (GtkFileSelectionFc.cached) return;
- GtkFileSelectionFc.clazz = (*env)->GetObjectClass(env, lpObject);
- GtkFileSelectionFc.dir_list = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "dir_list", I_J);
- GtkFileSelectionFc.file_list = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "file_list", I_J);
- GtkFileSelectionFc.selection_entry = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "selection_entry", I_J);
- GtkFileSelectionFc.selection_text = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "selection_text", I_J);
- GtkFileSelectionFc.main_vbox = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "main_vbox", I_J);
- GtkFileSelectionFc.ok_button = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "ok_button", I_J);
- GtkFileSelectionFc.cancel_button = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "cancel_button", I_J);
- GtkFileSelectionFc.help_button = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "help_button", I_J);
- GtkFileSelectionFc.history_pulldown = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "history_pulldown", I_J);
- GtkFileSelectionFc.history_menu = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "history_menu", I_J);
- GtkFileSelectionFc.history_list = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "history_list", I_J);
- GtkFileSelectionFc.fileop_dialog = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "fileop_dialog", I_J);
- GtkFileSelectionFc.fileop_entry = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "fileop_entry", I_J);
- GtkFileSelectionFc.fileop_file = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "fileop_file", I_J);
- GtkFileSelectionFc.cmpl_state = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "cmpl_state", I_J);
- GtkFileSelectionFc.fileop_c_dir = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "fileop_c_dir", I_J);
- GtkFileSelectionFc.fileop_del_file = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "fileop_del_file", I_J);
- GtkFileSelectionFc.fileop_ren_file = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "fileop_ren_file", I_J);
- GtkFileSelectionFc.button_area = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "button_area", I_J);
- GtkFileSelectionFc.action_area = (*env)->GetFieldID(env, GtkFileSelectionFc.clazz, "action_area", I_J);
- GtkFileSelectionFc.cached = 1;
-}
-
-GtkFileSelection *getGtkFileSelectionFields(JNIEnv *env, jobject lpObject, GtkFileSelection *lpStruct)
-{
- if (!GtkFileSelectionFc.cached) cacheGtkFileSelectionFields(env, lpObject);
- lpStruct->dir_list = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.dir_list);
- lpStruct->file_list = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.file_list);
- lpStruct->selection_entry = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.selection_entry);
- lpStruct->selection_text = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.selection_text);
- lpStruct->main_vbox = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.main_vbox);
- lpStruct->ok_button = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.ok_button);
- lpStruct->cancel_button = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.cancel_button);
- lpStruct->help_button = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.help_button);
- lpStruct->history_pulldown = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.history_pulldown);
- lpStruct->history_menu = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.history_menu);
- lpStruct->history_list = (GList *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.history_list);
- lpStruct->fileop_dialog = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_dialog);
- lpStruct->fileop_entry = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_entry);
- lpStruct->fileop_file = (gchar *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_file);
- lpStruct->cmpl_state = (gpointer)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.cmpl_state);
- lpStruct->fileop_c_dir = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_c_dir);
- lpStruct->fileop_del_file = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_del_file);
- lpStruct->fileop_ren_file = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_ren_file);
- lpStruct->button_area = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.button_area);
- lpStruct->action_area = (GtkWidget *)(*env)->GetIntLongField(env, lpObject, GtkFileSelectionFc.action_area);
- return lpStruct;
-}
-
-void setGtkFileSelectionFields(JNIEnv *env, jobject lpObject, GtkFileSelection *lpStruct)
-{
- if (!GtkFileSelectionFc.cached) cacheGtkFileSelectionFields(env, lpObject);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.dir_list, (jintLong)lpStruct->dir_list);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.file_list, (jintLong)lpStruct->file_list);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.selection_entry, (jintLong)lpStruct->selection_entry);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.selection_text, (jintLong)lpStruct->selection_text);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.main_vbox, (jintLong)lpStruct->main_vbox);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.ok_button, (jintLong)lpStruct->ok_button);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.cancel_button, (jintLong)lpStruct->cancel_button);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.help_button, (jintLong)lpStruct->help_button);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.history_pulldown, (jintLong)lpStruct->history_pulldown);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.history_menu, (jintLong)lpStruct->history_menu);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.history_list, (jintLong)lpStruct->history_list);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_dialog, (jintLong)lpStruct->fileop_dialog);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_entry, (jintLong)lpStruct->fileop_entry);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_file, (jintLong)lpStruct->fileop_file);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.cmpl_state, (jintLong)lpStruct->cmpl_state);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_c_dir, (jintLong)lpStruct->fileop_c_dir);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_del_file, (jintLong)lpStruct->fileop_del_file);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.fileop_ren_file, (jintLong)lpStruct->fileop_ren_file);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.button_area, (jintLong)lpStruct->button_area);
- (*env)->SetIntLongField(env, lpObject, GtkFileSelectionFc.action_area, (jintLong)lpStruct->action_area);
-}
-#endif
-
#ifndef NO_GtkFixed
typedef struct GtkFixed_FID_CACHE {
int cached;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
index 42322a4..eec80eb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
@@ -363,18 +363,6 @@ void setGtkColorSelectionDialogFields(JNIEnv *env, jobject lpObject, GtkColorSel
#define GtkColorSelectionDialog_sizeof() 0
#endif
-#ifndef NO_GtkFileSelection
-void cacheGtkFileSelectionFields(JNIEnv *env, jobject lpObject);
-GtkFileSelection *getGtkFileSelectionFields(JNIEnv *env, jobject lpObject, GtkFileSelection *lpStruct);
-void setGtkFileSelectionFields(JNIEnv *env, jobject lpObject, GtkFileSelection *lpStruct);
-#define GtkFileSelection_sizeof() sizeof(GtkFileSelection)
-#else
-#define cacheGtkFileSelectionFields(a,b)
-#define getGtkFileSelectionFields(a,b,c) NULL
-#define setGtkFileSelectionFields(a,b,c)
-#define GtkFileSelection_sizeof() 0
-#endif
-
#ifndef NO_GtkFixed
void cacheGtkFixedFields(JNIEnv *env, jobject lpObject);
GtkFixed *getGtkFixedFields(JNIEnv *env, jobject lpObject, GtkFixed *lpStruct);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFileSelection.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFileSelection.java
deleted file mode 100644
index 8e0d862..0000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFileSelection.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
-
-public class GtkFileSelection {
- /** @field cast=(GtkWidget *) */
- public int /*long*/ dir_list;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ file_list;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ selection_entry;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ selection_text;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ main_vbox;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ ok_button;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ cancel_button;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ help_button;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ history_pulldown;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ history_menu;
- /** @field cast=(GList *) */
- public int /*long*/ history_list;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ fileop_dialog;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ fileop_entry;
- /** @field cast=(gchar *) */
- public int /*long*/ fileop_file;
- /** @field cast=(gpointer) */
- public int /*long*/ cmpl_state; // gpointer
- /** @field cast=(GtkWidget *) */
- public int /*long*/ fileop_c_dir;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ fileop_del_file;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ fileop_ren_file;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ button_area;
- /** @field cast=(GtkWidget *) */
- public int /*long*/ action_area;
-}
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 2076c5f..12c1607 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
@@ -604,7 +604,6 @@ public static final native int GtkAdjustment_sizeof();
public static final native int GtkAllocation_sizeof();
public static final native int GtkBorder_sizeof();
public static final native int GtkColorSelectionDialog_sizeof();
-public static final native int GtkFileSelection_sizeof();
public static final native int GtkFixed_sizeof();
public static final native int GtkFixedClass_sizeof();
public static final native int GtkRequisition_sizeof();
@@ -7346,72 +7345,6 @@ public static final void gtk_file_filter_set_name(int /*long*/ filter, byte[] na
lock.unlock();
}
}
-/** @param filesel cast=(GtkFileSelection *) */
-public static final native int /*long*/ _gtk_file_selection_get_filename(int /*long*/ filesel);
-public static final int /*long*/ gtk_file_selection_get_filename(int /*long*/ filesel) {
- lock.lock();
- try {
- return _gtk_file_selection_get_filename(filesel);
- } finally {
- lock.unlock();
- }
-}
-/** @param filesel cast=(GtkFileSelection *) */
-public static final native int /*long*/ _gtk_file_selection_get_selections(int /*long*/ filesel);
-public static final int /*long*/ gtk_file_selection_get_selections(int /*long*/ filesel) {
- lock.lock();
- try {
- return _gtk_file_selection_get_selections(filesel);
- } finally {
- lock.unlock();
- }
-}
-/** @param filesel cast=(GtkFileSelection *) */
-public static final native void _gtk_file_selection_hide_fileop_buttons(int /*long*/ filesel);
-public static final void gtk_file_selection_hide_fileop_buttons(int /*long*/ filesel) {
- lock.lock();
- try {
- _gtk_file_selection_hide_fileop_buttons(filesel);
- } finally {
- lock.unlock();
- }
-}
-/** @param title cast=(const gchar *) */
-public static final native int /*long*/ _gtk_file_selection_new(byte[] title);
-public static final int /*long*/ gtk_file_selection_new(byte[] title) {
- lock.lock();
- try {
- return _gtk_file_selection_new(title);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param filesel cast=(GtkFileSelection *)
- * @param filename cast=(const gchar *)
- */
-public static final native void _gtk_file_selection_set_filename(int /*long*/ filesel, int /*long*/ filename);
-public static final void gtk_file_selection_set_filename(int /*long*/ filesel, int /*long*/ filename) {
- lock.lock();
- try {
- _gtk_file_selection_set_filename(filesel, filename);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param filesel cast=(GtkFileSelection *)
- * @param select_multiple cast=(gboolean)
- */
-public static final native void _gtk_file_selection_set_select_multiple(int /*long*/ filesel, boolean select_multiple);
-public static final void gtk_file_selection_set_select_multiple(int /*long*/ filesel, boolean select_multiple) {
- lock.lock();
- try {
- _gtk_file_selection_set_select_multiple(filesel, select_multiple);
- } finally {
- lock.unlock();
- }
-}
/**
* @param fixed cast=(GtkFixed *)
* @param widget cast=(GtkWidget *)
@@ -13819,11 +13752,6 @@ public static final native void memmove(GtkColorSelectionDialog dest, int /*long
* @param dest cast=(void *),flags=no_in
* @param src cast=(const void *)
*/
-public static final native void memmove(GtkFileSelection dest, int /*long*/ src);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
- */
public static final native void memmove(GdkEventProperty dest, int /*long*/ src);
/**
* @param dest cast=(void *),flags=no_in
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 92ac09f..b6979e1 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
@@ -115,12 +115,7 @@ public String getMessage () {
* </ul>
*/
public String open () {
- boolean useChooserDialog = OS.GTK_VERSION >= OS.VERSION (2, 4, 10);
- if (useChooserDialog) {
return openChooserDialog ();
- } else {
- return openClassicDialog ();
- }
}
String openChooserDialog () {
byte [] titleBytes = Converter.wcsToMbcs (null, title, true);
@@ -225,104 +220,6 @@ String openChooserDialog () {
OS.gtk_widget_destroy (handle);
return answer;
}
-String openClassicDialog () {
- byte [] titleBytes = Converter.wcsToMbcs (null, title, true);
- int /*long*/ handle = OS.gtk_file_selection_new (titleBytes);
- if (parent != null) {
- int /*long*/ shellHandle = parent.topHandle ();
- OS.gtk_window_set_transient_for (handle, shellHandle);
- int /*long*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle);
- if (pixbufs != 0) {
- OS.gtk_window_set_icon_list (handle, pixbufs);
- OS.g_list_free (pixbufs);
- }
- }
- OS.gtk_window_set_modal (handle, true);
- String answer = null;
- if (filterPath != null) {
- String path = filterPath;
- if (path.length () > 0 && !path.endsWith (SEPARATOR)) {
- path += SEPARATOR;
- }
- int length = path.length ();
- char [] buffer = new char [length + 1];
- path.getChars (0, length, buffer, 0);
- int /*long*/ utf8Ptr = OS.g_utf16_to_utf8 (buffer, -1, null, null, null);
- int /*long*/ fileNamePtr = OS.g_filename_from_utf8 (utf8Ptr, -1, null, null, null);
- OS.gtk_file_selection_set_filename (handle, fileNamePtr);
- OS.g_free (utf8Ptr);
- OS.g_free (fileNamePtr);
- }
- GtkFileSelection selection = new GtkFileSelection ();
- OS.memmove (selection, handle);
- OS.gtk_file_selection_hide_fileop_buttons (handle);
- int /*long*/ fileListParent = OS.gtk_widget_get_parent (selection.file_list);
- OS.gtk_widget_hide (selection.file_list);
- OS.gtk_widget_hide (fileListParent);
- if (message.length () > 0) {
- byte [] buffer = Converter.wcsToMbcs (null, message, true);
- int /*long*/ labelHandle = OS.gtk_label_new (buffer);
- OS.gtk_label_set_line_wrap (labelHandle, true);
- OS.gtk_misc_set_alignment (labelHandle, 0.0f, 0.0f);
- OS.gtk_container_add (selection.main_vbox, labelHandle);
- OS.gtk_box_set_child_packing (
- selection.main_vbox, labelHandle, false, false, 0, OS.GTK_PACK_START);
- OS.gtk_widget_show (labelHandle);
- }
- Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
- display.addIdleProc ();
- Dialog oldModal = null;
- if (OS.gtk_window_get_modal (handle)) {
- oldModal = display.getModalDialog ();
- display.setModalDialog (this);
- }
- int signalId = 0;
- int /*long*/ hookId = 0;
- if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- signalId = OS.g_signal_lookup (OS.map, OS.GTK_TYPE_WIDGET());
- hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0);
- }
- int response = OS.gtk_dialog_run (handle);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- OS.gdk_threads_leave();
- if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- OS.g_signal_remove_emission_hook (signalId, hookId);
- }
- if (OS.gtk_window_get_modal (handle)) {
- display.setModalDialog (oldModal);
- }
- if (response == OS.GTK_RESPONSE_OK) {
- int /*long*/ fileNamePtr = OS.gtk_file_selection_get_filename (handle);
- int /*long*/ utf8Ptr = OS.g_filename_to_utf8 (fileNamePtr, -1, null, null, null);
- if (utf8Ptr != 0) {
- int /*long*/ [] items_written = new int /*long*/ [1];
- int /*long*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null);
- if (utf16Ptr != 0) {
- int length = (int)/*64*/items_written [0];
- char [] buffer = new char [length];
- OS.memmove (buffer, utf16Ptr, length * 2);
- String osAnswer = new String (buffer);
- if (osAnswer != null) {
- /* remove trailing separator, unless root directory */
- if (!osAnswer.equals (SEPARATOR) && osAnswer.endsWith (SEPARATOR)) {
- osAnswer = osAnswer.substring (0, osAnswer.length () - 1);
- }
- answer = filterPath = osAnswer;
- }
- OS.g_free (utf16Ptr);
- }
- OS.g_free (utf8Ptr);
- }
- }
- display.removeIdleProc ();
- OS.gtk_widget_destroy (handle);
- return answer;
-}
/**
* Sets the path that the dialog will use to filter
* the directories it shows to the argument, which may
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 c20f9c5..0a0c755 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
@@ -215,91 +215,6 @@ String computeResultChooserDialog () {
return fullPath;
}
-String computeResultClassicDialog () {
- filterIndex = -1;
- GtkFileSelection selection = new GtkFileSelection ();
- OS.memmove (selection, handle);
- int /*long*/ entry = selection.selection_entry;
- int /*long*/ entryText = OS.gtk_entry_get_text (entry);
- int entryLength = OS.strlen (entryText);
- if (entryLength == 0) {
- int /*long*/ fileList = selection.file_list;
- int /*long*/ listSelection = OS.gtk_tree_view_get_selection (fileList);
- int /*long*/[] model = new int /*long*/[1];
- int /*long*/ selectedList = OS.gtk_tree_selection_get_selected_rows (listSelection, model);
- if (selectedList == 0) return null;
- int listLength = OS.g_list_length (selectedList);
- if (listLength == 0) {
- OS.g_list_free (selectedList);
- return null;
- }
- int /*long*/ path = OS.g_list_nth_data (selectedList, 0);
- int /*long*/ [] ptr = new int /*long*/[1];
- int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
- if (OS.gtk_tree_model_get_iter (model [0], iter, path)) {
- OS.gtk_tree_model_get (model [0], iter, 0, ptr, -1);
- }
- OS.g_free (iter);
- for (int i = 0; i < listLength; i++) {
- OS.gtk_tree_path_free (OS.g_list_nth_data (selectedList, i));
- }
- OS.g_list_free (selectedList);
- if (ptr [0] == 0) return null;
- int length = OS.strlen (ptr [0]);
- byte [] buffer = new byte [length];
- OS.memmove (buffer, ptr [0], length);
- OS.g_free (ptr [0]);
- OS.gtk_entry_set_text (entry, buffer);
- }
-
- int /*long*/ fileNamePtr = OS.gtk_file_selection_get_filename (handle);
- int /*long*/ utf8Ptr = OS.g_filename_to_utf8 (fileNamePtr, -1, null, null, null);
- int /*long*/ [] items_written = new int /*long*/ [1];
- int /*long*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null);
- entryLength = (int)/*64*/items_written [0];
- char [] buffer = new char [entryLength];
- OS.memmove (buffer, utf16Ptr, entryLength * 2);
- String osAnswer = new String (buffer);
- OS.g_free (utf16Ptr);
- OS.g_free (utf8Ptr);
-
- int separatorIndex = osAnswer.lastIndexOf (SEPARATOR);
- if (separatorIndex+1 == osAnswer.length ()) return null;
-
- String answer = fullPath = osAnswer;
- fileName = fullPath.substring (separatorIndex+1);
- filterPath = fullPath.substring (0, separatorIndex);
- if ((style & SWT.MULTI) == 0) {
- fileNames = new String[] {fileName};
- } else {
- int /*long*/ namesPtr = OS.gtk_file_selection_get_selections (handle);
- int /*long*/ namesPtr1 = namesPtr;
- int /*long*/ [] namePtr = new int /*long*/ [1];
- OS.memmove (namePtr, namesPtr1, OS.PTR_SIZEOF);
- int length = 0;
- while (namePtr[0] != 0) {
- length++;
- namesPtr1+=OS.PTR_SIZEOF;
- OS.memmove(namePtr, namesPtr1, OS.PTR_SIZEOF);
- }
- fileNames = new String [length];
- namePtr = new int /*long*/ [length];
- OS.memmove (namePtr, namesPtr, length * OS.PTR_SIZEOF);
- for (int i = 0; i < length; i++) {
- utf8Ptr = OS.g_filename_to_utf8 (namePtr [i], -1, null, null, null);
- items_written = new int /*long*/ [1];
- utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null);
- buffer = new char [(int)/*64*/items_written [0]];
- OS.memmove (buffer, utf16Ptr, items_written [0] * 2);
- String name = new String (buffer);
- fileNames [i] = name.substring (name.lastIndexOf (SEPARATOR) + 1);
- OS.g_free (utf16Ptr);
- OS.g_free (utf8Ptr);
- }
- OS.g_strfreev (namesPtr);
- }
- return answer;
-}
/**
* Returns the path of the first file that was
* selected in the dialog relative to the filter path, or an
@@ -393,12 +308,7 @@ public boolean getOverwrite () {
* </ul>
*/
public String open () {
- boolean useChooserDialog = OS.GTK_VERSION >= OS.VERSION (2, 4, 10);
- if (useChooserDialog) {
return openChooserDialog ();
- } else {
- return openClassicDialog ();
- }
}
String openChooserDialog () {
byte [] titleBytes = Converter.wcsToMbcs (null, title, true);
@@ -461,55 +371,6 @@ String openChooserDialog () {
OS.gtk_widget_destroy (handle);
return answer;
}
-String openClassicDialog () {
- byte [] titleBytes = Converter.wcsToMbcs (null, title, true);
- handle = OS.gtk_file_selection_new (titleBytes);
- if (parent != null) {
- int /*long*/ shellHandle = parent.topHandle ();
- OS.gtk_window_set_transient_for (handle, shellHandle);
- int /*long*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle);
- if (pixbufs != 0) {
- OS.gtk_window_set_icon_list (handle, pixbufs);
- OS.g_list_free (pixbufs);
- }
- }
- OS.gtk_window_set_modal (handle, true);
- presetClassicDialog ();
- Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
- display.addIdleProc ();
- String answer = null;
- Dialog oldModal = null;
- if (OS.gtk_window_get_modal (handle)) {
- oldModal = display.getModalDialog ();
- display.setModalDialog (this);
- }
- int signalId = 0;
- int /*long*/ hookId = 0;
- if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- signalId = OS.g_signal_lookup (OS.map, OS.GTK_TYPE_WIDGET());
- hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0);
- }
- int response = OS.gtk_dialog_run (handle);
- /*
- * This call to gdk_threads_leave() is a temporary work around
- * to avoid deadlocks when gdk_threads_init() is called by native
- * code outside of SWT (i.e AWT, etc). It ensures that the current
- * thread leaves the GTK lock acquired by the function above.
- */
- OS.gdk_threads_leave();
- if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- OS.g_signal_remove_emission_hook (signalId, hookId);
- }
- if (OS.gtk_window_get_modal (handle)) {
- display.setModalDialog (oldModal);
- }
- if (response == OS.GTK_RESPONSE_OK) {
- answer = computeResultClassicDialog ();
- }
- display.removeIdleProc ();
- OS.gtk_widget_destroy (handle);
- return answer;
-}
void presetChooserDialog () {
/* MULTI is only valid if the native dialog's action is Open */
if ((style & (SWT.SAVE | SWT.MULTI)) == SWT.MULTI) {
@@ -619,41 +480,6 @@ void presetChooserDialog () {
fullPath = null;
fileNames = new String [0];
}
-void presetClassicDialog () {
- OS.gtk_file_selection_set_select_multiple(handle, (style & SWT.MULTI) != 0);
-
- /* Calculate the fully-specified file name and convert to bytes */
- StringBuffer stringBuffer = new StringBuffer ();
- if (filterPath == null) {
- filterPath = "";
- } else {
- if (filterPath.length () > 0) {
- stringBuffer.append (filterPath);
- if (filterPath.charAt (filterPath.length () - 1) != SEPARATOR) {
- stringBuffer.append (SEPARATOR);
- }
- }
- }
- if (fileName == null) {
- fileName = "";
- } else {
- stringBuffer.append (fileName);
- }
- fullPath = stringBuffer.toString ();
- int length = fullPath.length ();
- char [] buffer = new char [length + 1];
- fullPath.getChars (0, length, buffer, 0);
- int /*long*/ utf8Ptr = OS.g_utf16_to_utf8 (buffer, -1, null, null, null);
- int /*long*/ fileNamePtr = OS.g_filename_from_utf8 (utf8Ptr, -1, null, null, null);
- OS.gtk_file_selection_set_filename (handle, fileNamePtr);
- OS.g_free (utf8Ptr);
- OS.g_free (fileNamePtr);
-
- if (filterNames == null) filterNames = new String [0];
- if (filterExtensions == null) filterExtensions = new String [0];
- fullPath = null;
- fileNames = new String [0];
-}
/**
* Set the initial filename which the dialog will
* select by default when opened to the argument,