Changeset 251

Show
Ignore:
Timestamp:
05/27/07 17:33:58 (2 years ago)
Author:
Ant
Message:

small fixes for SourceCodeView? version

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/leds/CodeEdit.d

    r250 r251  
    2727public: 
    2828 
     29public interface EditMark 
     30{ 
     31    void setVisible(bool setting); 
     32    bool getVisible(); 
     33    bool getDeleted(); 
     34    char[] getName(); 
     35    //GtkTextBuffer*      gtk_text_mark_get_buffer            (GtkTextMark *mark); 
     36    bool getLeftGravity(); 
     37} 
     38 
    2939/** 
    3040 * This defines a code editor inteface for leds. 
     
    360370    void hideLines(int line , int lastLine); 
    361371    int getLineVisible(int line); 
     372     
     373    void grabFocus(); 
    362374 
    363375//SCI_LINEDOWN       
  • trunk/src/leds/CodeView.d

    r250 r251  
    2323module leds.CodeView; 
    2424 
    25 debug = saveFile; 
     25//debug = saveFile; 
    2626 
    2727private: 
    28 import leds.FileView; 
    29      
    30 private: 
    31 import leds.CodeEdit; 
     28 
     29private import leds.FileView; 
     30     
     31private import leds.CodeEdit; 
    3232     
    3333import glib.Spawn; 
     
    12591259        } 
    12601260        findText(selected,backwards); 
     1261        codeEdit.grabFocus(); 
    12611262    } 
    12621263     
     
    14191420    void grabFocus() 
    14201421    { 
    1421         codeEdit.getWidget().grabFocus(); 
     1422        codeEdit.grabFocus(); 
    14221423    } 
    14231424     
     
    27412742     * @return  
    27422743     */ 
    2743     bit editUpdateUI() 
    2744     { 
    2745         //printf("CodeView.editUpdateUI \n" ); 
     2744    bool editUpdateUI() 
     2745    { 
     2746        printf("CodeView.editUpdateUI \n" ); 
    27462747        userAllowClose = false; 
    27472748        if (!inChange ) 
  • trunk/src/leds/Project.d

    r242 r251  
    777777    static class BeepCompiler : Compiler 
    778778    { 
    779         this(char[] project="Compd", char[] target="compd") 
    780         { 
    781             super(project, target); 
     779        this(bool usePhobos, char[] project="Compd", char[] target="compd") 
     780        { 
     781            super(usePhobos, project, target); 
    782782        } 
    783783         
     
    817817        private void setupCompiler(ProjectTarget target) 
    818818        { 
    819             compiler = new BeepCompiler(); 
     819            compiler = new BeepCompiler(target.runtime == "phobos"); 
    820820            char[] baseSrc = target.getBaseDir.toString(); 
    821821            compiler.addArg("-I"~baseSrc); 
     
    830830            foreach (String arg ; target.linkLibraries ) 
    831831            { 
    832                 foreach ( String lib ; arg.split
     832                foreach ( String lib ; arg.split()
    833833                { 
    834834                    compiler.addArg(lib.toString());                     
    835835                } 
    836836            } 
     837             
     838            foreach ( String arg ; target.versionTags ) 
     839            { 
     840                compiler.addArg("-version="~arg.toString()); 
     841            } 
     842             
    837843             
    838844            if ( target.exec ) 
  • trunk/src/leds/ProjectTarget.d

    r230 r251  
    129129    bit lib; 
    130130    bit staticLib; 
     131    String runtime; 
     132    bit runtimePhobos; 
     133    bit runtimeTango; 
     134     
    131135    bit cFlag; 
    132136    bit dFlag; 
     
    159163        //srcdirs = new String(); 
    160164        baseDir = new String(); 
     165        runtime = new String("phobos"); 
    161166        linkerFlags = new String(); 
    162167        linkCommand = new String(); 
     
    411416                    case "versionTags": 
    412417                        target.versionTags ~= getWords(tokens); 
    413                         //printf("ProjectTarget.setTargets versionTags %.*s \n", String.join(target.versionTags,"<+>").toString()); 
     418                        printf("ProjectTarget.setTargets versionTags %.*s \n", String.join(target.versionTags,"<+>").toString()); 
     419                        break; 
     420                         
     421                    case "runtime": 
     422                        target.runtime = tokens[0].dup; 
    414423                        break; 
    415424                         
     
    457466                ~  "\n+ lib:" ~ getString(target.lib) 
    458467                ~  "\n+ staticLib:" ~ getString(target.staticLib) 
     468                ~  "\n+ runtime:" ~ target.runtime 
    459469                ~  "\n+ -c:" ~ getString(target.cFlag) 
    460470                ~  "\n+ -d:" ~ getString(target.dFlag) 
  • trunk/src/leds/ProjectTargetUI.d

    r242 r251  
    502502        addPUI("lib"); 
    503503        addPUI("staticLib"); 
     504        addPUI("runtime"); 
    504505        addPUI("basedir"); 
    505506        addPUI("srcdirs"); 
     
    700701        props.set("lib", target.lib); 
    701702        props.set("staticLib", target.staticLib); 
     703        props.set("runtime", target.runtime); 
     704         
    702705        props.set("srcdirs", target.srcdirs); 
    703706        props.set("basedir", target.baseDir); 
     
    776779        target.lib = props.get("lib", target.lib); 
    777780        target.staticLib = props.get("staticLib", target.staticLib); 
     781        target.runtime = props.get("runtime", target.runtime); 
     782        target.runtimePhobos = props.get("runtimePhobos", target.runtimePhobos); 
     783        target.runtimeTango = props.get("runtimeTango", target.runtimeTango); 
     784         
    778785        target.srcdirs = props.get("srcdirs", target.srcdirs); 
    779786        target.baseDir = props.get("basedir", target.baseDir); 
     
    850857        props.add(PropsTypes.YES_NO, "exec","", "exec","","Target.",  "Select the type of target\nThis can be a library or an executable"); 
    851858        props.add(PropsTypes.YES_NO, "lib","", "lib","","Target."); 
    852         props.add(PropsTypes.YES_NO, "staticLib","", "staticLib","","Target."); 
     859        props.add(PropsTypes.YES_NO, "staticLib","", "static Lib","","Target."); 
     860         
     861        props.add(PropsTypes.LIST,      "runtime",      "phobos:phobos:tango", "Runtime","",""); 
     862         
     863        props.add(PropsTypes.YES_NO, "runtimePhobos","", "runtime phobos","","Target."); 
     864        props.add(PropsTypes.YES_NO, "runtimeTango","", "runtime tango","","Target."); 
     865         
    853866        props.add(PropsTypes.MULTY_DIRECTORY, "srcdirs","", "sources","","Source.", "Select the directories that contain your sources\nor the *.d modules to include"); 
    854867        props.add(PropsTypes.TEXT, "basedir","", "basedir","","Source.", "This is the base directory for you target"); 
  • trunk/src/leds/Scintilla.d

    r250 r251  
    16571657private import gtkc.gobject; 
    16581658 
     1659public class ScintillaMark : EditMark 
     1660{ 
     1661    void setVisible(bool setting) 
     1662    { 
     1663    } 
     1664     
     1665    bool getVisible() 
     1666    { 
     1667        return true; 
     1668    } 
     1669 
     1670    bool getDeleted() 
     1671    { 
     1672        return false; 
     1673    } 
     1674 
     1675    char[] getName() 
     1676    { 
     1677        return ""; 
     1678    } 
     1679 
     1680    //GtkTextBuffer*      gtk_text_mark_get_buffer            (GtkTextMark *mark); 
     1681    bool getLeftGravity() 
     1682    { 
     1683        return true; 
     1684    } 
     1685 
     1686} 
     1687 
    16591688public: 
    16601689class Scintilla : Container , CodeEdit 
     
    28062835    //  return getColor(new String(name), def); 
    28072836    //} 
     2837 
     2838    void grabFocus() 
     2839    { 
     2840        getWidget().grabFocus(); 
     2841    } 
    28082842     
    28092843} 
  • trunk/src/leds/SimpleCodeEdit.d

    r250 r251  
    100100    bit userListSelectionSignals; 
    101101     
     102    import gtkc.gobjecttypes; 
    102103     
    103104    /** 
     
    970971    } 
    971972 
     973    void grabFocus() 
     974    { 
     975        view.grabFocus(); 
     976    } 
    972977} 
    973978 
     
    15761581        return true; 
    15771582    } 
     1583 
     1584 
    15781585     
    15791586}