diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-04-01 19:58:08 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-04-01 19:58:08 +0000 |
| commit | cd339710f0b1c3bbaa080978f0e6ee01f4fdc204 (patch) | |
| tree | f54e63770ffb4ea27c89071ca8d26cb4995e5640 /fluid/fluid.cxx | |
| parent | 3fd86acaec37d8fefe98c470ddd01a20499df579 (diff) | |
FLUID shell command patch from Erco.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2963 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/fluid.cxx')
| -rw-r--r-- | fluid/fluid.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 5e752a365..edf298092 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1,5 +1,5 @@ // -// "$Id: fluid.cxx,v 1.15.2.13.2.36 2002/11/03 00:01:20 matthiaswm Exp $" +// "$Id: fluid.cxx,v 1.15.2.13.2.37 2003/04/01 19:58:08 easysw Exp $" // // FLUID main entry for the Fast Light Tool Kit (FLTK). // @@ -636,16 +636,18 @@ shell_pipe_cb(int, void*) { if (fgets(line, sizeof(line), shell_pipe) != NULL) { // Add the line to the output list... - shell_run_list->add(line); - shell_run_list->make_visible(shell_run_list->size()); + shell_run_buffer->append(line); } else { // End of file; tell the parent... Fl::remove_fd(fileno(shell_pipe)); pclose(shell_pipe); shell_pipe = NULL; - shell_run_list->add("... END SHELL COMMAND ..."); + shell_run_buffer->append("... END SHELL COMMAND ...\n"); } + + shell_run_display->scroll(shell_run_display->count_lines(0, + shell_run_buffer->length(), 1), 0); } void @@ -682,8 +684,9 @@ do_shell_command(Fl_Return_Button*, void*) { } // Show the output window and clear things... - shell_run_list->clear(); - shell_run_list->add(command); + shell_run_buffer->text(""); + shell_run_buffer->append(command); + shell_run_buffer->append("\n"); shell_run_window->label("Shell Command Running..."); if ((shell_pipe = popen(command, "r")) == NULL) { @@ -692,7 +695,7 @@ do_shell_command(Fl_Return_Button*, void*) { } shell_run_button->deactivate(); - shell_run_window->hotspot(shell_run_list); + shell_run_window->hotspot(shell_run_display); shell_run_window->show(); Fl::add_fd(fileno(shell_pipe), shell_pipe_cb); @@ -853,5 +856,5 @@ int main(int argc,char **argv) { } // -// End of "$Id: fluid.cxx,v 1.15.2.13.2.36 2002/11/03 00:01:20 matthiaswm Exp $". +// End of "$Id: fluid.cxx,v 1.15.2.13.2.37 2003/04/01 19:58:08 easysw Exp $". // |
