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

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

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

revision 1.6 by jefbed, Sat Feb 12 17:57:42 2005 UTC revision 1.7 by jefbed, Wed Feb 23 04:24:31 2005 UTC
# Line 56  arshell_open_file() Line 56  arshell_open_file()
56  {  {
57    char *command_string;    char *command_string;
58    char *buffer;    char *buffer;
59      antiright_get_file_type(arshell.edit.filename);
60    asprintf(&command_string, "cat %s", arshell.edit.filename);    asprintf(&command_string, "cat %s", arshell.edit.filename);
61    buffer=antiright_pipe_read(command_string);    buffer=antiright_pipe_read(command_string);
62    free(command_string);    free(command_string);
# Line 83  arshell_file_select_ok_cb(Widget widget, Line 84  arshell_file_select_ok_cb(Widget widget,
84    XmFileSelectionBoxCallbackStruct *call_pointer=call_data;    XmFileSelectionBoxCallbackStruct *call_pointer=call_data;
85    char *c_string;    char *c_string;
86    
87    if(arshell.flags.file_open)    /*  if(arshell.flags.file_open)
88      {      {
89        arshell_save_work_area();        arshell_save_work_area();
90      }        }*/
91    
92    c_string=antiright_c_string(call_pointer->value);    c_string=antiright_c_string(call_pointer->value);
93    strncpy(arshell.edit.filename, c_string, ARSHELL_MAX_STRLEN);    strncpy(arshell.edit.filename, c_string, ARSHELL_MAX_STRLEN);
94    XtFree(c_string);    XtFree(c_string);
95    XtDestroyWidget(widget);    XtDestroyWidget(widget);
96    
97    if(arshell.flags.saving)    if(arshell.flags.saving && !arshell.flags.opening)
98      {      {
99        arshell.flags.file_open=True;        arshell.flags.file_open=True;
100        arshell_save_work_area();        arshell_save_work_area();
# Line 101  arshell_file_select_ok_cb(Widget widget, Line 102  arshell_file_select_ok_cb(Widget widget,
102      }      }
103    
104    if(arshell.flags.opening)    if(arshell.flags.opening)
105      {      {
       arshell.flags.file_open=True;  
106        arshell_open_file();        arshell_open_file();
107          arshell.flags.file_open=True;
108        arshell.flags.opening=False;        arshell.flags.opening=False;
109      }      }
110    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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