Changeset 269

Show
Ignore:
Timestamp:
03/02/08 04:32:23 (9 months ago)
Author:
Ant
Message:

updated to gtkD. load scintilla on request only.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/compdLeds.sh

    r207 r269  
    1212    -I../../Dool/trunk/src \ 
    1313    -I../../Dante/trunk/src \ 
    14     -I../../Duit/trunk/src \ 
     14    -I../../gtkd/trunk/src \ 
     15    -I../../gtkd/trunk/srcsv \ 
    1516    -I~/dmd/src/phobos \ 
    1617    -L../../Dool/ -ldool \ 
    1718    -L../../Dante/ -ldantfw \ 
    18     -L../../Duit/ -lduit
     19    -L../../gtkd/trunk -lgtkd
    1920    -L/dmd/lib/ -lphobos \ 
    2021    -c \ 
  • trunk/src/leds/FSView.d

    r230 r269  
    612612            } 
    613613        } 
    614         void onExpandCallback(GtkTreeIter * ti, TreePath tp, TreeView tv) 
     614        void onExpandCallback(TreeIter ti, TreePath tp, TreeView tv) 
    615615        { 
    616616            TreeIter iter = new TreeIter(); 
  • trunk/src/leds/ProjectView.d

    r230 r269  
    14401440            return false;   // false : the event is passed to other listeners 
    14411441        } 
    1442         void onExpandCallback(GtkTreeIter * ti, TreePath tp, TreeView tv) 
     1442        void onExpandCallback(TreeIter ti, TreePath tp, TreeView tv) 
    14431443        { 
    14441444            debug(treeView)writefln("ProjectView.onExpandCallback 1"); 
  • trunk/src/leds/Scintilla.d

    r265 r269  
    14121412private Linker scintilla_Linker; 
    14131413 
    1414 static this() 
    1415 { 
    1416     /* Assume scintilla.dll is in same directory as current executable */ 
    1417     version(Windows) scintilla_Linker = new Linker("scintilla.dll"); 
    1418     version(linux)   scintilla_Linker = new Linker("libscintilla.so.1.7.4"); 
    1419     scintilla_Linker.link(scintillaLinks); 
    1420 } 
    1421  
    1422 static ~this() 
    1423 { 
    1424     delete scintilla_Linker; 
    1425 }    
    1426  
    14271414extern(C) 
    14281415{ 
     
    16881675class Scintilla : Container , CodeEdit 
    16891676{ 
     1677 
     1678/+ 
     1679static this() 
     1680{ 
     1681    writefln("loading scintilla lib now"); 
     1682    /* Assume scintilla.dll is in same directory as current executable */ 
     1683    version(Windows) scintilla_Linker = new Linker("scintilla.dll"); 
     1684    version(linux)   scintilla_Linker = new Linker("libscintilla.so.1.7.4"); 
     1685    scintilla_Linker.link(scintillaLinks); 
     1686} 
     1687 
     1688static ~this() 
     1689{ 
     1690    delete scintilla_Linker; 
     1691}    
     1692+/ 
     1693 
     1694static int countInstances; 
     1695 
     1696private static void loadLib() 
     1697{ 
     1698    if ( countInstances == 0 ) 
     1699    { 
     1700        writefln("loading scintilla lib now"); 
     1701        /* Assume scintilla.dll is in same directory as current executable */ 
     1702        version(Windows) scintilla_Linker = new Linker("scintilla.dll"); 
     1703        version(linux)   scintilla_Linker = new Linker("libscintilla.so.1.7.4"); 
     1704        scintilla_Linker.link(scintillaLinks); 
     1705    } 
     1706    ++countInstances; 
     1707} 
     1708 
     1709 
     1710private static void unloadLib() 
     1711{ 
     1712    --countInstances; 
     1713    if ( countInstances == 0 ) 
     1714    { 
     1715        delete scintilla_Linker; 
     1716    } 
     1717} 
     1718 
    16901719    public: 
    16911720    void addCodeEditListener() 
     
    19111940    this() 
    19121941    { 
     1942        loadLib(); 
    19131943        super(cast(GtkContainer*)scintilla_new()); 
    19141944        ID = S_ID++; 
     
    20272057     * resources before the notebook is done with them (I think that's why???) 
    20282058     */ 
    2029     //~this() 
    2030     //
     2059    ~this() 
     2060   
    20312061    //  release(); 
    2032     //} 
     2062    // this is not tested   unloadLib(); 
     2063    } 
    20332064     
    20342065    private: 
  • trunk/src/leds/SourceViewEdit.d

    r265 r269  
    740740    void gotoLine(int lineNumber, bool useAlign=false) 
    741741    { 
     742        writefln("SourceViewEdit.gotoLine 1"); 
     743        insertIter();   // make sure we have a valid iter 
    742744        iter.setLine(lineNumber); 
     745        writefln("SourceViewEdit.gotoLine 2"); 
    743746        buffer.placeCursor(iter); 
     747        writefln("SourceViewEdit.gotoLine 3"); 
    744748        view.scrollToIter(iter, 0.0, useAlign, 0.0, 0.25); 
     749        writefln("SourceViewEdit.gotoLine 4"); 
    745750    } 
    746751