/[antiright]/antiright/src/arshell/update.c
ViewVC logotype

Diff of /antiright/src/arshell/update.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jefbed, Mon Aug 9 22:45:02 2004 UTC revision 1.2 by jefbed, Thu Aug 19 21:51:11 2004 UTC
# Line 31  arshell_update() Line 31  arshell_update()
31        char *input_string=        char *input_string=
32          antiright_pipe_read(arshell.updater[counter].command_string);          antiright_pipe_read(arshell.updater[counter].command_string);
33        input_string[strlen(input_string)-1]='\0';        input_string[strlen(input_string)-1]='\0';
       /* FIXME: Add a test here to support updating the contents of  
          various types of widgets, especially scales and text  
          fields.  */  
34        if(XmIsLabel(arshell.updater[counter].widget))        if(XmIsLabel(arshell.updater[counter].widget))
35          {          {
36            antiright_label_string(arshell.updater[counter].widget,            antiright_label_string(arshell.updater[counter].widget,
# Line 49  arshell_update() Line 46  arshell_update()
46                              NULL);                              NULL);
47              }              }
48          }          }
49          else if(arshell.updater[counter].widget==arshell.gui.widgets.work)
50            {
51              /* Append input_string to the work area.  */
52              XmTextInsert(arshell.gui.widgets.work,
53                           XmTextGetLastPosition(arshell.gui.widgets.work),
54                           input_string);
55              XmTextInsert(arshell.gui.widgets.work,
56                           XmTextGetLastPosition(arshell.gui.widgets.work),
57                           "\n");
58            }
59          else if(arshell.updater[counter].widget==antiright.parent_widget)
60            {
61              /* Set the title to input_string.  */
62              antiright_set_title(input_string);
63            }
64        free(input_string);        free(input_string);
65      }      }
66  }  }
# Line 103  arshell_handle_updating_argument(int* co Line 115  arshell_handle_updating_argument(int* co
115        arshell_add_updater(arshell_progress_bar(arshell.gui.widgets.row),        arshell_add_updater(arshell_progress_bar(arshell.gui.widgets.row),
116                            argv[(*counter_int)]);                            argv[(*counter_int)]);
117        break;        break;
118        case 'T': /* Append updating output to work area.  */
119          (*counter_int)++;
120          if(arshell.gui.widgets.work==NULL)
121            arshell_create_text_work_area();
122          arshell_add_updater(arshell.gui.widgets.work, argv[(*counter_int)]);
123          break;
124        case 'W':
125          (*counter_int)++;
126          arshell_add_updater(antiright.parent_widget, argv[(*counter_int)]);
127          break;
128      default:      default:
129        (*counter_int)++;        (*counter_int)++;
130        /* The following avoids a segmentation fault if the status bar        /* The following avoids a segmentation fault if the status bar

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26