Mercurial > projects > mde
comparison mde/lookup/Options.d @ 101:71f0f1f83620
Some path adjustments for windows (untested) and fonts. All types of option can be edited.
paths: support for getting the full path for a font when just the file name is entered, in order to unify usage on windows and linux.
paths: Used getSpecialPath for some windows paths; needs testing.
Content: Moved line-editing code to abstract ValueContent class and added some conversion functions, so that any type of ValueContent can be edited as text.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sun, 16 Nov 2008 17:03:47 +0000 |
parents | 49e7cfed4b34 |
children | ba035eba07b4 |
comparison
equal
deleted
inserted
replaced
100:0ea4a3e651ae | 101:71f0f1f83620 |
---|---|
122 static if (TIsIn!(T, CTYPES)) { | 122 static if (TIsIn!(T, CTYPES)) { |
123 const char[] ifBlock = `if (tp == "`~T.stringof~`") { | 123 const char[] ifBlock = `if (tp == "`~T.stringof~`") { |
124 auto p = id in opts; | 124 auto p = id in opts; |
125 if (p) { | 125 if (p) { |
126 auto q = cast(`~VContentN!(T)~`) (*p); | 126 auto q = cast(`~VContentN!(T)~`) (*p); |
127 if (q) q.v = parseTo!(`~T.stringof~`) (dt); | 127 if (q) q.assignNoCB = parseTo!(`~T.stringof~`) (dt); |
128 } | 128 } |
129 }`; | 129 }`; |
130 } else | 130 } else |
131 const char[] ifBlock = `if (tp == "`~T.stringof~`") { | 131 const char[] ifBlock = `if (tp == "`~T.stringof~`") { |
132 `~T.stringof~`** p = id in opts`~TName!(T)~`; | 132 `~T.stringof~`** p = id in opts`~TName!(T)~`; |