diff options
author | Praveen Innamuri <pinnamuri> | 2011-02-25 13:39:10 +0000 |
---|---|---|
committer | Praveen Innamuri <pinnamuri> | 2011-02-25 13:39:10 +0000 |
commit | 322d04f522ecddfec1b665cbe988c8fa0269f02c (patch) | |
tree | 4d13407f27269a0277f635844f03bd49271ed9eb | |
parent | f8d214632226fe30e5dedb11397a3be1f8629823 (diff) | |
download | eclipse.platform.swt-322d04f522ecddfec1b665cbe988c8fa0269f02c.tar.gz eclipse.platform.swt-322d04f522ecddfec1b665cbe988c8fa0269f02c.tar.xz eclipse.platform.swt-322d04f522ecddfec1b665cbe988c8fa0269f02c.zip |
Bug 296135 - [Printing] PrintDialog doesn't allow to choose the paper size
3 files changed, 14 insertions, 0 deletions
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 45fd9b7e02..65b7992811 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 @@ -243,6 +243,7 @@ #define gtk_print_unix_dialog_new_LIB LIB_GTK #define gtk_print_unix_dialog_set_current_page_LIB LIB_GTK #define gtk_print_unix_dialog_set_manual_capabilities_LIB LIB_GTK +#define gtk_print_unix_dialog_set_embed_page_setup_LIB LIB_GTK #define gtk_print_unix_dialog_set_page_setup_LIB LIB_GTK #define gtk_print_unix_dialog_set_settings_LIB LIB_GTK #define gtk_printer_get_backend_LIB LIB_GTK 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 f88dcb4f8a..6f8e139d30 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 @@ -9501,6 +9501,16 @@ public static final int /*long*/ gtk_print_unix_dialog_new(byte[] title, int /*l } } /** @method flags=dynamic */ +public static final native void _gtk_print_unix_dialog_set_embed_page_setup(int /*long*/ dialog, boolean embed); +public static final void gtk_print_unix_dialog_set_embed_page_setup(int /*long*/ dialog, boolean embed) { + lock.lock(); + try { + _gtk_print_unix_dialog_set_embed_page_setup(dialog, embed); + } finally { + lock.unlock(); + } +} +/** @method flags=dynamic */ public static final native void _gtk_print_unix_dialog_set_page_setup(int /*long*/ dialog, int /*long*/ page_setup); public static final void gtk_print_unix_dialog_set_page_setup(int /*long*/ dialog, int /*long*/ page_setup) { lock.lock(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java index 541121dc4d..65380f7d73 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java @@ -373,6 +373,9 @@ public PrinterData open() { OS.gtk_print_unix_dialog_set_settings(handle, settings); OS.gtk_print_unix_dialog_set_page_setup(handle, page_setup); + if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { + OS.gtk_print_unix_dialog_set_embed_page_setup(handle, true); + } OS.g_object_unref(settings); OS.g_object_unref(page_setup); if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) { |