Changeset 1670 for trunk/dll/comp.c
- Timestamp:
- Aug 13, 2012, 3:33:25 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/comp.c
r1655 r1670 78 78 12 Jun 11 GKY Added SleepIfNeeded in the container fill loop 79 79 02 Jan 12 GKY Added pszFmtFileSize to container info to fix loss of file sizes on move and copy. 80 12 Aug 12 GKY Add ability to change and save PresParam 81 12 Aug 12 GKY Fix loading of a list file in the right compare container 82 12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs 80 83 81 84 ***********************************************************************/ … … 1689 1692 } // if have rightdir 1690 1693 fclose(fp); 1691 } 1694 } 1695 FillDirList(cmp->rightdir, lenr, cmp->includesubdirs, 1696 &filesr, &cmp->cmp->totalright, &numallocr); 1692 1697 } // if snapshot file 1693 1698 … … 2220 2225 SetCnrCols(GetHwndLeft(hwnd), TRUE); 2221 2226 SetCnrCols(GetHwndRight(hwnd), TRUE); 2227 if (cmp->listfile) { 2228 CHAR fullname[CCHMAXPATH]; 2229 2230 strcpy(fullname, PCSZ_STARDOTPMD); 2231 if (insert_filename(HWND_DESKTOP, fullname, TRUE, FALSE) && 2232 *fullname && !strchr(fullname, '*') && !strchr(fullname, '?')) 2233 strcpy(cmp->rightlist, fullname); 2234 } 2222 2235 WinSendMsg(hwnd, UM_SETUP, MPVOID, MPVOID); 2223 2236 WinSendMsg(hwnd, UM_SETDIR, MPVOID, MPVOID); 2224 2237 PostMsg(hwnd, UM_STRETCH, MPVOID, MPVOID); 2225 2238 { 2226 USHORT ids[] = { COMP_LEFTDIR, COMP_RIGHTDIR, COMP_TOTALLEFT, 2227 COMP_TOTALRIGHT, COMP_SELLEFT, COMP_SELRIGHT, 2228 0 2229 }; 2239 USHORT ids[] = {COMP_FRAME, COMP_LEFTDIR, COMP_RIGHTDIR, COMP_COLLECT, 2240 COMP_VIEW, COMP_NOTE, COMP_TOTALLEFT, COMP_SELLEFT, COMP_TOTALRIGHT, 2241 COMP_SELRIGHT, COMP_CNRMENU, COMP_DIRMENU, COMP_MENU, 2242 COMP_INCLUDESUBDIRS, COMP_SETDIRS, COMP_COPYLEFT, COMP_MOVELEFT, 2243 COMP_DELETELEFT, COMP_COPYRIGHT, COMP_MOVERIGHT, COMP_DELETERIGHT, 2244 COMP_TOTALLEFTHDR, COMP_SELLEFTHDR, COMP_TOTALRIGHTHDR, 2245 COMP_SELRIGHTHDR, COMP_FILTER, COMP_HIDENOTSELECTED, 0}; 2230 2246 UINT x; 2247 CHAR s[24]; 2248 2231 2249 for (x = 0; ids[x]; x++) { 2232 //fixme to allow user to change presparams 1-10-09 GKY 2233 SetPresParams(WinWindowFromID(hwnd, ids[x]), 2250 //fixme to allow user to change presparams 1-10-09 GKY 2251 sprintf(s, "CompDir%i", ids[x]); 2252 RestorePresParams(WinWindowFromID(hwnd, ids[x]), s); 2253 /*SetPresParams(WinWindowFromID(hwnd, ids[x]), 2234 2254 &RGBGREY, 2235 &RGBBLACK, &RGBBLACK, FNT_8HELVETICA); 2255 &RGBBLACK, &RGBBLACK, FNT_8HELVETICA);*/ 2236 2256 } 2237 2257 } … … 2680 2700 COMPARE *forthread; 2681 2701 CNRINFO cnri; 2702 if (cmp->includesubdirs) 2703 WinCheckButton(hwnd, COMP_INCLUDESUBDIRS, TRUE); 2682 2704 cmp->includesubdirs = WinQueryButtonCheckstate(hwnd, 2683 COMP_INCLUDESUBDIRS);2705 COMP_INCLUDESUBDIRS); 2684 2706 memset(&cnri, 0, sizeof(CNRINFO)); 2685 2707 cnri.cb = sizeof(CNRINFO); … … 2719 2741 WinSetDlgItemText(hwnd, COMP_NOTE, 2720 2742 (CHAR *) GetPString(IDS_COMPHOLDREADDISKTEXT)); 2721 SetButtonEnables(cmp, FALSE); 2743 SetButtonEnables(cmp, FALSE); 2744 cmp->includesubdirs = FALSE; 2722 2745 cmp->selleft = 0; 2723 2746 cmp->selright = 0; … … 3053 3076 wa.size = sizeof(wa); 3054 3077 strcpy(wa.szCurrentPath1, cmp->leftdir); 3055 strcpy(wa.szCurrentPath2, cmp->rightdir); 3078 strcpy(wa.szCurrentPath2, cmp->rightdir); 3079 wa.includesubdirs = WinQueryButtonCheckstate(hwnd, 3080 COMP_INCLUDESUBDIRS); 3056 3081 if (WinDlgBox(HWND_DESKTOP, 3057 3082 hwnd, … … 3063 3088 !IsFile(wa.szCurrentPath2)) { 3064 3089 strcpy(cmp->leftdir, wa.szCurrentPath1); 3065 strcpy(cmp->rightdir, wa.szCurrentPath2); 3066 *cmp->rightlist = 0; 3090 strcpy(cmp->rightdir, wa.szCurrentPath2); 3091 cmp->includesubdirs = wa.includesubdirs; 3092 if (!cmp->includesubdirs) 3093 WinCheckButton(hwnd, COMP_INCLUDESUBDIRS, FALSE); 3094 cmp->listfile = wa.listfile; 3095 if (cmp->listfile) { 3096 CHAR fullname[CCHMAXPATH]; 3097 3098 strcpy(fullname, PCSZ_STARDOTPMD); 3099 if (insert_filename(HWND_DESKTOP, fullname, TRUE, FALSE) && 3100 *fullname && !strchr(fullname, '*') && !strchr(fullname, '?')) 3101 strcpy(cmp->rightlist, fullname); 3102 } 3103 else 3104 *cmp->rightlist = 0; 3067 3105 PostMsg(hwnd, UM_SETUP, MPVOID, MPVOID); 3068 3106 PostMsg(hwnd, UM_SETDIR, MPVOID, MPVOID); … … 3127 3165 SWP swp; 3128 3166 ULONG size = sizeof(SWP); 3129 3167 USHORT ids[] = {COMP_FRAME, COMP_LEFTDIR, COMP_RIGHTDIR, COMP_COLLECT, 3168 COMP_VIEW, COMP_NOTE, COMP_TOTALLEFT, COMP_SELLEFT, COMP_TOTALRIGHT, 3169 COMP_SELRIGHT, COMP_CNRMENU, COMP_DIRMENU, COMP_MENU, 3170 COMP_INCLUDESUBDIRS, COMP_SETDIRS, COMP_COPYLEFT, COMP_MOVELEFT, 3171 COMP_DELETELEFT, COMP_COPYRIGHT, COMP_MOVERIGHT, COMP_DELETERIGHT, 3172 COMP_TOTALLEFTHDR, COMP_SELLEFTHDR, COMP_TOTALRIGHTHDR, 3173 COMP_SELRIGHTHDR, COMP_FILTER, COMP_HIDENOTSELECTED, 0}; 3174 UINT x; 3175 CHAR s[24]; 3130 3176 WinQueryWindowPos(hwnd, &swp); 3131 3177 PrfWriteProfileData(fmprof, FM3Str, "CompDir.Position", (PVOID) &swp, 3132 size); 3178 size); 3179 for (x = 0; ids[x]; x++) { 3180 //fixme to allow user to change presparams 1-10-09 GKY 3181 sprintf(s, "CompDir%i", ids[x]); 3182 SavePresParams(WinWindowFromID(hwnd, ids[x]), s); 3183 } 3133 3184 } 3134 3185 WinDismissDlg(hwnd, 0);
Note:
See TracChangeset
for help on using the changeset viewer.