Changeset 345
- Timestamp:
- 05/06/07 07:43:21 (2 years ago)
- Files:
-
- branches/poseidon/dsss.conf (modified) (2 diffs)
- branches/poseidon/poseidon/controller/dialog/splash.d (modified) (5 diffs)
- branches/poseidon/poseidon/controller/gui.d (modified) (2 diffs)
- branches/poseidon/poseidon/loader.d (modified) (1 diff)
- branches/poseidon/poseidon/poseidon.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/poseidon/dsss.conf
r343 r345 1 1 [*] 2 2 version( Windows ){ 3 buildflags+=-ll"swt-wgl-win32-3235"4 buildflags+=-ll"swt-awt-win32-3235"5 buildflags+=-ll"swt-gdip-win32-3235"6 buildflags+=-ll"swt-win32-3235"7 buildflags+=-L/SUBSYSTEM:console:58 3 } 9 4 version( linux ){ … … 33 28 34 29 [poseidon\poseidon.d] 30 target=poseidon.exe 31 buildflags+=poseidon\style\xpm.d 35 32 buildflags+=-ICodeAnalyzer 36 33 buildflags+=-Ic:\Project\tangobos 34 35 buildflags+=-S. 36 buildflags+=-I..\tangobos 37 buildflags+=-ll"swt-wgl-win32-3235" 38 buildflags+=-ll"swt-awt-win32-3235" 39 buildflags+=-ll"swt-gdip-win32-3235" 40 buildflags+=-ll"swt-win32-3235" 41 buildflags+=-ll"Stangobos-etc" 42 buildflags+=-ll"Stangobos" 43 buildflags+=-ll"Scrc32" 44 buildflags+=-L/SUBSYSTEM:console:5 37 45 38 46 branches/poseidon/poseidon/controller/dialog/splash.d
r343 r345 4 4 private import poseidon.globals; 5 5 import dejavu.lang.String; 6 import dejavu.lang.Class; 6 7 import std.path; 7 8 8 class Splash : Shell9 class Splash 9 10 { 10 11 Canvas canvas; … … 12 13 Point pt; 13 14 Font font; 15 Shell shell; 14 16 15 17 this(Shell shell) 16 18 { 17 super(shell, SWT.NO_TRIM);19 this.shell= new Shell( shell, SWT.NO_TRIM ); 18 20 19 21 try{ 20 image = new Image( display,22 image = new Image(shell.getDisplay, 21 23 String.fromUtf8(std.path.join(Globals.appDir, "splash.jpg"))); 22 24 }catch(Object o){ … … 26 28 if(image) 27 29 { 28 font = new Font( getDisplay(), String.fromUtf8("Verdana"), 11, SWT.NORMAL);30 font = new Font(shell.getDisplay(), String.fromUtf8("Verdana"), 11, SWT.NORMAL); 29 31 30 canvas = new Canvas( this, SWT.NONE);32 canvas = new Canvas(shell, SWT.NONE); 31 33 canvas.handleEvent(null, SWT.Paint, &onPaint); 32 34 Rectangle rect = image.getBounds(); 33 35 pt = new Point(rect.width, rect.height); 34 s etSize(pt);36 shell.setSize(pt); 35 37 pt.x -= 1; 36 38 pt.y -= 1; 37 setLayout(new FillLayout()); 39 shell.setLayout(new FillLayout()); 40 shell.handleEvent( this, SWT.Paint, &onPaint ); 38 41 //FIXME: centerWindow(null); 39 open();42 shell.open(); 40 43 }else{ 41 44 // since we failed to load the splash image, dispose me 42 dispose();45 shell.dispose(); 43 46 } 44 47 } … … 49 52 50 53 GC gc = e.gc; 51 gc.setForeground( getDisplay().getSystemColor(SWT.COLOR_WHITE));54 gc.setForeground(shell.getDisplay().getSystemColor(SWT.COLOR_WHITE)); 52 55 gc.setFont(font); 53 56 gc.drawImage(image, 0, 0); 54 57 gc.dh_drawString("v " ~ Globals.getVersionS(), x, y, true); 55 58 // draw a frame outside the image 56 gc.setForeground( getDisplay().getSystemColor(SWT.COLOR_BLACK));59 gc.setForeground(shell.getDisplay().getSystemColor(SWT.COLOR_BLACK)); 57 60 gc.drawRectangle(0, 0, pt.x, pt.y); 58 61 } 59 62 60 ~this()63 void dispose() 61 64 { 62 65 // release image here … … 65 68 if(font) 66 69 font.dispose(); 67 dispose();70 shell.dispose(); 68 71 } 69 72 } branches/poseidon/poseidon/controller/gui.d
r343 r345 18 18 private import poseidon.intellisense.autocomplete; 19 19 20 import poseidon.controller.dialog.splash; 21 20 22 import dejavu.lang.JObjectImpl; 21 23 import dejavu.lang.Runnable; … … 50 52 SashForm mainSash, topSash; 51 53 52 public this(Display display, Shell mainShell, S hellsplashShell)54 public this(Display display, Shell mainShell, Splash splashShell) 53 55 { 54 56 sGUI = this; branches/poseidon/poseidon/loader.d
r335 r345 24 24 25 25 // show splash screen if desired 26 S hellsplash;26 Splash splash; 27 27 if(Globals.showSplash){ 28 28 splash = new Splash(shell); branches/poseidon/poseidon/poseidon.d
r343 r345 2 2 3 3 private import poseidon.loader; 4 4 import dejavu.Intern; 5 5 version(none){ 6 6 version(build){ … … 64 64 } 65 65 } 66 import org.eclipse.swt.StaticCtorsSwt; 67 extern(C) ubyte[] resources_getDataById( char[] id ){ 68 return null; 69 } 66 70 /** 67 71 * the global entrance 68 72 */ 69 73 void main(char[][] args){ 70 Loader.main(args); 74 org.eclipse.swt.StaticCtorsSwt.callAllStaticCtors(); 75 Loader.main(args); 71 76 }
