Changeset 1128 for trunk/dll


Ignore:
Timestamp:
Aug 29, 2008, 4:03:23 PM (17 years ago)
Author:
John Small
Message:

Ticket 259: 1) Support save/restore of target dir with states (except FM2Shutdown)

2) Added separate toolbar setting for FM/2 Lite
3) Improved earlier changes for this ticket

Location:
trunk/dll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd.c

    r1125 r1128  
    6767  19 Jul 08 GKY Replace save_dir2(dir) with pFM2SaveDirectory
    6868  26 Aug 08 GKY Require unique ID plus text and help strings for all tools save toolbar on button delete
     69  27 Aug 08 JBS Ticket 259: Support saving/restoring toolbars with states
     70  29 Aug 08 JBS Ticket 259: Support saving/restoring target directories with states (except the shutdown state)
    6971
    7072***********************************************************************/
     
    28392841  sprintf(szPrefix, "%s.", pszStateName);
    28402842
    2841   sprintf(szKey, "%sToolbar", szPrefix);
    2842   PrfWriteProfileString(fmprof, FM3Str, szKey, lasttoolbar);
     2843  if (*lasttoolbar) {
     2844    sprintf(szKey, "%sToolbar", szPrefix);
     2845    PrfWriteProfileString(fmprof, FM3Str, szKey, lasttoolbar);
     2846  }
     2847
     2848  if (*targetdir && !fIsShutDownState) {
     2849    sprintf(szKey, "%sTargetDir", szPrefix);
     2850    PrfWriteProfileString(fmprof, FM3Str, szKey, targetdir);
     2851  }
    28432852
    28442853  henum = WinBeginEnumWindows(hwndClient);
     
    30783087    load_tools(NULL);
    30793088    PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID);
     3089  }
     3090  size = (ULONG)0;
     3091  sprintf(szKey, "%sTargetDir", szPrefix);
     3092  if (PrfQueryProfileSize(fmprof, FM3Str, szKey, &size) && size)
     3093  {
     3094    PrfQueryProfileData(fmprof, FM3Str, szKey, targetdir, &size);
     3095    PrfWriteProfileString(fmprof, FM3Str, "TargetDir", targetdir);
     3096    SetTargetDir(NULL, TRUE);
    30803097  }
    30813098  size = sizeof(SWP);
  • trunk/dll/mainwnd2.c

    r1125 r1128  
    2424  14 Feb 08 SHL Rework to support settings menu conditional cascade
    2525  29 Feb 08 GKY Use xfree where appropriate
     26  27 Aug 08 JBS Ticket 259: Support saving/restoring toolbars with states
    2627
    2728***********************************************************************/
     
    702703          strcpy(lasttoolbar,
    703704                 quicktool[SHORT1FROMMP(mp1) - IDM_QUICKTOOLSTART]);
    704           PrfWriteProfileString(fmprof, FM3Str, "LastToolbar", lasttoolbar);
     705//        PrfWriteProfileString(fmprof, FM3Str, "LastToolbar", lasttoolbar);
     706          PrfWriteProfileString(fmprof, appname, "LastToolbar", lasttoolbar);
    705707        }
    706708        PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID);
Note: See TracChangeset for help on using the changeset viewer.