Mercurial > projects > dwt-addons
changeset 99:cdf77a0793c2
merge
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 03 Aug 2008 00:52:34 +0200 |
parents | 95307ad235d9 (current diff) 0168c579a3f9 (diff) |
children | 86617aa6b5dd |
files | |
diffstat | 4 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/dwtx/core/runtime/Path.d Sun Aug 03 00:52:14 2008 +0200 +++ b/dwtx/core/runtime/Path.d Sun Aug 03 00:52:34 2008 +0200 @@ -13,6 +13,7 @@ module dwtx.core.runtime.Path; import tango.io.FilePath; +static import tango.io.Path; import dwtx.core.runtime.IPath; import dwtx.core.runtime.Assert; @@ -885,7 +886,7 @@ * @see IPath#toFile() */ public FilePath toFile() { - return new FilePath(toOSString()); + return new FilePath(tango.io.Path.standard(toOSString())); } /* (Intentionally not included in javadoc)
--- a/dwtx/jface/preference/DirectoryFieldEditor.d Sun Aug 03 00:52:14 2008 +0200 +++ b/dwtx/jface/preference/DirectoryFieldEditor.d Sun Aug 03 00:52:34 2008 +0200 @@ -22,6 +22,7 @@ import dwt.dwthelper.utils; import tango.io.FilePath; +static import tango.io.Path; import tango.io.FileSystem; /** @@ -56,7 +57,7 @@ * Opens the directory chooser dialog and returns the selected directory. */ protected override String changePressed() { - auto f = new FilePath(getTextControl().getText()); + auto f = new FilePath(tango.io.Path.standard(getTextControl().getText())); if (!f.exists()) { f = cast(FilePath)null; } @@ -78,7 +79,7 @@ if (fileName.length is 0 && isEmptyStringAllowed()) { return true; } - auto file = new FilePath(fileName); + auto file = new FilePath(tango.io.Path.standard(fileName)); return file.exists() && file.isFolder(); } @@ -98,7 +99,7 @@ if (dir !is null) { dir = dir.trim(); if (dir.length > 0) { - return new FilePath(dir); + return new FilePath(tango.io.Path.standard(dir)); } }
--- a/dwtx/jface/preference/FileFieldEditor.d Sun Aug 03 00:52:14 2008 +0200 +++ b/dwtx/jface/preference/FileFieldEditor.d Sun Aug 03 00:52:34 2008 +0200 @@ -22,6 +22,7 @@ import dwt.dwthelper.utils; import tango.io.FilePath; +static import tango.io.Path; import tango.io.FileSystem; /** @@ -102,7 +103,7 @@ * Opens the file chooser dialog and returns the selected file. */ protected override String changePressed() { - auto f = new FilePath(getTextControl().getText()); + auto f = new FilePath(tango.io.Path.standard(getTextControl().getText())); if (!f.exists()) { f = cast(FilePath)null; } @@ -133,7 +134,7 @@ msg = getErrorMessage(); } } else { - auto file = new FilePath(path); + auto file = new FilePath(tango.io.Path.standard(path)); if (/+file.isFile()+/ file.exists && !file.isFolder ) { if (enforceAbsolute && !file.isAbsolute()) { msg = JFaceResources @@ -173,7 +174,7 @@ if (file !is null) { file = file.trim(); if (file.length > 0) { - return new FilePath(file); + return new FilePath(tango.io.Path.standard(file)); } }
--- a/dwtx/jface/preference/PathEditor.d Sun Aug 03 00:52:14 2008 +0200 +++ b/dwtx/jface/preference/PathEditor.d Sun Aug 03 00:52:34 2008 +0200 @@ -15,6 +15,7 @@ import dwtx.jface.preference.ListEditor; import tango.io.FilePath; +static import tango.io.Path; import tango.io.model.IFile; // import java.util.ArrayList; @@ -89,7 +90,7 @@ dialog.setMessage(dirChooserLabelText); } if (lastPath !is null) { - if ((new FilePath(lastPath)).exists()) { + if ((new FilePath(tango.io.Path.standard(lastPath))).exists()) { dialog.setFilterPath(lastPath); } }