Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Yan2019-04-11 11:27:31 -0400
committerXi Yan2019-04-12 13:13:56 -0400
commit28e336adcf0f34b6bd479c0532196521425137a3 (patch)
treeeddf85451a920767451a806b23f8e7c38c3206de
parenta5d8b38bcb1b0702f9e164aacfd92f5edc1df87b (diff)
downloadeclipse.platform.swt-28e336adcf0f34b6bd479c0532196521425137a3.tar.gz
eclipse.platform.swt-28e336adcf0f34b6bd479c0532196521425137a3.tar.xz
eclipse.platform.swt-28e336adcf0f34b6bd479c0532196521425137a3.zip
Bug 546110 - FileDialog Cancel/OK not localized on Linux
Set labels for GtkFileChooserNative to null to get default localized buttons. Issue fixed for GTK3.20+. Tested with Snippet72. Change-Id: Iaa7a777a12a84b52af634dfc4c64249372d6d81b Signed-off-by: Xi Yan <xixiyan@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java2
2 files changed, 2 insertions, 2 deletions
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 4175660e87..8cb692eafc 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
@@ -139,7 +139,7 @@ String openNativeChooserDialog () {
long shellHandle = parent.topHandle ();
Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
long handle = 0;
- handle = GTK.gtk_file_chooser_native_new(titleBytes, shellHandle, GTK.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_NAMED_LABEL_CANCEL);
+ handle = GTK.gtk_file_chooser_native_new(titleBytes, shellHandle, GTK.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, null, null);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
if (filterPath != null && filterPath.length () > 0) {
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 0dafa9c886..c5ba74de89 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
@@ -321,7 +321,7 @@ String openNativeChooserDialog () {
int action = (style & SWT.SAVE) != 0 ? GTK.GTK_FILE_CHOOSER_ACTION_SAVE : GTK.GTK_FILE_CHOOSER_ACTION_OPEN;
long shellHandle = parent.topHandle ();
Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
- handle = GTK.gtk_file_chooser_native_new(titleBytes, shellHandle, action, GTK.GTK_NAMED_LABEL_OK, GTK.GTK_NAMED_LABEL_CANCEL);
+ handle = GTK.gtk_file_chooser_native_new(titleBytes, shellHandle, action, null, null);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
if (uriMode) {

Back to the top