Changeset 721

Show
Ignore:
Timestamp:
07/30/07 22:13:36 (1 year ago)
Author:
Gregor
Message:

*: Switched to using timers, moved output to the bottom of the screen.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • other/dps/trunk/dsssps/components.d

    r715 r721  
    4848        dpsApp.aui.AddPane( 
    4949            (new DPSProcessWindow("dsss build" ~ buildName)), 
    50             Direction.wxRIGHT
     50            Direction.wxBOTTOM
    5151            "dsss build" ~ buildName); 
    5252        dpsApp.aui.Update(); 
     
    5959        dpsApp.aui.AddPane( 
    6060            (new DPSProcessWindow("dsss build" ~ buildName ~ " -v")), 
    61             Direction.wxRIGHT
     61            Direction.wxBOTTOM
    6262            "dsss build" ~ buildName ~ " -v"); 
    6363        dpsApp.aui.Update(); 
     
    6969        dpsApp.aui.AddPane( 
    7070            (new DPSProcessWindow("dsss distclean" ~ buildName)), 
    71             Direction.wxRIGHT
     71            Direction.wxBOTTOM
    7272            "dsss distclean" ~ buildName); 
    7373        dpsApp.aui.Update(); 
     
    352352        dpsApp.aui.AddPane( 
    353353            (new DPSProcessWindow("dsss build " ~ name)), 
    354             Direction.wxRIGHT
     354            Direction.wxBOTTOM
    355355            "dsss build " ~ name); 
    356356        dpsApp.aui.Update(); 
     
    362362        dpsApp.aui.AddPane( 
    363363            (new DPSProcessWindow("dsss build -v " ~ name)), 
    364             Direction.wxRIGHT
     364            Direction.wxBOTTOM
    365365            "dsss build -v " ~ name); 
    366366        dpsApp.aui.Update(); 
     
    372372        dpsApp.aui.AddPane( 
    373373                (new DPSProcessWindow("dsss distclean " ~ name)), 
    374                 Direction.wxRIGHT
     374                Direction.wxBOTTOM
    375375                "dsss distclean " ~ name); 
    376376        dpsApp.aui.Update(); 
  • other/dps/trunk/dsssps/dps.d

    r719 r721  
    4949        // remove the prefix if applicable 
    5050        if (prefix != "") { 
    51             Cout(prefix).newline; 
    5251            flist = flist.dup; 
    5352            foreach (k, f; flist) { 
     
    182181        /// The top-level frame in which the AUI sits 
    183182        frame = new wxFrame(null, wxID_ANY, "DSSS Project Studio", 
    184             wxFrame.wxDefaultPosition, wxSize(800, 600)); 
     183            wxFrame.wxDefaultPosition, wxSize(800, 600), 
     184            wxFrame.wxDEFAULT_FRAME_STYLE | wxFrame.wxTAB_TRAVERSAL); 
    185185 
    186186        // The AUI controls the frame 
  • other/dps/trunk/dsssps/process.d

    r717 r721  
    2424class DPSProcessWindow : wxTextCtrl { 
    2525    Process proc; 
     26    wxTimer timer; 
    2627    bool fin = false; 
    2728 
     
    4041 
    4142        // because we're not using a wxProcess, we just have to poll 
    42         EVT_IDLE(&OnIdle); 
     43        timer = new wxTimer(this); 
     44        EVT_TIMER(&OnTimer); 
     45        timer.Start(100); 
    4346    } 
    4447 
    45     void OnIdle(Object s, wxEvent e) 
     48    void OnTimer(Object s, wxEvent e) 
    4649    { 
    47         if (fin) return; 
    48  
    4950        // check for new input [FIXME] 
    5051        char[1024] buf; 
     
    5758            } 
    5859        } catch (Exception e) {} // ignore errors 
    59         (cast(wxIdleEvent) e).RequestMore(); 
    6060 
    6161        // check if we're done 
     
    6565 
    6666        // done, mark so 
    67         fin = true
     67        timer.Stop()
    6868        AppendText("\n\nProgram terminated.\n\nSTDERR:\n"); 
    6969 
     
    8080class DPSProcessRun : wxFrame { 
    8181    Process proc; 
     82    wxTimer timer; 
    8283    void delegate() endF; 
    8384 
     
    9495 
    9596        // because we're not using a wxProcess, we just have to poll 
    96         EVT_IDLE(&OnIdle); 
     97        timer = new wxTimer(this); 
     98        EVT_TIMER(&OnTimer); 
     99        timer.Start(100); 
    97100    } 
    98101 
    99     void OnIdle(Object s, wxEvent e) 
     102    void OnTimer(Object s, wxEvent e) 
    100103    { 
    101104        // check if it's dead 
     
    103106            // boom! 
    104107            endF(); 
     108            timer.Stop(); 
    105109            Destroy(); 
    106110        }