Changeset 1455 for trunk/dll/mainwnd.c
- Timestamp:
- Sep 15, 2009, 4:43:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/mainwnd.c
r1454 r1455 85 85 19 Mar 09 GKY Moved DeletePresParams to presparam.c 86 86 28 Mar 09 GKY Add RemoveOldCnrSwitches to remove pre 3.16 style ini keys; 87 87 add State.version key for check 88 88 07 Jun 09 GKY Fix IDM_BLINK to not leave a DataBar? on the screen when fDataMin is TRUE. 89 89 21 Jun 09 GKY Added drive letter to bitmap buttons in drive bar; Eliminate static drive 90 90 letter windows; Use button ID to identify drive letter for processing. 91 91 12 Jul 09 GKY Removed duplicate UM_SETUP2 message from RestoreDirCnrState caused dbl dir 92 92 listings in tree 93 93 13 Jul 09 GKY Fixed under allocation of memory in the paint code for the drivebar bitmap buttons 94 94 22 Jul 09 GKY Drivebar enhancements add refresh removable, rescan all drives, drive button 95 96 97 95 loads drive root directory in directory container or expands drive tree 96 and rescans drive in tree container depending on container focus, greyed out 97 inappropriate menu context choices 98 98 22 Jul 09 GKY Code changes to use semaphores to serialize drive scanning 99 99 12 Sep 09 GKY Add FM3.INI User ini and system ini to submenu for view ini 100 14 Sep 09 SHL Blink thread LEDs when workers busy 100 101 101 102 ***********************************************************************/ … … 108 109 #define INCL_DOS 109 110 #define INCL_WIN 110 #define INCL_SHLERRORS 111 #define INCL_SHLERRORS // PMERR_NOT_IN_IDX 111 112 #define INCL_WINHELP 112 113 #define INCL_GPI … … 126 127 #include "comp.h" 127 128 #include "datamin.h" 128 #include "pathutil.h" 129 #include "errutil.h" 130 #include "strutil.h" 131 #include "notebook.h" 132 #include "command.h" 133 #include "avl.h" 134 #include "walkem.h" 135 #include "key.h" 136 #include "menu.h" 129 #include "pathutil.h" // BldQuotedFileName 130 #include "errutil.h" // Dos_Error... 131 #include "strutil.h" // GetPString 132 #include "notebook.h" // CfgDlgProc CfgMenuInit 133 #include "command.h" // LINKCMDS 134 #include "avl.h" // free_archivers 135 #include "walkem.h" // free_setups... 136 #include "key.h" // AboutDlgProc 137 #include "menu.h" // AddToMenu 137 138 #include "mainwnd.h" 138 #include "cmdline.h" 139 #include "common.h" 139 #include "cmdline.h" // CmdLine2DlgProc, save_cmdlines 140 #include "common.h" // CommonCreateMainChildren, CommonDriveCmd, CommonMainWndProc 140 141 // CommonTextButton 141 #include "notify.h" 142 #include "draglist.h" 142 #include "notify.h" // DoNotify, HideNote, ShowNote 143 #include "draglist.h" // DragOne 143 144 #include "chklist.h" // DropListProc 144 145 #include "avv.h" // EditArchiverDefinition … … 266 267 switch (id) { 267 268 case IDM_RESCAN: 268 269 269 strcpy(s, GetPString(IDS_RESCANALLDRIVESTEXT)); 270 break; 270 271 271 272 case IDM_REFRESHREMOVABLES: 272 273 273 strcpy(s, GetPString(IDS_REFRESHREMOVABLESTEXT)); 274 break; 274 275 275 276 default: 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 277 *dv = 0; 278 *dv = id - IDM_DRIVEA + 'A'; 279 strcpy(dv + 1, ":"); 280 d = toupper(*dv); 281 if (isalpha(d) && d > 'B' && 282 !(driveflags[d - 'A'] & (DRIVE_CDROM | DRIVE_INVALID | 283 DRIVE_SLOW)) && 284 (!hwndBubble || 285 WinQueryWindowULong(hwndBubble, QWL_USER) != hwndB) && 286 !WinQueryCapture(HWND_DESKTOP)) { 287 288 FSALLOCATE fsa; 289 CHAR szQty[38]; 290 ULONG ulPctFree; 291 ULONGLONG ullFreeQty; 292 293 if (!DosQueryFSInfo((d - 'A') + 1, 294 FSIL_ALLOC, &fsa, sizeof(FSALLOCATE))) { 295 ullFreeQty = (ULONGLONG) fsa.cUnitAvail * 296 (fsa.cSectorUnit * fsa.cbSector); 297 ulPctFree = (fsa.cUnit && fsa.cUnitAvail) ? 298 (fsa.cUnitAvail * 100) / fsa.cUnit : 0; 299 CommaFmtULL(szQty, sizeof(szQty), ullFreeQty, ' '); 300 sprintf(s, "%s %s (%lu%%) %s", dv, szQty, ulPctFree, GetPString(IDS_FREETEXT)); 301 } 302 } 302 303 } 303 304 if ((!hwndBubble || 304 305 306 305 WinQueryWindowULong(hwndBubble, QWL_USER) != hwndB) && 306 !WinQueryCapture(HWND_DESKTOP)) 307 WinSendMsg(hwndB, UM_SETUP6, MPFROMP(s), MPVOID); 307 308 } 308 309 return 0; … … 879 880 id = WinQueryWindowUShort(hwnd, QWS_ID); 880 881 if (id == CBID_EDIT && 881 882 WinQueryWindowUShort(WinQueryWindow(hwnd, QW_PARENT), QWS_ID) == 882 883 MAIN_USERLIST) { 883 884 … … 1213 1214 { 1214 1215 MRESULT mr = PFNWPStatic(hwnd, msg, mp1, mp2); 1215 HBITMAP hbmold = (HBITMAP) 0;1216 HPS hps = (HPS) 0;1217 1216 1218 1217 switch (WinQueryWindowUShort(hwnd, QWS_ID)) { 1219 1218 case MAIN_LED: 1220 hps = WinGetPS(hwnd); 1221 hbmold = (HBITMAP) WinSendMsg(hwnd, SM_QUERYHANDLE, MPVOID, MPVOID); 1222 if (!fBlueLED) { 1223 hbmLEDon = GpiLoadBitmap(hps, 0, LEDON_BMP, 12, 12); 1224 hbmLEDoff = GpiLoadBitmap(hps, 0, LEDOFF_BMP, 12, 12); 1225 } 1226 else { 1227 hbmLEDon = GpiLoadBitmap(hps, 0, LEDON2_BMP, 12, 12); 1228 hbmLEDoff = GpiLoadBitmap(hps, 0, LEDOFF2_BMP, 12, 12); 1229 } 1230 if (hbmLEDoff && hbmLEDon) 1231 WinSendMsg(hwnd, SM_SETHANDLE, MPFROMLONG(hbmLEDoff), MPVOID); 1232 else { 1233 if (hbmLEDoff) 1234 GpiDeleteBitmap(hbmLEDoff); 1235 if (hbmLEDon) 1236 GpiDeleteBitmap(hbmLEDon); 1237 } 1238 if (hbmold && 1239 hbmLEDon && 1240 hbmLEDoff && hbmold != hbmLEDon && hbmold != hbmLEDoff) 1241 GpiDeleteBitmap(hbmold); 1242 if (hps) 1243 WinReleasePS(hps); 1219 { 1220 HPS hps = WinGetPS(hwnd); 1221 HBITMAP hbmold = (HBITMAP)WinSendMsg(hwnd, SM_QUERYHANDLE, MPVOID, MPVOID); 1222 if (!fBlueLED) { 1223 hbmLEDon = GpiLoadBitmap(hps, 0, LEDON_BMP, 12, 12); 1224 hbmLEDoff = GpiLoadBitmap(hps, 0, LEDOFF_BMP, 12, 12); 1225 } 1226 else { 1227 hbmLEDon = GpiLoadBitmap(hps, 0, LEDON2_BMP, 12, 12); 1228 hbmLEDoff = GpiLoadBitmap(hps, 0, LEDOFF2_BMP, 12, 12); 1229 } 1230 if (hbmLEDoff && hbmLEDon) 1231 WinSendMsg(hwnd, SM_SETHANDLE, MPFROMLONG(hbmLEDoff), MPVOID); 1232 else { 1233 if (hbmLEDoff) 1234 GpiDeleteBitmap(hbmLEDoff); 1235 if (hbmLEDon) 1236 GpiDeleteBitmap(hbmLEDon); 1237 } 1238 if (hbmold && 1239 hbmLEDon && 1240 hbmLEDoff && hbmold != hbmLEDon && hbmold != hbmLEDoff) 1241 GpiDeleteBitmap(hbmold); 1242 if (hps) 1243 WinReleasePS(hps); 1244 } 1244 1245 break; 1245 1246 default: … … 1859 1860 case IDM_RESCAN: 1860 1861 { 1861 1862 1863 1864 1865 1866 1867 1868 1869 1862 BOOL toggleTree = FALSE; 1863 1864 if (!hwndTree) { 1865 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_VTREE, 0), MPVOID); 1866 toggleTree = TRUE; 1867 } 1868 WinSendMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 1869 if (toggleTree) 1870 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_VTREE, 0), MPVOID); 1870 1871 } 1871 1872 break; 1872 1873 case IDM_REFRESHREMOVABLES: 1873 1874 { 1874 1875 1876 1877 1878 1879 1880 1881 1882 1875 BOOL toggleTree = FALSE; 1876 1877 if (!hwndTree) { 1878 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_VTREE, 0), MPVOID); 1879 toggleTree = TRUE; 1880 } 1881 WinSendMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_REFRESHREMOVABLES, 0), MPVOID); 1882 if (toggleTree) 1883 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_VTREE, 0), MPVOID); 1883 1884 } 1884 1885 break; 1885 1886 default: 1886 1887 { 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1888 CHAR dv[4]; 1889 1890 *dv = SHORT1FROMMP(mp1) - IDM_DRIVEA + 'A'; 1891 strcpy(dv + 1, ":\\"); 1892 if (isalpha(*dv)) { 1893 1894 HWND hwndActive; 1895 1896 dv[1] = ':'; 1897 dv[2] = '\\'; 1898 dv[3] = 0; 1899 hwndActive = TopWindow(hwnd, (HWND) 0); 1900 if (hwndActive) 1901 WinSendMsg(WinWindowFromID(hwndActive, FID_CLIENT), 1902 UM_DRIVECMD, MPFROMP(dv), MPVOID); 1903 } 1903 1904 } 1904 1905 } … … 1932 1933 id = WinQueryWindowUShort(hwnd, QWS_ID); 1933 1934 if (helpid != id) { 1934 1935 helpid = id; 1935 1936 PostMsg(MainObjectHwnd, UM_SETUP6, MPFROMLONG((ULONG) hwnd), MPVOID); 1936 1937 } … … 1942 1943 case WM_PAINT: 1943 1944 { 1944 HPS hps; 1945 HPS hps; 1945 1946 POINTL aptl[4] = {0, 0, DRIVE_BUTTON_WIDTH - 1, DRIVE_BUTTON_HEIGHT - 1, 1946 1947 0, 0, DRIVE_BUTTON_WIDTH - 1, DRIVE_BUTTON_HEIGHT - 1}; … … 1955 1956 id = WinQueryWindowUShort(hwnd, QWS_ID); 1956 1957 if (id == IDM_REFRESHREMOVABLES || id == IDM_RESCAN) 1957 1958 break; 1958 1959 *szDrv = 0; 1959 1960 x = id - IDM_DRIVEA; … … 1965 1966 else 1966 1967 iconid = (driveflags[x] & DRIVE_REMOVABLE) ? 1967 1968 REMOVABLE_ICON : 1968 1969 (driveflags[x] & DRIVE_VIRTUAL) ? 1969 1970 VIRTUAL_ICON : 1970 1971 1971 (driveflags[x] & DRIVE_REMOTE) ? 1972 REMOTE_ICON : 1972 1973 (driveflags[x] & DRIVE_RAMDISK) ? 1973 1974 RAMDISK_ICON : 1974 1975 (driveflags[x] & DRIVE_ZIPSTREAM) ? 1975 1976 1977 1976 ZIPSTREAM_ICON : 1977 (driveflags[x] & DRIVE_LOCALHD) ? 1978 DRIVE_ICON : DONNO_ICON; 1978 1979 } 1979 1980 else 1980 1981 iconid = FLOPPY_ICON; 1981 1982 hps = WinBeginPaint(hwnd, (HPS) 0, NULL); 1982 1983 if (hps) { 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 1984 hbm = GpiLoadBitmap(hps, 0, iconid, 0, 0); 1985 if (hbm) { 1986 pbmpData = xmallocz(sizeof(PBITMAPINFOHEADER) * 3, pszSrcFile, __LINE__); 1987 if (pbmpData) { 1988 GpiQueryBitmapParameters(hbm, pbmpData); 1989 aptl[1].x = pbmpData->cx; 1990 aptl[1].y = pbmpData->cy; 1991 aptl[3].x = pbmpData->cx; 1992 aptl[3].y = pbmpData->cy; 1993 GpiWCBitBlt(hps, hbm, 4L, aptl, ROP_SRCCOPY, BBO_PAL_COLORS); 1994 free(pbmpData); 1995 } 1996 } 1997 memset(&fat, 0, sizeof(fat)); 1998 fat.usRecordLength = sizeof(FATTRS); 1999 fat.fsSelection = FATTR_SEL_BOLD ; 2000 fat.usCodePage = 850; 2001 fat.fsFontUse = FATTR_FONTUSE_NOMIX; 2002 strcpy(fat.szFacename , FNT_HELVETICA); 2003 x = GpiCreateLogFont(hps, NULL, DRIVEBAR_FONT_LCID, &fat); 2004 if (x != GPI_ERROR) { 2005 GpiSetCharSet(hps, DRIVEBAR_FONT_LCID); 2006 sizfCharBox.cx = MAKEFIXED(10,0); //Font size 2007 sizfCharBox.cy = MAKEFIXED(14,0); 2008 GpiSetCharBox( hps, &sizfCharBox ); 2009 GpiSetColor(hps, iconid == RAMDISK_ICON ? CLR_YELLOW : CLR_DARKBLUE); 2010 ptlStart.x = 1L; //Char box position 2011 ptlStart.y = 8L; 2012 GpiCharStringAt(hps, &ptlStart, strlen(szDrv), szDrv); 2013 GpiDeleteSetId(hps, DRIVEBAR_FONT_LCID); 2014 } 2015 WinEndPaint(hps); 2015 2016 } 2016 2017 } … … 2057 2058 UINT iDrv; 2058 2059 2059 2060 strcat(szDrv, PCSZ_BACKSLASH); 2060 2061 MakeValidDir(szDrv); 2061 2062 2063 2062 // Disable menus if MakeValidDir changes drive letter fixme this section doesn't do anything see treecnt.c 2063 local = ~driveflags[iDrv] & DRIVE_REMOTE && ~driveflags[iDrv] & DRIVE_VIRTUAL && 2064 ~driveflags[iDrv] & DRIVE_RAMDISK; 2064 2065 rdy = toupper(*szDrv) == toupper(chDrv); 2065 2066 iDrv = toupper(*szDrv) - 'A'; 2066 2067 if (!rdy || ~driveflags[iDrv] & DRIVE_REMOTE) 2067 2068 2069 2070 2068 WinEnableMenuItem(hwndMenu, IDM_DETACH, FALSE); 2069 2070 if (!rdy || driveflags[iDrv] & DRIVE_NOTWRITEABLE) 2071 WinEnableMenuItem(hwndMenu, IDM_MKDIR, FALSE); 2071 2072 2072 2073 if (!rdy || driveflags[iDrv] & DRIVE_NOTWRITEABLE || !local) { … … 2084 2085 WinEnableMenuItem(hwndMenu, IDM_ARCHIVE, FALSE); 2085 2086 WinEnableMenuItem(hwndMenu, IDM_SIZES, FALSE); 2086 2087 2088 2087 WinEnableMenuItem(hwndMenu, IDM_SHOWALLFILES, FALSE); 2088 2089 if (!rdy || !local) 2089 2090 WinEnableMenuItem(hwndMenu, IDM_CHKDSK, FALSE); 2090 2091 } … … 2333 2334 VOID BuildDriveBarButtons(HWND hwndT) 2334 2335 { 2335 register ULONG x; 2336 ULONG ulDriveNum, ulDriveMap; 2336 register ULONG x; 2337 ULONG ulDriveNum, ulDriveMap; 2337 2338 HENUM henum; 2338 2339 HWND hwndB; … … 2352 2353 WC_DRIVEBUTTONS, 2353 2354 0, 2354 2355 BS_NOPOINTERFOCUS | BS_USERBUTTON, 2355 2356 0, 2356 2357 0, … … 2360 2361 if (!hwndB) 2361 2362 Win_Error(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__, 2362 2363 2363 PCSZ_WINCREATEWINDOW); 2364 else { 2364 2365 WinSetWindowPos(hwndB, HWND_BOTTOM, 0, 0, 0, 0, SWP_ZORDER); 2365 2366 } … … 2367 2368 } // for 2368 2369 hwndB = WinCreateWindow(hwndT, 2369 2370 2371 2372 2373 2374 2375 2376 2370 WC_DRIVEBUTTONS, 2371 "#7001", 2372 BS_NOPOINTERFOCUS | BS_BITMAP | BS_PUSHBUTTON, 2373 0, 2374 0, 2375 DRIVE_BUTTON_WIDTH, 2376 DRIVE_BUTTON_HEIGHT, 2377 hwndT, HWND_TOP, IDM_REFRESHREMOVABLES, NULL, NULL); 2377 2378 if (!hwndB) 2378 2379 Win_Error(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__, 2379 2380 PCSZ_WINCREATEWINDOW); 2380 2381 hwndB = WinCreateWindow(hwndT, 2381 2382 2383 2384 2385 2386 2387 2388 2382 WC_DRIVEBUTTONS, 2383 "#7000", 2384 BS_NOPOINTERFOCUS | BS_BITMAP | BS_PUSHBUTTON, 2385 0, 2386 0, 2387 DRIVE_BUTTON_WIDTH, 2388 DRIVE_BUTTON_HEIGHT, 2389 hwndT, HWND_TOP, IDM_RESCAN, NULL, NULL); 2389 2390 if (!hwndB) 2390 2391 Win_Error(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__, … … 2415 2416 WinSetWindowPos(hwndB, 2416 2417 HWND_TOP, 2417 2418 ctrlxpos, ctrlypos, ctrlxsize, DRIVE_BUTTON_HEIGHT, SWP_MOVE | SWP_SHOW); 2418 2419 ctrlxpos += (ctrlxsize + 2); 2419 2420 if (ctrlxpos + (DRIVE_BUTTON_WIDTH + 2 + ((fShowTarget && DriveLines == 0) ? 2420 2421 256 : 0)) > xwidth) { 2421 2422 ctrlxpos = 1; 2422 2423 ctrlypos += DRIVE_BUTTON_HEIGHT; … … 2627 2628 hwnd, HWND_TOP, COMMAND_BUTTON, NULL, NULL); 2628 2629 if (!hwndB) 2629 2630 2630 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 2631 PCSZ_WINCREATEWINDOW); 2631 2632 hwndE = WinCreateWindow(hwnd, 2632 2633 WC_ENTRYFIELD, … … 2639 2640 hwnd, HWND_TOP, COMMAND_LINE, NULL, NULL); 2640 2641 if (!hwndE) 2641 2642 2642 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 2643 PCSZ_WINCREATEWINDOW); 2643 2644 if (!hwndE || !hwndB) { 2644 2645 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); … … 3077 3078 continue; 3078 3079 } 3079 3080 3081 3082 3083 3080 sprintf(szKeyBase, "%sDirCnr.%lu", szPrefix, numsaves); 3081 strcpy(szKey, szKeyBase); 3082 strcat(szKey, "."); 3083 eos = &szKey[strlen(szKey)]; 3084 strcpy(eos, "Pos"); 3084 3085 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & swp, 3085 3086 sizeof(SWP)); 3086 3087 dcd = WinQueryWindowPtr(WinWindowFromID(hwndC, DIR_CNR), QWL_USER); 3087 3088 3088 if (dcd) { 3089 strcpy(eos, "Sort"); 3089 3090 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->sortFlags, 3090 3091 3091 sizeof(INT)); 3092 strcpy(eos, "Filter"); 3092 3093 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->mask, 3093 3094 3094 sizeof(MASK)); 3095 strcpy(eos, "View"); 3095 3096 flWindowAttr = dcd->flWindowAttr; 3096 3097 if (!fLeaveTree && (flWindowAttr & CV_TREE)) { … … 3111 3112 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) &flWindowAttr, 3112 3113 sizeof(ULONG)); 3113 3114 WriteDetailsSwitches(szKeyBase, &dcd->ds, TRUE); 3114 3115 SavePresParams(hwndDir, szKeyBase); 3115 3116 3116 } 3117 strcpy(eos, "Dir"); 3117 3118 PrfWriteProfileString(fmprof, FM3Str, szKey, szDir); 3118 3119 numsaves++; 3119 3120 } 3120 3121 } … … 3132 3133 if (!size && fSaveState) { 3133 3134 for (ulTemp = 0; ulTemp < previous_numsaves; ulTemp++) 3134 3135 RemoveOldCnrSwitches(szPrefix, ulTemp); 3135 3136 sprintf(szKey, "%sVersion", szPrefix); 3136 3137 PrfWriteProfileString(fmprof, FM3Str, szKey, "3.16"); … … 3323 3324 if (fIsShutDownState && 3324 3325 driveflags[toupper(*szDir) - 'A'] & DRIVE_NOPRESCAN) { 3325 3326 3326 RemoveCnrSwitches(szKeyBase, NULL); 3327 RemoveOldCnrSwitches(szPrefix, x); 3327 3328 continue; 3328 3329 } 3329 3330 LoadDetailsSwitches(szKeyBase, &localdcd.ds, TRUE); 3330 3331 hwndDir = (HWND) WinSendMsg(hwndClient, 3331 3332 UM_SETDIR, … … 3364 3365 dcd->ds.detailslatime = localdcd.ds.detailslatime ; 3365 3366 dcd->ds.detailslwdate = localdcd.ds.detailslwdate ; 3366 3367 3367 dcd->ds.detailslwtime = localdcd.ds.detailslwtime ; 3368 strcpy(eos, "Sort"); 3368 3369 size = sizeof(INT); 3369 3370 if (PrfQueryProfileData(fmprof, … … 3375 3376 dcd->sortFlags = SORT_PATHNAME; 3376 3377 } 3377 3378 3378 size = sizeof(MASK); 3379 strcpy(eos, "Filter"); 3379 3380 if (PrfQueryProfileData(fmprof, 3380 3381 FM3Str, … … 3386 3387 } 3387 3388 *(dcd->mask.prompt) = 0; 3388 3389 strcpy(eos, "View"); 3389 3390 if (!noview) { 3390 3391 size = sizeof(ULONG); … … 3412 3413 } 3413 3414 if (!PostMsg(hwndCnr, UM_SETUP2, NULL, NULL)) 3414 WinSendMsg(hwndCnr, UM_SETUP2, NULL, NULL); 3415 WinSendMsg(hwndCnr, UM_SETUP2, NULL, NULL); 3415 3416 } 3416 3417 } … … 3435 3436 SWP_SIZE | SWP_SHOW | SWP_ZORDER | 3436 3437 SWP_ACTIVATE); 3437 3438 3439 3438 } 3439 if (fDeleteState) 3440 RemoveCnrSwitches(szKeyBase, pszStateName); 3440 3441 } 3441 3442 } … … 4748 4749 else { 4749 4750 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 4750 4751 4752 4753 4754 4755 4756 4751 for (x = 0; x < numsaves; x++) { 4752 sprintf(szKeyBase, "%s.DirCnr.%lu", szStateName, x); 4753 RemoveCnrSwitches(szKeyBase, szStateName); 4754 size = 0; 4755 sprintf(szKey, "%sVersion", szStateName); 4756 if (PrfQueryProfileSize(fmprof, FM3Str, szKey, &size) && size) 4757 RemoveOldCnrSwitches(szStateName, x); 4757 4758 } 4758 4759 } … … 4807 4808 4808 4809 if (fDataMin) { 4809 4810 4810 fDataMin = FALSE; 4811 changed = TRUE; 4811 4812 } 4812 4813 WinSetWindowPos(WinQueryWindow(hwnd, QW_PARENT), HWND_TOP, 0, 0, 0, 0, 4813 4814 SWP_MINIMIZE); 4814 4815 WinSetWindowPos(WinQueryWindow(hwnd, QW_PARENT), HWND_TOP, 0, 0, 0, 0, 4815 4816 SWP_RESTORE | SWP_ZORDER); 4816 4817 if (changed) 4817 4818 fDataMin = TRUE; 4818 4819 break; 4819 4820 } … … 5506 5507 hwnd, HWND_TOP, IDM_IDEALSIZE, NULL, NULL)) { 5507 5508 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5508 5509 PCSZ_WINCREATEWINDOW); 5509 5510 } 5510 5511 else { … … 5528 5529 if (!hwndTmp) 5529 5530 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5530 5531 PCSZ_WINCREATEWINDOW); 5531 5532 5532 5533 hwndTmp = WinCreateWindow(hwndFrame, … … 5541 5542 if (!hwndTmp) 5542 5543 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5543 5544 PCSZ_WINCREATEWINDOW); 5544 5545 5545 5546 hwndUserlist = WinCreateWindow(hwndFrame, … … 5561 5562 if (!hwndUserlist) 5562 5563 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5563 5564 PCSZ_WINCREATEWINDOW); 5564 5565 hwndCmdlist = WinCreateWindow(hwndFrame, 5565 5566 WC_COMBOBOX, … … 5580 5581 if (!hwndCmdlist) 5581 5582 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5582 5583 PCSZ_WINCREATEWINDOW); 5583 5584 WinSetWindowText(hwndCmdlist, GetPString(IDS_COMMANDSTEXT)); 5584 5585 hwndStatelist = WinCreateWindow(hwndFrame, … … 5600 5601 if (!hwndStatelist) 5601 5602 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5602 5603 PCSZ_WINCREATEWINDOW); 5603 5604 5604 5605 hwndDrivelist = WinCreateWindow(hwndFrame, … … 5619 5620 if (!hwndDrivelist) 5620 5621 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5621 5622 PCSZ_WINCREATEWINDOW); 5622 5623 //fixme to allow user to change presparams 1-10-09 GKY 5623 5624 SetPresParams(hwndDrivelist, … … 5639 5640 if (!hwndButtonlist) 5640 5641 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5641 5642 PCSZ_WINCREATEWINDOW); 5642 5643 WinSendMsg(WinWindowFromID(hwndUserlist, CBID_EDIT), 5643 5644 EM_SETTEXTLIMIT, MPFROM2SHORT(CCHMAXPATH, 0), MPVOID); … … 5822 5823 PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID); 5823 5824 if (fInitialDriveScan) { 5824 5825 5825 DosPostEventSem(hevInitialCnrScanComplete); 5826 DosCloseEventSem(hevInitialCnrScanComplete); 5826 5827 } 5827 5828 } … … 5898 5899 case UM_THREADUSE: 5899 5900 case UM_BUILDDRIVEBAR: 5901 case WM_TIMER: 5900 5902 return CommonMainWndProc(hwnd, msg, mp1, mp2); 5901 5903
Note:
See TracChangeset
for help on using the changeset viewer.