Mercurial > projects > dwt-mac
diff dwt/widgets/DirectoryDialog.d @ 45:d8635bb48c7c
Merge with SWT 3.5
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 01 Dec 2008 17:07:00 +0100 |
parents | 1a8b3cb347e0 |
children | 906145852b63 |
line wrap: on
line diff
--- a/dwt/widgets/DirectoryDialog.d Tue Oct 21 15:20:04 2008 +0200 +++ b/dwt/widgets/DirectoryDialog.d Mon Dec 01 17:07:00 2008 +0100 @@ -1,5 +1,5 @@ -/******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. +/******************************************************************************* + * Copyright (c) 2000, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -33,6 +33,10 @@ * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the DWT implementation. * </p> + * + * @see <a href="http://www.eclipse.org/swt/snippets/#directorydialog">DirectoryDialog snippets</a> + * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample, Dialog tab</a> + * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ public class DirectoryDialog : Dialog { String message = "", filterPath = ""; @@ -79,7 +83,7 @@ * </ul> */ public this (Shell parent, int style) { - super (parent, style); + super (parent, checkStyle (parent, style)); checkSubclass (); } @@ -126,12 +130,10 @@ panel.setTitle(NSString.stringWith(title !is null ? title : "")); panel.setCanChooseFiles(false); panel.setCanChooseDirectories(true); - int response = panel.runModal(); + int /*long*/ response = panel.runModal(); if (response is OS.NSFileHandlingPanelOKButton) { NSString filename = panel.filename(); - char[] buffer = new char[filename.length()]; - filename.getCharacters_(buffer); - directoryPath = filterPath = new String(buffer); + directoryPath = filterPath = filename.getString(); } // options.optionFlags = OS.kNavSupportPackages | OS.kNavAllowOpenPackages | OS.kNavAllowInvisibleFiles; return directoryPath;