comparison snippets/tree/Snippet8.d @ 129:ae94c6a65f9e

Removed version=TANGOSVN for release 0.99.7
author Frank Benoit <benoit@tionex.de>
date Sat, 26 Jul 2008 02:47:41 +0200
parents 1f0a7a472680
children
comparison
equal deleted inserted replaced
128:884b44777f65 129:ae94c6a65f9e
29 import dwt.widgets.Tree; 29 import dwt.widgets.Tree;
30 import dwt.widgets.TreeItem; 30 import dwt.widgets.TreeItem;
31 31
32 import dwt.dwthelper.utils; 32 import dwt.dwthelper.utils;
33 import tango.io.FilePath; 33 import tango.io.FilePath;
34 version(TANGOSVN){
35 import tango.io.FileSystem; 34 import tango.io.FileSystem;
36 }
37 else{
38 import tango.io.FileRoots;
39 }
40 35
41 void main () { 36 void main () {
42 auto display = new Display (); 37 auto display = new Display ();
43 auto shell = new Shell (display); 38 auto shell = new Shell (display);
44 shell.setText ("Lazy Tree"); 39 shell.setText ("Lazy Tree");
45 shell.setLayout (new FillLayout ()); 40 shell.setLayout (new FillLayout ());
46 auto tree = new Tree (shell, DWT.BORDER); 41 auto tree = new Tree (shell, DWT.BORDER);
47 version(TANGOSVN){
48 auto roots = FileSystem.roots(); 42 auto roots = FileSystem.roots();
49 }
50 else{
51 auto roots = FileRoots.list();
52 }
53 foreach (file; roots) { 43 foreach (file; roots) {
54 auto root = new TreeItem (tree, 0); 44 auto root = new TreeItem (tree, 0);
55 root.setText (file); 45 root.setText (file);
56 root.setData (new FilePath(file)); 46 root.setData (new FilePath(file));
57 new TreeItem (root, 0); 47 new TreeItem (root, 0);