home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / freedraft.tar.gz / freedraft.tar / FREEdraft-050298 / HACKV / freedraft_v1_18.patch < prev    next >
Text File  |  1998-04-23  |  7KB  |  194 lines

  1. diff -c v/srcx/vdialog.cxx ../v/srcx/vdialog.cxx
  2. *** v/srcx/vdialog.cxx    Tue Mar 10 18:34:39 1998
  3. --- ../v/srcx/vdialog.cxx    Thu Apr 23 21:43:28 1998
  4. ***************
  5. *** 377,382 ****
  6. --- 377,392 ----
  7.       // simple interface between command objects and the
  8.       // inherited vCmdParent ProcessCmd to the CommandObject which does the work
  9.   
  10. +     if (ct == C_TextIn)  // TextIn special
  11. +       {
  12. +         if (_DefaultButton == 0) // There is NOT a default button
  13. +            return;
  14. +         // change the textin return to the default button
  15. +         id = _DefaultButton->_cmdId; // get the id of the default cmd
  16. +         rv = _DefaultButton->_retVal;
  17. +         ct = (_DefaultButton->dlgCmd)->cmdType;
  18. +       }
  19.       DialogCommand(id, rv, ct);
  20.     }
  21.   
  22. Only in ../v/srcx/: vdialog.cxx~
  23. diff -c v/srcx/vfilesel.cxx ../v/srcx/vfilesel.cxx
  24. *** v/srcx/vfilesel.cxx    Tue Mar 10 18:30:31 1998
  25. --- ../v/srcx/vfilesel.cxx    Thu Apr 23 23:50:16 1998
  26. ***************
  27. *** 128,134 ****
  28.   
  29.   //======================>>> vFileSelect::FileSelect <<<=======================
  30.     int vFileSelect::FileSelect(const char* msg, char* filename, 
  31. !     const int maxlen, char** filter, int& filterIndex)
  32.     {
  33.       //    Show the file selection dialog.
  34.       //    returns 0 on cancel, 1 otherwise
  35. --- 128,134 ----
  36.   
  37.   //======================>>> vFileSelect::FileSelect <<<=======================
  38.     int vFileSelect::FileSelect(const char* msg, char* filename, 
  39. !     const int maxlen, char** filter, int& filterIndex, const char* dirDefault)
  40.     {
  41.       //    Show the file selection dialog.
  42.       //    returns 0 on cancel, 1 otherwise
  43. ***************
  44. *** 161,172 ****
  45.       fileFilter = filterList[0];
  46.         }
  47.   
  48.       // Fill this in dynamically so we can have dynamic heap array
  49.   
  50.       FileSelectDialog[FileListIndex].itemList = (void *)fileList;
  51.       FileSelectDialog[DirListIndex].itemList = (void *)dirList;
  52.   
  53. !     GetDirList(".", fileFilter, fileList, maxFiles, dirList, maxDirs);
  54.   
  55.       dirSel =         // No file selected
  56.       curSel = -1;        // No file selected
  57. --- 161,191 ----
  58.       fileFilter = filterList[0];
  59.         }
  60.   
  61. +     // Note: this SetString won't work on Windows...
  62. +     // check for supplied default directory
  63. +     if ( dirDefault == NULL) 
  64. +     {
  65. +         if (getcwd(temp,maxFileLen-1))    // get the current directory
  66. +         SetString(fsCD,temp);
  67. +         strcpy(curDir,temp);        // preload input with name
  68. +     }
  69. +     else
  70. +     {
  71. +         char* dirtmp = new char[strlen(dirDefault)+2];
  72. +     strcpy(dirtmp,dirDefault);             // make local non-const copy of dir path
  73. +     SetString(fsCD,dirtmp);        // use the supplied directory path
  74. +     strcpy(curDir,dirDefault);
  75. +     delete[] dirtmp;
  76. +     }
  77.       // Fill this in dynamically so we can have dynamic heap array
  78.   
  79.       FileSelectDialog[FileListIndex].itemList = (void *)fileList;
  80.       FileSelectDialog[DirListIndex].itemList = (void *)dirList;
  81.   
  82. !     GetDirList(curDir, fileFilter, fileList, maxFiles, dirList, maxDirs);
  83.   
  84.       dirSel =         // No file selected
  85.       curSel = -1;        // No file selected
  86. ***************
  87. *** 177,191 ****
  88.       _cmdsAdded = 1;
  89.         }
  90.   
  91. -     // Read the current directory
  92. -     // Note: this SetString won't work on Windows...
  93. -     if (getcwd(temp,maxFileLen-1))    // get the current directory
  94. -     SetString(fsCD,temp);
  95. -     strcpy(curDir,temp);        // preload input with name
  96.       if (*filename)        // provided a base name
  97.       strcpy(origFile,filename);
  98.   
  99. --- 196,201 ----
  100. ***************
  101. *** 214,222 ****
  102.   
  103.   //======================>>> vFileSelect::FileSelect <<<=======================
  104.     int vFileSelect::FileSelectSave(const char* msg, char* filename, 
  105. !     const int maxlen, char** filter, int& filterIndex)
  106.     {
  107. !     return FileSelect(msg, filename, maxlen, filter, filterIndex);
  108.     }
  109.   
  110.   //====================>>> vFileSelect::DialogCommand <<<=======================
  111. --- 224,232 ----
  112.   
  113.   //======================>>> vFileSelect::FileSelect <<<=======================
  114.     int vFileSelect::FileSelectSave(const char* msg, char* filename, 
  115. !     const int maxlen, char** filter, int& filterIndex, const char* dirDefault)
  116.     {
  117. !     return FileSelect(msg, filename, maxlen, filter, filterIndex, dirDefault);
  118.     }
  119.   
  120.   //====================>>> vFileSelect::DialogCommand <<<=======================
  121. Only in ../v/srcx/: vfilesel.cxx.orig
  122. Only in ../v/srcx/: vfilesel.cxx.rej
  123. Only in ../v/srcx/: vfilesel.cxx.rej.orig
  124. Only in ../v/srcx/: vfilesel.cxx~
  125. diff -c v/srcx/vtextinc.cxx ../v/srcx/vtextinc.cxx
  126. *** v/srcx/vtextinc.cxx    Fri Mar  6 18:38:25 1998
  127. --- ../v/srcx/vtextinc.cxx    Thu Apr 23 21:40:37 1998
  128. ***************
  129. *** 270,274 ****
  130. --- 270,276 ----
  131.       //@@@ This will interact with the Dialog to return if there
  132.       //    was a default button.
  133.       SysDebug(Misc,"vTextInCmd::textReturn\n")
  134. +     
  135. +     _parentWin->ProcessCmd(_cmdId, _retVal, C_TextIn);
  136.   
  137.     }
  138. Only in ../v/srcx/: vtextinc.cxx~
  139. diff -c v/includex/v/vfilesel.h ../v/includex/v/vfilesel.h
  140. *** v/includex/v/vfilesel.h    Tue Mar 10 17:41:21 1998
  141. --- ../v/includex/v/vfilesel.h    Thu Apr 23 23:45:08 1998
  142. ***************
  143. *** 28,36 ****
  144.       ~vFileSelect() {}
  145.   
  146.       int FileSelect(const char* msg, char* filename, 
  147. !         const int maxlen, char** filter, int& filterIndex);
  148.       int FileSelectSave(const char* msg, char* filename, 
  149. !         const int maxlen, char** filter, int& filterIndex);
  150.   
  151.         protected:    //--------------------------------------- protected
  152.   
  153. --- 28,36 ----
  154.       ~vFileSelect() {}
  155.   
  156.       int FileSelect(const char* msg, char* filename, 
  157. !         const int maxlen, char** filter, int& filterIndex,const char* dirDefault = NULL);
  158.       int FileSelectSave(const char* msg, char* filename, 
  159. !         const int maxlen, char** filter, int& filterIndex,const char* dirDefault = NULL);
  160.   
  161.         protected:    //--------------------------------------- protected
  162.   
  163. Only in ../v/includex/v/: vfilesel.h.orig
  164. Only in ../v/includex/v/: vfilesel.h~
  165. diff -c v/includex/v/vutil.h ../v/includex/v/vutil.h
  166. *** v/includex/v/vutil.h    Tue Mar 17 15:13:28 1998
  167. --- ../v/includex/v/vutil.h    Thu Apr 23 22:06:35 1998
  168. ***************
  169. *** 8,16 ****
  170. --- 8,21 ----
  171.   // Version 2. This library has NO WARRANTY. See the source file
  172.   // vapp.cxx for more complete information about license terms.
  173.   //===============================================================
  174. + //
  175. + //
  176.   
  177.   #ifndef VUTIL_H
  178.   #define VUTIL_H
  179. + #include<v/v_defs.h>
  180.       extern void LongToStr(long intg, char* str);    // prototype
  181.       extern void IntToStr(int intg, char* str);
  182.       extern void vGetLocalTime(char* tm);
  183. Only in ../v/includex/v/: vutil.h~
  184.