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, |
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 |
} |
} |
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 |