Changeset 1102 for trunk/dll/dircnrs.c
- Timestamp:
- Aug 2, 2008, 10:29:35 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r1084 r1102 46 46 20 Jul 08 GKY Add save/append filename to clipboard. 47 47 Change menu wording to make these easier to find 48 02 Aug 08 GKY Always pass temp variable point to treecnr UM_SHOWME to avoid 49 freeing dcd->directory early 48 50 49 51 ***********************************************************************/ … … 781 783 } 782 784 if (fSwitchTree && hwndTree) { 785 PSZ pszTempDir = xstrdup(dcd->directory, pszSrcFile, __LINE__); 786 783 787 if (hwndMain) { 784 if (TopWindow(hwndMain, (HWND) 0) == dcd->hwndFrame) 785 WinSendMsg(hwndTree, UM_SHOWME, MPFROMP(dcd->directory), MPVOID); 786 } 787 else 788 WinSendMsg(hwndTree, UM_SHOWME, MPFROMP(dcd->directory), MPVOID); 788 if (TopWindow(hwndMain, (HWND) 0) == dcd->hwndFrame && pszTempDir) 789 if (!WinSendMsg(hwndTree, UM_SHOWME, MPFROMP(pszTempDir), MPVOID)) 790 free(pszTempDir); 791 } 792 else { 793 if (pszTempDir) 794 if (!WinSendMsg(hwndTree, UM_SHOWME, MPFROMP(pszTempDir), MPVOID)) 795 free(pszTempDir); 796 } 789 797 } 790 798 dcd->firsttree = FALSE; … … 1334 1342 LastDir = hwnd; 1335 1343 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); 1336 if (fSwitchTreeOnFocus && hwndTree && dcd && *dcd->directory) 1337 WinSendMsg(hwndTree, UM_SHOWME, MPFROMP(dcd->directory), MPVOID); 1344 if (fSwitchTreeOnFocus && hwndTree && dcd && *dcd->directory) { 1345 PSZ pszTempDir = xstrdup(dcd->directory, pszSrcFile, __LINE__); 1346 1347 if (pszTempDir) { 1348 if (!WinSendMsg(hwndTree, UM_SHOWME, MPFROMP(pszTempDir), MPVOID)) 1349 free(pszTempDir); 1350 } 1351 } 1338 1352 } 1339 1353 break; … … 1843 1857 1844 1858 case IDM_FINDINTREE: 1845 if (hwndTree) 1846 WinSendMsg(hwndTree, UM_SHOWME, MPFROMP(dcd->directory), 1847 MPFROMLONG(1L)); 1859 if (hwndTree) { 1860 PSZ pszTempDir = xstrdup(dcd->directory, pszSrcFile, __LINE__); 1861 1862 if (pszTempDir) { 1863 if (!WinSendMsg(hwndTree, UM_SHOWME, MPFROMP(pszTempDir), 1864 MPFROMLONG(1L))) 1865 free(pszTempDir); 1866 } 1867 } 1848 1868 break; 1849 1869
Note:
See TracChangeset
for help on using the changeset viewer.