Changeset 961
- Timestamp:
- Feb 18, 2008, 8:25:13 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HISTORY
r956 r961 35 35 o Put hide/remove etc menu options on collector "view" menu (Gregg) 36 36 o Fix trap in seeall cause by pathname(s) that exceed maxpath (Gregg) 37 o Restore SaveDirCnrState internal state save logic - accidentally removed 38 o Move save shutdown state name to strings (IDS_SHUTDOWNSTATE, ShutdownState) 37 39 38 40 3.09 -
trunk/dll/fm3dll.str
r948 r961 740 740 FM/2: Tree filter 741 741 You have disabled the ability to select more than one object at a time in Directory Containers, the Collector and Archive Containers. If that's not what you intended, return to the Settings notebook's DirCnrs page and correct the mistake. 742 742 Spare 741 743 743 Viewers ~2 744 Default viewers and related controls continued 744 ShutdownState 745 745 FM/2: Default DirCnr filter 746 746 FM/2: Default Collector filter -
trunk/dll/fm3str.h
r953 r961 26 26 // Spares are named IDS_SPARE_### here 27 27 // Text in fm3dll.str will contain the notation Spare ### 28 // Last string reserved for cvs id 28 // Last string in fm3dll.str reserved for cvs id 29 // Set IDS_NUMSTRS to max value here plus 2 29 30 30 31 #define IDS_NUMSTRS 1009 … … 739 740 #define IDS_TREEFILTERTITLETEXT 739 740 741 #define IDS_SELECTTYPEERRORTEXT 740 741 #define IDS_ UNUSED1741742 #define IDS_SPARE_741 741 742 743 #define IDS_NOTEVIEWERS3TEXT 742 743 #define IDS_S PARE_743743744 #define IDS_SHUTDOWNSTATE 743 744 745 #define IDS_DEFDIRFILTERTITLETEXT 744 745 746 #define IDS_DEFCOLFILTERTITLETEXT 745 -
trunk/dll/mainwnd.c
r954 r961 1816 1816 } 1817 1817 /* fixme to be gone? 1818 1819 WinEnableMenuItem(hwndMenu, IDM_CLOSETRAY, FALSE);1820 1821 1818 if (!rdy || ~driveflags[iDrv] & DRIVE_CDROM) { 1819 WinEnableMenuItem(hwndMenu, IDM_CLOSETRAY, FALSE); 1820 } 1821 */ 1822 1822 PopupMenu(hwnd, hwnd, hwndMenu); 1823 1823 } … … 2773 2773 2774 2774 #define STATE_NAME_MAX_BYTES 256 2775 #define FM2_STATE_AT_CLOSE "LastClose"2776 2775 2777 2776 INT SaveDirCnrState(HWND hwndClient, PSZ pszStateName) … … 2797 2796 } 2798 2797 2799 fIsShutDownState = strcmp(pszStateName, FM2_STATE_AT_CLOSE) == 0;2798 fIsShutDownState = strcmp(pszStateName, GetPString(IDS_SHUTDOWNSTATE)) == 0; 2800 2799 sprintf(szPrefix, "%s.", pszStateName); 2801 2800 … … 2965 2964 DIRCNRDATA localdcd, *dcd; 2966 2965 BOOL fIsShutDownState; 2966 BOOL fDeleteState; 2967 2967 2968 2968 if (!pszStateName || !*pszStateName) { … … 2976 2976 2977 2977 sprintf(szPrefix, "%s.", pszStateName); 2978 fIsShutDownState = strcmp(pszStateName, FM2_STATE_AT_CLOSE) == 0; 2979 2978 2979 // If restoring shutdown state bypass no-prescan drives 2980 fIsShutDownState = strcmp(pszStateName, GetPString(IDS_SHUTDOWNSTATE)) == 0; 2981 // Delete saved state if restored saved state or internally saved state 2982 fDeleteState = fIsShutDownState || 2983 strcmp(pszStateName, GetPString(IDS_FM2TEMPTEXT)) == 0; 2980 2984 2981 2985 size = sizeof(SWP); … … 2990 2994 WinQueryWindowPos(WinQueryWindow(hwndClient, QW_PARENT), &swpO); 2991 2995 } 2992 // If restoring saved shutdown state , forget info2993 if (f IsShutDownState)2996 // If restoring saved shutdown state or internally saved state, forget info 2997 if (fDeleteState) 2994 2998 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 2995 2999 WinQueryWindowPos(WinQueryWindow(hwndClient, QW_PARENT), &swpN); … … 3001 3005 sprintf(szKey, "%sLastTreePos", szPrefix); 3002 3006 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) & swp, &size)) { 3003 if (f IsShutDownState)3007 if (fDeleteState) 3004 3008 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3005 3009 swp.hwnd = hwndTree; … … 3033 3037 if (PrfQueryProfileData(fmprof, 3034 3038 FM3Str, szKey, (PVOID) & numsaves, &size) && numsaves) { 3035 if (f IsShutDownState)3039 if (fDeleteState) 3036 3040 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3037 3041 for (x = 0; x < numsaves; x++) { … … 3039 3043 size = sizeof(SWP); 3040 3044 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &swp, &size)) { 3041 if (f IsShutDownState)3045 if (fDeleteState) 3042 3046 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3043 3047 sprintf(szKey, "%sDirCnrDir.%lu", szPrefix, x); 3044 3048 size = sizeof(szDir); 3045 3049 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) szDir, &size)) { 3046 // If drive marked no prescan, and restoring shutdown state3050 // If restoring shutdown state and drive marked no prescan 3047 3051 // bypass window restore 3048 3052 if (fIsShutDownState && … … 3051 3055 continue; 3052 3056 } 3053 if (f IsShutDownState)3057 if (fDeleteState) 3054 3058 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3055 3059 localdcd.detailslongname = detailslongname; // Set default … … 3063 3067 size == sizeof(BOOL)) 3064 3068 { 3065 if (f IsShutDownState)3069 if (fDeleteState) 3066 3070 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3067 3071 } … … 3076 3080 size == sizeof(BOOL)) 3077 3081 { 3078 if (f IsShutDownState)3082 if (fDeleteState) 3079 3083 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3080 3084 } … … 3089 3093 size == sizeof(BOOL)) 3090 3094 { 3091 if (f IsShutDownState)3095 if (fDeleteState) 3092 3096 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3093 3097 } … … 3102 3106 size == sizeof(BOOL)) 3103 3107 { 3104 if (f IsShutDownState)3108 if (fDeleteState) 3105 3109 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3106 3110 } … … 3115 3119 size == sizeof(BOOL)) 3116 3120 { 3117 if (f IsShutDownState)3121 if (fDeleteState) 3118 3122 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3119 3123 } … … 3128 3132 size == sizeof(BOOL)) 3129 3133 { 3130 if (f IsShutDownState)3134 if (fDeleteState) 3131 3135 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3132 3136 } … … 3140 3144 &size) && size == sizeof(BOOL)) 3141 3145 { 3142 if (f IsShutDownState)3146 if (fDeleteState) 3143 3147 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3144 3148 } … … 3153 3157 size == sizeof(BOOL)) 3154 3158 { 3155 if (f IsShutDownState)3159 if (fDeleteState) 3156 3160 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3157 3161 } … … 3166 3170 size == sizeof(BOOL)) 3167 3171 { 3168 if (f IsShutDownState)3172 if (fDeleteState) 3169 3173 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3170 3174 } … … 3179 3183 size == sizeof(BOOL)) 3180 3184 { 3181 if (f IsShutDownState)3185 if (fDeleteState) 3182 3186 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3183 3187 } … … 3192 3196 size == sizeof(BOOL)) 3193 3197 { 3194 if (f IsShutDownState)3198 if (fDeleteState) 3195 3199 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3196 3200 } … … 3205 3209 size == sizeof(BOOL)) 3206 3210 { 3207 if (f IsShutDownState)3211 if (fDeleteState) 3208 3212 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3209 3213 } … … 3242 3246 dcd->sortFlags = SORT_PATHNAME; 3243 3247 } 3244 if (f IsShutDownState)3248 if (fDeleteState) 3245 3249 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3246 3250 size = sizeof(MASK); … … 3255 3259 } 3256 3260 *(dcd->mask.prompt) = 0; 3257 if (f IsShutDownState)3261 if (fDeleteState) 3258 3262 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3259 3263 size = sizeof(ULONG); … … 3282 3286 } 3283 3287 } 3284 if (f IsShutDownState)3288 if (fDeleteState) 3285 3289 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3286 3290 if (!PostMsg(hwndCnr, UM_SETUP2, NULL, NULL)) … … 4553 4557 WinQueryWindowText(hwndStatelist, STATE_NAME_MAX_BYTES, szStateName); 4554 4558 bstrip(szStateName); 4555 // Ignore request if blank or attempting to using illegal name 4556 if (*szStateName && stricmp(szStateName, GetPString(IDS_STATETEXT))) { 4559 // Complain if attempting to use reserved name 4560 if (stricmp(szStateName, GetPString(IDS_STATETEXT)) == 0 || 4561 stricmp(szStateName, GetPString(IDS_FM2TEMPTEXT)) == 0 || 4562 stricmp(szStateName, GetPString(IDS_SHUTDOWNSTATE)) == 0) 4563 { 4564 saymsg(MB_ENTER | MB_ICONASTERISK, hwnd, 4565 GetPString(IDS_WARNINGTEXT), 4566 "\"%s\" is a reserved state name", szStateName); 4567 } 4568 // Ignore request if blank 4569 else if (*szStateName) { 4557 4570 if (SHORT1FROMMP(mp1) == IDM_SAVEDIRCNRSTATE) { 4558 4571 // Save … … 5661 5674 /* start remaining child windows */ 5662 5675 if (!fNoSaveState && fSaveState) 5663 PostMsg(MainObjectHwnd, UM_RESTORE, MPFROMP( FM2_STATE_AT_CLOSE), MPVOID);5676 PostMsg(MainObjectHwnd, UM_RESTORE, MPFROMP(GetPString(IDS_SHUTDOWNSTATE)), MPVOID); 5664 5677 PostMsg(MainObjectHwnd, UM_SETUP4, mp1, mp2); 5665 5678 return 0; … … 5805 5818 "MainWindowPos", WinQueryWindow(hwnd, QW_PARENT)); 5806 5819 if (!fNoSaveState && fSaveState) 5807 SaveDirCnrState(hwnd, FM2_STATE_AT_CLOSE);5820 SaveDirCnrState(hwnd, GetPString(IDS_SHUTDOWNSTATE)); 5808 5821 } 5809 5822 } … … 6264 6277 { 6265 6278 // Try to restore saved shutdown state 6266 char *pszDefaultStateName = xstrdup(FM2_STATE_AT_CLOSE, pszSrcFile, __LINE__); 6279 char *pszDefaultStateName = xstrdup(GetPString(IDS_SHUTDOWNSTATE), 6280 pszSrcFile, __LINE__); 6267 6281 if (pszDefaultStateName) { 6268 6282 if (!PostMsg(MainObjectHwnd, UM_RESTORE, MPFROMP(pszDefaultStateName), MPVOID)) -
trunk/dll/notebook.c
r959 r961 27 27 xx Jan 08 JBS Ticket 150: fix/improve save and restore of dir cnr state at FM/2 close/reopen 28 28 15 Feb 08 SHL Rework to support settings menu conditional cascade. Make more generic 29 16 Feb 08 SHL Restore SaveDirCnrState internal state save logic - accidentally removed 29 30 30 31 ***********************************************************************/ … … 1389 1390 &fUnHilite, sizeof(BOOL)); 1390 1391 { 1391 BOOL dummy= WinQueryButtonCheckstate(hwnd, CFGD_SYNCUPDATES);1392 1393 if ( dummy!= fSyncUpdates) {1394 fSyncUpdates = dummy;1392 BOOL fOldSyncUpdates = WinQueryButtonCheckstate(hwnd, CFGD_SYNCUPDATES); 1393 1394 if (fOldSyncUpdates != fSyncUpdates) { 1395 fSyncUpdates = fOldSyncUpdates; 1395 1396 if (hwndMain && !strcmp(realappname, FM3Str)) { 1397 // Save state and restore to refresh windows with new settings 1396 1398 if (SaveDirCnrState(hwndMain, GetPString(IDS_FM2TEMPTEXT)) > 0) { 1397 1399 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(2)); … … 1408 1410 GetPString(IDS_WARNINGTEXT), 1409 1411 GetPString(IDS_SELECTTYPEERRORTEXT)); 1410 break; 1412 break; // WM_CLOSE 1411 1413 } 1412 1414 return WinDefDlgProc(hwnd, msg, mp1, mp2); … … 2603 2605 swp.cx / 5, swp.cy, SWP_MOVE | SWP_SIZE); 2604 2606 } 2605 }2606 if (hwndMain) {2607 2607 if (MenuInvisible) 2608 2608 WinSendMsg(hwndMain, WM_COMMAND, … … 2921 2921 return 0; 2922 2922 } 2923 // Save new details settings and refresh windows 2923 2924 PrfWriteProfileData(fmprof, appname, "DetailsLongname", 2924 2925 &detailslongname, sizeof(BOOL)); … … 2946 2947 &detailsattr, sizeof(BOOL)); 2947 2948 if (hwndMain) { 2949 // Save state and restore to refresh windows with new settings 2948 2950 if (SaveDirCnrState(hwndMain, GetPString(IDS_FM2TEMPTEXT)) > 0) { 2951 // Tell window procedure to close container windows 2949 2952 PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(2)); 2953 // Restore saved state 2950 2954 PostMsg(hwndMain, UM_RESTORE, MPVOID, MPVOID); 2951 2955 } -
trunk/dll/seeall.c
r958 r961 1747 1747 } 1748 1748 1749 static VOID FilterAll(HWND hwnd, ALLDATA *ad); 1750 1749 1751 static VOID FilterList(HWND hwnd) 1750 1752 {
Note:
See TracChangeset
for help on using the changeset viewer.