Changeset 249
- Timestamp:
- 03/31/07 13:06:52 (2 years ago)
- Files:
-
- trunk/src/leds/CodeView.d (modified) (4 diffs)
- trunk/src/leds/DockerFiles.d (modified) (8 diffs)
- trunk/src/leds/LanguageD.d (modified) (3 diffs)
- trunk/src/leds/Leds.d (modified) (5 diffs)
- trunk/src/leds/Scintilla.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/leds/CodeView.d
r242 r249 23 23 module leds.CodeView; 24 24 25 debug = saveFile; 26 25 27 private: 26 28 import leds.FileView; … … 77 79 import leds.Scintilla; 78 80 import leds.SimpleCodeEdit; 81 import leds.SourceViewEdit; 79 82 80 83 private import gtk.Widget; … … 207 210 { 208 211 codeEdit = new SimpleCodeEdit(); 209 // codeEdit = new Scintilla(); 210 } 211 // else if ( Leds.leds.editorType == "textView" ) 212 // { 213 // codeEdit = new SimpleCodeEdit(); 214 // } 212 } 213 else if ( Leds.leds.editorType == "textView" ) 214 { 215 codeEdit = new SimpleCodeEdit(); 216 } 217 else if ( Leds.leds.editorType == "sv" ) 218 { 219 codeEdit = new SourceViewEdit(); 220 } 215 221 else 216 222 { 217 // codeEdit = new SimpleCodeEdit();218 223 codeEdit = new Scintilla(); 219 224 } … … 801 806 int textLength = codeEdit.getLength(); 802 807 808 debug(saveFile)writefln("CodeView.saveField 1"); 803 809 String text = codeEdit.getText(); 810 debug(saveFile)writefln("CodeView.saveField 1 text:\n%s",text); 804 811 805 812 buf.write(text.toString()); trunk/src/leds/DockerFiles.d
r242 r249 19 19 module leds.DockerFiles; 20 20 21 //debug = loadState; 22 21 23 private import leds.Docker; 22 24 … … 218 220 Leds leds = Leds.leds; 219 221 String ledsHome = leds.getHomeDir(); 220 221 222 222 223 XmlDocument xdoc = new XmlDocument("openedFiles1.leds"); … … 292 293 public void loadState(char[] workspaceName) 293 294 { 295 debug(loadState)writefln("DockerFiles.loadState 1"); 294 296 Leds leds = Leds.leds; 295 297 String ledsHome = leds.getHomeDir(); 296 298 XmlParser parser = new XmlParser(); 297 299 char[] text; 298 try { 300 try 301 { 302 debug(loadState)writefln("DockerFiles.loadState 2"); 299 303 text = cast(char[])FileBuffer.read(Path.join(ledsHome,"openedFiles1.leds")); 300 } catch (FileException e) { 304 } 305 catch (FileException e) 306 { 307 debug(loadState)writefln("DockerFiles.loadState 3"); 301 308 return; 302 309 } … … 305 312 306 313 String currFile = null; 314 debug(loadState)writefln("DockerFiles.loadState 4"); 307 315 foreach( XmlNode wspace ; wspaces ) 308 316 { 317 debug(loadState)writefln("DockerFiles.loadState 5"); 309 318 if ( workspaceName == wspace.getAttributeValue("name", "") ) 310 319 { 311 320 321 debug(loadState)writefln("DockerFiles.loadState 6"); 312 322 XmlNode xnode = wspace.getChildNode("view"); 313 323 if ( xnode !is null ) 314 324 { 325 debug(loadState)writefln("DockerFiles.loadState 7"); 315 326 switch (xnode.getAttributeValue("tabsPosition", "top") ) 316 327 { … … 323 334 } 324 335 336 debug(loadState)writefln("DockerFiles.loadState 8"); 325 337 FileView currView = null; 326 338 XmlNode xOpenedFiles = wspace.getChildNode("openedFiles"); 327 339 foreach ( XmlNode xFile ; xOpenedFiles.getNodes("file") ) 328 340 { 341 debug(loadState)writefln("DockerFiles.loadState 9"); 329 342 XmlNode xProject = xFile.getChildNode("project"); 330 343 XmlNode xEditing = xFile.getChildNode("editing"); … … 334 347 if ( xFile.getAttributeValue("current", 0) == 1 ) 335 348 { 349 debug(loadState)writefln("DockerFiles.loadState 10"); 336 350 currFile = new String(xFile.getAttributeValue("name", "untitled")); 337 351 } 338 352 if ( xEditing !is null ) 339 353 { 354 debug(loadState)writefln("DockerFiles.loadState 11"); 340 355 firstLine = xEditing.getAttributeValue("firstLine", firstLine); 341 356 cursorPosition = xEditing.getAttributeValue("cursorPosition", cursorPosition); … … 349 364 // this would be better doing catch exceptions, but that fails for 350 365 // some reason. 366 debug(loadState)writefln("DockerFiles.loadState 12"); 351 367 if (!Path.exists(new String(xFile.getAttributeValue("name", "untitled")))) { 352 368 continue; 353 369 } 354 370 371 debug(loadState)writefln("DockerFiles.loadState 13"); 355 372 FileView fileView = workspace.openFile( 356 373 new String(xFile.getAttributeValue("name", "untitled")), 357 374 projectName, 358 375 false); 376 debug(loadState)writefln("DockerFiles.loadState 14"); 359 377 fileView.lineScroll(firstLine); 378 debug(loadState)writefln("DockerFiles.loadState 14a"); 360 379 fileView.gotoPos(cursorPosition); 380 debug(loadState)writefln("DockerFiles.loadState 15"); 361 381 362 382 … … 366 386 } 367 387 } 388 debug(loadState)writefln("DockerFiles.loadState 16"); 368 389 if ( currFile !is null ) 369 390 { 391 debug(loadState)writefln("DockerFiles.loadState 17"); 370 392 workspace.bringToFront(currFile); 371 } 393 debug(loadState)writefln("DockerFiles.loadState 18"); 394 } 395 debug(loadState)writefln("DockerFiles.loadState 19"); 372 396 } 373 397 trunk/src/leds/LanguageD.d
r246 r249 1 1 module leds.LanguageD; 2 2 3 //debug=messages; 3 //debug = messages; 4 debug = setLex; 4 5 5 6 import leds.Language; … … 749 750 void setLex(Scintilla scintilla) 750 751 { 751 //printf("setDLex 1\n");752 debug(setLex)printf("setDLex 1\n"); 752 753 scintilla.send(SCI_SETLEXER, SCLEX_D, 0); 753 754 scintilla.send(SCI_SETSTYLEBITS, 5, 0); // not sure what this does. … … 803 804 //SCE_C_GLOBALCLASS=19; 804 805 805 //printf("setDLex2\n");806 debug(setLex)printf("setDColors 2\n"); 806 807 807 808 scintilla.send(SCI_STYLESETFORE, SCE_D_COMMENT, scintilla.getColor("color.Comment.D", 0x009000)); 808 809 scintilla.send(SCI_STYLESETFORE, SCE_D_COMMENTLINE, scintilla.getColor("color.CommentLine.D", 0x009000)); 809 810 scintilla.send(SCI_STYLESETFORE, SCE_D_COMMENTDOC, scintilla.getColor("color.CommentDoc.D", 0x009000)); 810 scintilla.send(SCI_STYLESETFORE, SCE_D_COMMENTNESTED, scintilla.getColor("color.CommentDoc.D", 0x009000));811 scintilla.send(SCI_STYLESETFORE, SCE_D_COMMENTNESTED, scintilla.getColor("color.CommentDoc.D", 0x009000)); 811 812 scintilla.send(SCI_STYLESETFORE, SCE_D_COMMENTLINEDOC, scintilla.getColor("color.CommentDoc.D", 0x009000)); 812 813 scintilla.send(SCI_STYLESETFORE, SCE_D_COMMENTDOCKEYWORD, scintilla.getColor("color.CommentDoc.D", 0x00C000)); trunk/src/leds/Leds.d
r230 r249 50 50 const int VERSION_MINOR = 9; 51 51 const int VERSION_MICRO = 79; 52 const char[] VERSION_QUAL = " alpha";52 const char[] VERSION_QUAL = "beta"; 53 53 54 54 private: … … 72 72 "\n" 73 73 ; 74 75 74 76 75 static const char [] ledsAboutMessage = … … 261 260 debug(startup) printf("Leds.init 10\n"); 262 261 workspace.openSavedState(); 262 debug(startup) printf("Leds.init 10a\n"); 263 263 } 264 264 else … … 393 393 " --home specify leds home directory [default ~/.leds]\n" 394 394 " --data specify leds data directory [default ~/.leds_data]\n" 395 " --editor if 'textView' the internal code editor will be used instead of scintilla\n" 396 " --nop do not open project\n" 395 " --editor the editor to use\n" 396 " 'textView' the internal code editor (obsolete)\n" 397 " 'sv' the new GtkSourceView (incomplete)\n" 398 " 'sc' the Scintilla editor (default)\n" 399 " --nop do not open projects\n" 397 400 "\n" 398 401 "files files to open\n" … … 410 413 case "--editor": 411 414 editorType = new String(args[++offset]); 415 break; 416 417 case "-sv": 418 editorType = new String("sv"); 419 break; 412 420 413 421 default: trunk/src/leds/Scintilla.d
r242 r249 1417 1417 /* Assume scintilla.dll is in same directory as current executable */ 1418 1418 version(Windows) scintilla_Linker = new Linker("scintilla.dll"); 1419 version(linux) scintilla_Linker = new Linker("libscintilla.so ");1419 version(linux) scintilla_Linker = new Linker("libscintilla.so.1.6.3"); 1420 1420 scintilla_Linker.link(scintillaLinks); 1421 1421 }
