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 >
Wrap
Text File
|
1998-04-23
|
7KB
|
194 lines
diff -c v/srcx/vdialog.cxx ../v/srcx/vdialog.cxx
*** v/srcx/vdialog.cxx Tue Mar 10 18:34:39 1998
--- ../v/srcx/vdialog.cxx Thu Apr 23 21:43:28 1998
***************
*** 377,382 ****
--- 377,392 ----
// simple interface between command objects and the
// inherited vCmdParent ProcessCmd to the CommandObject which does the work
+ if (ct == C_TextIn) // TextIn special
+ {
+ if (_DefaultButton == 0) // There is NOT a default button
+ return;
+ // change the textin return to the default button
+ id = _DefaultButton->_cmdId; // get the id of the default cmd
+ rv = _DefaultButton->_retVal;
+ ct = (_DefaultButton->dlgCmd)->cmdType;
+ }
+
DialogCommand(id, rv, ct);
}
Only in ../v/srcx/: vdialog.cxx~
diff -c v/srcx/vfilesel.cxx ../v/srcx/vfilesel.cxx
*** v/srcx/vfilesel.cxx Tue Mar 10 18:30:31 1998
--- ../v/srcx/vfilesel.cxx Thu Apr 23 23:50:16 1998
***************
*** 128,134 ****
//======================>>> vFileSelect::FileSelect <<<=======================
int vFileSelect::FileSelect(const char* msg, char* filename,
! const int maxlen, char** filter, int& filterIndex)
{
// Show the file selection dialog.
// returns 0 on cancel, 1 otherwise
--- 128,134 ----
//======================>>> vFileSelect::FileSelect <<<=======================
int vFileSelect::FileSelect(const char* msg, char* filename,
! const int maxlen, char** filter, int& filterIndex, const char* dirDefault)
{
// Show the file selection dialog.
// returns 0 on cancel, 1 otherwise
***************
*** 161,172 ****
fileFilter = filterList[0];
}
// Fill this in dynamically so we can have dynamic heap array
FileSelectDialog[FileListIndex].itemList = (void *)fileList;
FileSelectDialog[DirListIndex].itemList = (void *)dirList;
! GetDirList(".", fileFilter, fileList, maxFiles, dirList, maxDirs);
dirSel = // No file selected
curSel = -1; // No file selected
--- 161,191 ----
fileFilter = filterList[0];
}
+
+ // Note: this SetString won't work on Windows...
+
+ // check for supplied default directory
+ if ( dirDefault == NULL)
+ {
+ if (getcwd(temp,maxFileLen-1)) // get the current directory
+ SetString(fsCD,temp);
+ strcpy(curDir,temp); // preload input with name
+ }
+ else
+ {
+ char* dirtmp = new char[strlen(dirDefault)+2];
+ strcpy(dirtmp,dirDefault); // make local non-const copy of dir path
+ SetString(fsCD,dirtmp); // use the supplied directory path
+ strcpy(curDir,dirDefault);
+ delete[] dirtmp;
+ }
+
// Fill this in dynamically so we can have dynamic heap array
FileSelectDialog[FileListIndex].itemList = (void *)fileList;
FileSelectDialog[DirListIndex].itemList = (void *)dirList;
! GetDirList(curDir, fileFilter, fileList, maxFiles, dirList, maxDirs);
dirSel = // No file selected
curSel = -1; // No file selected
***************
*** 177,191 ****
_cmdsAdded = 1;
}
- // Read the current directory
-
- // Note: this SetString won't work on Windows...
-
- if (getcwd(temp,maxFileLen-1)) // get the current directory
- SetString(fsCD,temp);
-
- strcpy(curDir,temp); // preload input with name
-
if (*filename) // provided a base name
strcpy(origFile,filename);
--- 196,201 ----
***************
*** 214,222 ****
//======================>>> vFileSelect::FileSelect <<<=======================
int vFileSelect::FileSelectSave(const char* msg, char* filename,
! const int maxlen, char** filter, int& filterIndex)
{
! return FileSelect(msg, filename, maxlen, filter, filterIndex);
}
//====================>>> vFileSelect::DialogCommand <<<=======================
--- 224,232 ----
//======================>>> vFileSelect::FileSelect <<<=======================
int vFileSelect::FileSelectSave(const char* msg, char* filename,
! const int maxlen, char** filter, int& filterIndex, const char* dirDefault)
{
! return FileSelect(msg, filename, maxlen, filter, filterIndex, dirDefault);
}
//====================>>> vFileSelect::DialogCommand <<<=======================
Only in ../v/srcx/: vfilesel.cxx.orig
Only in ../v/srcx/: vfilesel.cxx.rej
Only in ../v/srcx/: vfilesel.cxx.rej.orig
Only in ../v/srcx/: vfilesel.cxx~
diff -c v/srcx/vtextinc.cxx ../v/srcx/vtextinc.cxx
*** v/srcx/vtextinc.cxx Fri Mar 6 18:38:25 1998
--- ../v/srcx/vtextinc.cxx Thu Apr 23 21:40:37 1998
***************
*** 270,274 ****
--- 270,276 ----
//@@@ This will interact with the Dialog to return if there
// was a default button.
SysDebug(Misc,"vTextInCmd::textReturn\n")
+
+ _parentWin->ProcessCmd(_cmdId, _retVal, C_TextIn);
}
Only in ../v/srcx/: vtextinc.cxx~
diff -c v/includex/v/vfilesel.h ../v/includex/v/vfilesel.h
*** v/includex/v/vfilesel.h Tue Mar 10 17:41:21 1998
--- ../v/includex/v/vfilesel.h Thu Apr 23 23:45:08 1998
***************
*** 28,36 ****
~vFileSelect() {}
int FileSelect(const char* msg, char* filename,
! const int maxlen, char** filter, int& filterIndex);
int FileSelectSave(const char* msg, char* filename,
! const int maxlen, char** filter, int& filterIndex);
protected: //--------------------------------------- protected
--- 28,36 ----
~vFileSelect() {}
int FileSelect(const char* msg, char* filename,
! const int maxlen, char** filter, int& filterIndex,const char* dirDefault = NULL);
int FileSelectSave(const char* msg, char* filename,
! const int maxlen, char** filter, int& filterIndex,const char* dirDefault = NULL);
protected: //--------------------------------------- protected
Only in ../v/includex/v/: vfilesel.h.orig
Only in ../v/includex/v/: vfilesel.h~
diff -c v/includex/v/vutil.h ../v/includex/v/vutil.h
*** v/includex/v/vutil.h Tue Mar 17 15:13:28 1998
--- ../v/includex/v/vutil.h Thu Apr 23 22:06:35 1998
***************
*** 8,16 ****
--- 8,21 ----
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
+ //
+ //
#ifndef VUTIL_H
#define VUTIL_H
+
+ #include<v/v_defs.h>
+
extern void LongToStr(long intg, char* str); // prototype
extern void IntToStr(int intg, char* str);
extern void vGetLocalTime(char* tm);
Only in ../v/includex/v/: vutil.h~