comparison dwt/printing/PrintDialog.d @ 212:ab60f3309436

reverted the char[] to String and use the an alias.
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:12:38 +0200
parents cc00a2772bf4
children 36f5cb12e1a2
comparison
equal deleted inserted replaced
211:ff59aeb96cac 212:ab60f3309436
209 public void setPrintToFile(bool printToFile) { 209 public void setPrintToFile(bool printToFile) {
210 this.printToFile = printToFile; 210 this.printToFile = printToFile;
211 } 211 }
212 212
213 protected void checkSubclass() { 213 protected void checkSubclass() {
214 char[] name = this.classinfo.name; 214 String name = this.classinfo.name;
215 char[] validName = PrintDialog.classinfo.name; 215 String validName = PrintDialog.classinfo.name;
216 if (validName!=/*eq*/name) { 216 if (validName!=/*eq*/name) {
217 DWT.error(DWT.ERROR_INVALID_SUBCLASS); 217 DWT.error(DWT.ERROR_INVALID_SUBCLASS);
218 } 218 }
219 } 219 }
220 220
256 shells[i] = null; 256 shells[i] = null;
257 } 257 }
258 } 258 }
259 } 259 }
260 PrinterData data = null; 260 PrinterData data = null;
261 char[] key = "org.eclipse.swt.internal.win32.runMessagesInIdle"; //$NON-NLS-1$ 261 String key = "org.eclipse.swt.internal.win32.runMessagesInIdle"; //$NON-NLS-1$
262 Object oldValue = display.getData(key); 262 Object oldValue = display.getData(key);
263 display.setData(key, new ValueWrapperBool(true)); 263 display.setData(key, new ValueWrapperBool(true));
264 bool success = cast(bool)OS.PrintDlg(&pd); 264 bool success = cast(bool)OS.PrintDlg(&pd);
265 display.setData(key, oldValue); 265 display.setData(key, oldValue);
266 if ((getStyle() & (DWT.APPLICATION_MODAL | DWT.SYSTEM_MODAL)) !is 0) { 266 if ((getStyle() & (DWT.APPLICATION_MODAL | DWT.SYSTEM_MODAL)) !is 0) {
287 int i = 0; 287 int i = 0;
288 while (driverOffset + i < size) { 288 while (driverOffset + i < size) {
289 if (buffer[driverOffset + i] is 0) break; 289 if (buffer[driverOffset + i] is 0) break;
290 i++; 290 i++;
291 } 291 }
292 char[] driver = TCHARsToStr( buffer[driverOffset .. driverOffset+i] ); 292 String driver = TCHARsToStr( buffer[driverOffset .. driverOffset+i] );
293 293
294 int deviceOffset = offsets[1]; 294 int deviceOffset = offsets[1];
295 i = 0; 295 i = 0;
296 while (deviceOffset + i < size) { 296 while (deviceOffset + i < size) {
297 if (buffer[deviceOffset + i] is 0) break; 297 if (buffer[deviceOffset + i] is 0) break;
298 i++; 298 i++;
299 } 299 }
300 char[] device = TCHARsToStr( buffer[deviceOffset .. deviceOffset+i] ); 300 String device = TCHARsToStr( buffer[deviceOffset .. deviceOffset+i] );
301 301
302 int outputOffset = offsets[2]; 302 int outputOffset = offsets[2];
303 i = 0; 303 i = 0;
304 while (outputOffset + i < size) { 304 while (outputOffset + i < size) {
305 if (buffer[outputOffset + i] is 0) break; 305 if (buffer[outputOffset + i] is 0) break;
306 i++; 306 i++;
307 } 307 }
308 char[] output = TCHARsToStr( buffer[outputOffset .. outputOffset+i] ); 308 String output = TCHARsToStr( buffer[outputOffset .. outputOffset+i] );
309 309
310 /* Create PrinterData object and set fields from PRINTDLG */ 310 /* Create PrinterData object and set fields from PRINTDLG */
311 data = new PrinterData(driver, device); 311 data = new PrinterData(driver, device);
312 if ((pd.Flags & OS.PD_PAGENUMS) !is 0) { 312 if ((pd.Flags & OS.PD_PAGENUMS) !is 0) {
313 data.scope_ = PrinterData.PAGE_RANGE; 313 data.scope_ = PrinterData.PAGE_RANGE;