Changeset 1400 for trunk/dll/notebook.c
- Timestamp:
- Mar 8, 2009, 6:50:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/notebook.c
r1398 r1400 47 47 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 48 48 07 Feb 09 GKY Move repeated strings to PCSZs. 49 08 Mar 09 GKY Additional strings move to PCSZs in init.c 50 08 Mar 09 GKY Add WriteDetailsSwitches and use LoadDetailsSwitches to replace in line code 49 51 50 52 ***********************************************************************/ … … 2338 2340 } 2339 2341 dsDirCnrDefault.detailslongname = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLNAMES); 2340 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLongname",2341 &dsDirCnrDefault.detailslongname, sizeof(BOOL));2342 2342 dsDirCnrDefault.detailssubject = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSUBJECT); 2343 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSubject", 2344 &dsDirCnrDefault.detailssubject, sizeof(BOOL)); 2345 dsDirCnrDefault.detailsea = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSUBJECT); 2346 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsEA", 2347 &dsDirCnrDefault.detailsea, sizeof(BOOL)); 2343 dsDirCnrDefault.detailsea = WinQueryButtonCheckstate(hwnd, CFG5_SHOWEAS); 2348 2344 dsDirCnrDefault.detailssize = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSIZE); 2349 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSize",2350 &dsDirCnrDefault.detailssize, sizeof(BOOL));2351 2345 dsDirCnrDefault.detailsicon = WinQueryButtonCheckstate(hwnd, CFG5_SHOWICON); 2352 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsIcon",2353 &dsDirCnrDefault.detailsicon, sizeof(BOOL));2354 2346 dsDirCnrDefault.detailslwdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWDATE); 2355 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWDate",2356 &dsDirCnrDefault.detailslwdate, sizeof(BOOL));2357 2347 dsDirCnrDefault.detailslwtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWTIME); 2358 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWTime",2359 &dsDirCnrDefault.detailslwtime, sizeof(BOOL));2360 2348 dsDirCnrDefault.detailsladate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLADATE); 2361 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLADate",2362 &dsDirCnrDefault.detailsladate, sizeof(BOOL));2363 2349 dsDirCnrDefault.detailslatime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLATIME); 2364 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLATime",2365 &dsDirCnrDefault.detailslatime, sizeof(BOOL));2366 2350 dsDirCnrDefault.detailscrdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRDATE); 2367 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRDate",2368 &dsDirCnrDefault.detailscrdate, sizeof(BOOL));2369 2351 dsDirCnrDefault.detailscrtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRTIME); 2370 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRTime",2371 &dsDirCnrDefault.detailscrtime, sizeof(BOOL));2372 2352 dsDirCnrDefault.detailsattr = WinQueryButtonCheckstate(hwnd, CFG5_SHOWATTR); 2373 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsAttr",2374 &dsDirCnrDefault.detailsattr, sizeof(BOOL));2375 2353 dsDirCnrDefault.fSubjectInLeftPane = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTINLEFTPANE); 2376 PrfWriteProfileData(fmprof, appname, "DirCnr.SubjectInLeftPane",2377 &dsDirCnrDefault.fSubjectInLeftPane, sizeof(BOOL));2378 2354 dsDirCnrDefault.fSubjectLengthMax = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTLENGTHMAX); 2379 PrfWriteProfileData(fmprof, appname, "DirCnr.SubjectLengthMax",2380 &dsDirCnrDefault.fSubjectLengthMax, sizeof(BOOL));2381 2355 *mask.prompt = 0; 2382 2356 PrfWriteProfileData(fmprof, appname, "DirFilter", &mask, sizeof(MASK)); … … 2392 2366 else 2393 2367 dsDirCnrDefault.SubjectDisplayWidth = 0; 2394 PrfWriteProfileData(fmprof, 2395 appname, "DirCnr.SubjectDisplayWidth", 2396 &dsDirCnrDefault.SubjectDisplayWidth, sizeof(ULONG)); 2397 } 2368 } 2369 WriteDetailsSwitches(PCSZ_DIRCNR, &dsDirCnrDefault); 2398 2370 break; 2399 2371 } … … 2629 2601 2630 2602 memset(&ds, 0, sizeof(ds)); 2631 LoadDetailsSwitches( "Collector", &ds);2603 LoadDetailsSwitches(PCSZ_COLLECTOR, &ds); 2632 2604 WinCheckButton(hwnd, CFG5_SHOWLNAMES, ds.detailslongname); 2633 2605 WinCheckButton(hwnd, CFG5_SHOWSUBJECT, ds.detailssubject); … … 2721 2693 memset(&ds, 0, sizeof(ds)); 2722 2694 ds.detailslongname = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLNAMES); 2723 PrfWriteProfileData(fmprof, appname, "Collector.DetailsLongname",2724 &ds.detailslongname, sizeof(BOOL));2725 2695 ds.detailssubject = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSUBJECT); 2726 PrfWriteProfileData(fmprof, appname, "Collector.DetailsSubject",2727 &ds.detailssubject, sizeof(BOOL));2728 2696 ds.detailsea = WinQueryButtonCheckstate(hwnd, CFG5_SHOWEAS); 2729 PrfWriteProfileData(fmprof, appname, "Collector.DetailsEA",2730 &ds.detailsea, sizeof(BOOL));2731 2697 ds.detailssize = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSIZE); 2732 PrfWriteProfileData(fmprof, appname, "Collector.DetailsSize",2733 &ds.detailssize, sizeof(BOOL));2734 2698 ds.detailsicon = WinQueryButtonCheckstate(hwnd, CFG5_SHOWICON); 2735 PrfWriteProfileData(fmprof, appname, "Collector.DetailsIcon",2736 &ds.detailsicon, sizeof(BOOL));2737 2699 ds.detailslwdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWDATE); 2738 PrfWriteProfileData(fmprof, appname, "Collector.DetailsLWDate",2739 &ds.detailslwdate, sizeof(BOOL));2740 2700 ds.detailslwtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWTIME); 2741 PrfWriteProfileData(fmprof, appname, "Collector.DetailsLWTime",2742 &ds.detailslwtime, sizeof(BOOL));2743 2701 ds.detailsladate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLADATE); 2744 PrfWriteProfileData(fmprof, appname, "Collector.DetailsLADate",2745 &ds.detailsladate, sizeof(BOOL));2746 2702 ds.detailslatime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLATIME); 2747 PrfWriteProfileData(fmprof, appname, "Collector.DetailsLATime",2748 &ds.detailslatime, sizeof(BOOL));2749 2703 ds.detailscrdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRDATE); 2750 PrfWriteProfileData(fmprof, appname, "Collector.DetailsCRDate",2751 &ds.detailscrdate, sizeof(BOOL));2752 2704 ds.detailscrtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRTIME); 2753 PrfWriteProfileData(fmprof, appname, "Collector.DetailsCRTime",2754 &ds.detailscrtime, sizeof(BOOL));2755 2705 ds.detailsattr = WinQueryButtonCheckstate(hwnd, CFG5_SHOWATTR); 2756 PrfWriteProfileData(fmprof, appname, "Collector.DetailsAttr",2757 &ds.detailsattr, sizeof(BOOL));2758 2706 ds.fSubjectInLeftPane = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTINLEFTPANE); 2759 PrfWriteProfileData(fmprof, appname, "Collector.SubjectInLeftPane",2760 &ds.fSubjectInLeftPane, sizeof(BOOL));2761 2707 ds.fSubjectLengthMax = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTLENGTHMAX); 2762 PrfWriteProfileData(fmprof, appname, "Collector.SubjectLengthMax",2763 &ds.fSubjectLengthMax, sizeof(BOOL));2764 2708 *mask.prompt = 0; 2765 2709 PrfWriteProfileData(fmprof, … … 2776 2720 else 2777 2721 ds.SubjectDisplayWidth = 0; 2778 PrfWriteProfileData(fmprof, 2779 appname, "Collector.SubjectDisplayWidth", 2780 &ds.SubjectDisplayWidth, sizeof(ULONG)); 2781 } 2722 } 2723 WriteDetailsSwitches(PCSZ_COLLECTOR, &ds); 2782 2724 } 2783 2725 break; … … 3094 3036 appname, 3095 3037 "Collector.Fontnamesize", 3096 FNT_8HELVETICA,3038 (PVOID) FNT_8HELVETICA, 3097 3039 strlen(FNT_8HELVETICA) + 1); 3098 3040 } … … 3151 3093 //fixme to allow user to change presparams 1-10-09 GKY 3152 3094 PrfWriteProfileData(fmprof, appname, "Collector.Fontnamesize", 3153 FNT_8HELVETICA,3095 (PVOID) FNT_8HELVETICA, 3154 3096 strlen(FNT_8HELVETICA) + 1); 3155 3097 } … … 3585 3527 } 3586 3528 // Save new details settings and refresh windows 3587 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLongname", 3588 &dsDirCnrDefault.detailslongname, sizeof(BOOL)); 3589 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSubject", 3590 &dsDirCnrDefault.detailssubject, sizeof(BOOL)); 3591 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsEA", 3592 &dsDirCnrDefault.detailsea, sizeof(BOOL)); 3593 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSize", 3594 &dsDirCnrDefault.detailssize, sizeof(BOOL)); 3595 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsIcon", 3596 &dsDirCnrDefault.detailsicon, sizeof(BOOL)); 3597 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWDate", 3598 &dsDirCnrDefault.detailslwdate, sizeof(BOOL)); 3599 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWTime", 3600 &dsDirCnrDefault.detailslwtime, sizeof(BOOL)); 3601 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLADate", 3602 &dsDirCnrDefault.detailsladate, sizeof(BOOL)); 3603 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLATime", 3604 &dsDirCnrDefault.detailslatime, sizeof(BOOL)); 3605 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRDate", 3606 &dsDirCnrDefault.detailscrdate, sizeof(BOOL)); 3607 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRTime", 3608 &dsDirCnrDefault.detailscrtime, sizeof(BOOL)); 3609 PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsAttr", 3610 &dsDirCnrDefault.detailsattr, sizeof(BOOL)); 3529 WriteDetailsSwitches(PCSZ_DIRCNR, &dsDirCnrDefault); 3611 3530 if (hwndMain) { 3612 3531 // Save state and restore to refresh windows with new settings
Note:
See TracChangeset
for help on using the changeset viewer.