Mercurial > projects > dwt-linux
comparison dwt/dwthelper/System.d @ 306:9764f08379f2
fix dwthelper after recent change
author | John Reimer<terminal.node@gmail.com> |
---|---|
date | Sat, 16 Aug 2008 23:12:10 -0700 |
parents | c7c696cdfec2 |
children | 7ca3f26319f1 |
comparison
equal
deleted
inserted
replaced
305:c7c696cdfec2 | 306:9764f08379f2 |
---|---|
5 | 5 |
6 import dwt.dwthelper.utils; | 6 import dwt.dwthelper.utils; |
7 | 7 |
8 import tango.sys.Environment; | 8 import tango.sys.Environment; |
9 import tango.core.Exception; | 9 import tango.core.Exception; |
10 import tango.io.model.IFile; | 10 import tango.io.model.IFile : FileConst; |
11 import tango.time.Clock; | 11 import tango.time.Clock; |
12 import tango.stdc.stdlib : exit; | 12 import tango.stdc.stdlib : exit; |
13 | 13 |
14 template SimpleType(T) { | 14 template SimpleType(T) { |
15 debug{ | 15 debug{ |
149 public static String getProperty( String key ){ | 149 public static String getProperty( String key ){ |
150 /* Get values for local dwt specific keys */ | 150 /* Get values for local dwt specific keys */ |
151 String* p; | 151 String* p; |
152 if (key[0..3] == "dwt") { | 152 if (key[0..3] == "dwt") { |
153 return ((p = key in localProperties) != null) ? *p : null; | 153 return ((p = key in localProperties) != null) ? *p : null; |
154 } | |
155 /* else get values for global system keys (environment) */ | 154 /* else get values for global system keys (environment) */ |
156 } else { | 155 } else { |
157 switch( key ){ | 156 switch( key ){ |
158 case "os.name": return "linux"; | 157 case "os.name": return "linux"; |
159 case "user.name" return ""; | 158 case "user.name": return ""; |
160 case "user.home" return ""; | 159 case "user.home": return ""; |
161 case "user.dir" : return ""; | 160 case "user.dir" : return ""; |
162 case "file.separator" : return FileConst.PathSeparatorString ; | 161 case "file.separator" : return FileConst.PathSeparatorString ; |
163 default: return null; | 162 default: return null; |
164 } | 163 } |
165 } | 164 } |