diff options
author | Carolyn MacLeod <carolyn> | 2011-02-04 17:04:34 +0000 |
---|---|---|
committer | Carolyn MacLeod <carolyn> | 2011-02-04 17:04:34 +0000 |
commit | 149b1a96459c86d4d11c732555503b052ba6026e (patch) | |
tree | 210ce5bfb1649901511e2a676f6a00be01a9fabf | |
parent | 0293729274c89c29bb031d302c05521e3cfc959f (diff) | |
download | eclipse.platform.swt-149b1a96459c86d4d11c732555503b052ba6026e.tar.gz eclipse.platform.swt-149b1a96459c86d4d11c732555503b052ba6026e.tar.xz eclipse.platform.swt-149b1a96459c86d4d11c732555503b052ba6026e.zip |
Bug 275624 - PrintDialog.setPrinterData does not work as expected
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java | 6 |
1 files changed, 6 insertions, 0 deletions
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 0333c17c1b..541121dc4d 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 @@ -312,7 +312,13 @@ public PrinterData open() { if (printerData.otherData != null) { Printer.restore(printerData.otherData, settings, page_setup); } + /* Set values of print_settings and page_setup from PrinterData. */ + if (printerData.name != null) { + byte [] nameBytes = Converter.wcsToMbcs (null, printerData.name, true); + OS.gtk_print_settings_set_printer(settings, nameBytes); + } + switch (printerData.scope) { case PrinterData.ALL_PAGES: OS.gtk_print_settings_set_print_pages(settings, OS.GTK_PRINT_PAGES_ALL); |