Changeset 907 for trunk/dll/dircnrs.c
- Timestamp:
- Jan 6, 2008, 8:26:17 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r888 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 16 Oct 02 SHL Handle large partitions … … 35 35 ***********************************************************************/ 36 36 37 #define INCL_DOS38 #define INCL_WIN39 #define INCL_GPI40 #define INCL_DOSERRORS41 #define INCL_LONGLONG42 43 #include <os2.h>44 #include <stdarg.h>45 #include <stdio.h>46 37 #include <stdlib.h> 47 38 #include <string.h> 48 39 #include <ctype.h> 49 40 #include <limits.h> 50 #include "fm3dll.h" 41 #include <process.h> // _beginthread 42 43 #define INCL_DOS 44 #define INCL_WIN 45 #define INCL_DOSERRORS 46 #define INCL_LONGLONG 47 51 48 #include "fm3dlg.h" 52 49 #include "fm3str.h" 53 50 #include "mle.h" 54 #include <process.h> // _beginthread 51 #include "arccnrs.h" // StartArcCnr 52 #include "comp.h" // COMPARE 53 #include "filldir.h" // EmptyCnr... 54 #include "errutil.h" // Dos_Error... 55 #include "strutil.h" // GetPString 56 #include "fm3dll.h" 55 57 56 58 #pragma data_seg(DATA1) … … 132 134 } 133 135 } 134 135 136 hwndButtonPopup = WinLoadMenu(HWND_DESKTOP, FM3ModHandle, id); 137 CopyPresParams(hwndButtonPopup, hwnd); 136 138 if (hwndButtonPopup) { 137 139 WinSetWindowUShort(hwndButtonPopup, QWS_ID, id); … … 596 598 li = 597 599 DoFileDrop(dcd->hwndCnr, dcd->directory, FALSE, MPVOID, 598 600 MPFROMP(&cni)); 599 601 CheckPmDrgLimit(cni.pDragInfo); 600 602 if (li) { … … 800 802 !strnicmp(dcd->directory, dcd->previous, 801 803 strlen(dcd->directory))) 802 804 { 803 805 PCNRITEM pci = FindCnrRecord(dcd->hwndCnr, 804 806 dcd->previous, 805 807 NULL, TRUE, FALSE, TRUE); 806 808 if (pci && (INT) pci != -1) { … … 1554 1556 switch (SHORT1FROMMP(mp1)) { 1555 1557 case IDM_FILESMENU: 1556 1557 1558 CopyPresParams((HWND) mp2, hwndMainMenu); 1559 if (isalpha(*dcd->directory)) { 1558 1560 if (driveflags[toupper(*dcd->directory) - 'A'] & DRIVE_NOTWRITEABLE) { 1559 1561 WinEnableMenuItem((HWND) mp2, IDM_MOVEMENU, FALSE); … … 1578 1580 WinEnableMenuItem((HWND) mp2, IDM_EDITTEXT, TRUE); 1579 1581 WinEnableMenuItem((HWND) mp2, IDM_EDITBINARY, TRUE); 1580 1582 WinEnableMenuItem((HWND) mp2, IDM_ATTRS, TRUE); 1581 1583 } 1582 1584 } … … 1584 1586 1585 1587 case IDM_VIEWSMENU: 1586 1588 SetViewMenu((HWND) mp2, dcd->flWindowAttr); 1587 1589 CopyPresParams((HWND) mp2, hwndMainMenu); 1588 1589 1590 1590 WinEnableMenuItem((HWND) mp2, IDM_RESELECT, 1591 (dcd->lastselection != NULL)); 1592 if (isalpha(*dcd->directory)) { 1591 1593 if (driveflags[toupper(*dcd->directory) - 'A'] & DRIVE_NOTWRITEABLE) 1592 1594 WinEnableMenuItem((HWND) mp2, IDM_MKDIR, FALSE); … … 1727 1729 dummy[1] = NULL; 1728 1730 ExecOnList(hwnd, 1729 1730 1731 editor, WINDOWED | SEPARATE, NULL, dummy, NULL, 1732 pszSrcFile, __LINE__); 1731 1733 } 1732 1734 else … … 2234 2236 case IDM_MKDIR: 2235 2237 { 2236 // PCNRITEM pci; 2237 2238 // pci = (PCNRITEM) CurrentRecord(hwnd); 2238 PCNRITEM pci; 2239 BOOL saved; 2240 2241 saved = fSelectedAlways; 2242 fSelectedAlways = FALSE; 2243 pci = (PCNRITEM)CurrentRecord(hwnd); 2244 // 01 Oct 07 SHL Make below selected directory or in current directory 2239 2245 PMMkDir(dcd->hwndParent, 2240 (dcd->directory), FALSE); 2246 pci && (INT)pci != -1 ? pci->pszFileName : dcd->directory, 2247 FALSE); 2248 fSelectedAlways = saved; 2241 2249 } 2242 2250 break; … … 2594 2602 memset(&volser, 0, sizeof(volser)); 2595 2603 DosError(FERR_DISABLEHARDERR); 2596 // fixme 2604 // fixme? 2597 2605 rc = DosQueryFSInfo(toupper(*pci->pszFileName) - '@', 2598 2606 FSIL_VOLSER, &volser, sizeof(volser)); … … 2609 2617 if (SHORT2FROMMP(mp1) == CN_COLLAPSETREE && 2610 2618 !volser.serial || 2611 2619 driveserial[toupper(*pci->pszFileName) - 'A'] != 2612 2620 volser.serial) 2613 2621 UnFlesh(hwnd, pci); … … 2647 2655 CM_SETRECORDEMPHASIS, 2648 2656 MPFROMP(pci), MPFROM2SHORT(TRUE, CRA_CURSORED)); 2649 2650 2657 MarkAll(hwnd, FALSE, FALSE, TRUE); 2658 if (pci->attrFile & FILE_DIRECTORY) 2651 2659 dcd->hwndLastMenu = CheckMenu(hwndMainMenu, &DirMenu, DIR_POPUP); 2652 2660 else … … 2732 2740 pci = (PCNRITEM) ((PCNRDRAGINFO) mp2)->pRecord; 2733 2741 pDInfo = ((PCNRDRAGINFO) mp2)->pDragInfo; 2734 2735 2736 2742 if (!DrgAccessDraginfo(pDInfo)) { 2743 Win_Error(HWND_DESKTOP, HWND_DESKTOP, pszSrcFile, __LINE__, 2744 "DrgAccessDraginfo"); 2737 2745 return (MRFROM2SHORT(DOR_NEVERDROP, 0)); 2738 2739 2746 } 2747 if (*dcd->directory && 2740 2748 (driveflags[toupper(*dcd->directory) - 'A'] & 2741 2749 DRIVE_NOTWRITEABLE)) { … … 2852 2860 ULONG action = UM_ACTION; 2853 2861 2854 2855 2856 2862 // DbgMsg(pszSrcFile, __LINE__, "calling DoFileDrop"); 2863 li = DoFileDrop(hwnd, dcd->directory, TRUE, mp1, mp2); 2864 CheckPmDrgLimit(((PCNRDRAGINFO)mp2)->pDragInfo); 2857 2865 if (li) { 2858 2866 if (li->list && li->list[0] && IsRoot(li->list[0])) … … 2888 2896 strcat(li->targetpath, " %a"); 2889 2897 ExecOnList(dcd->hwndParent, li->targetpath, 2890 2891 2898 PROMPT | WINDOWED, NULL, li->list, NULL, 2899 pszSrcFile, __LINE__); 2892 2900 FreeList(li->list); 2893 2901 li->list = NULL; … … 3263 3271 3264 3272 HWND ret = StartMLEEditor(dcd->hwndParent, 3265 3273 (INT)mp1, (CHAR *)mp2, dcd->hwndFrame); 3266 3274 if (mp2) 3267 3275 free((CHAR *)mp2);
Note:
See TracChangeset
for help on using the changeset viewer.