Added small feature in the file dialog.

This commit is contained in:
Francois Boisvert 1999-09-19 18:27:05 +00:00 committed by Alexandre Julliard
parent 311e456a64
commit be1cee7244
3 changed files with 22 additions and 13 deletions

View File

@ -1640,8 +1640,9 @@ static BOOL FILEDLG95_LOOKIN_OnCommand(HWND hwnd, WORD wNotifyCode)
iItem = CBGetCurSel(fodInfos->DlgInfos.hwndLookInCB);
tmpFolder = (LPSFOLDER) CBGetItemDataPtr(fodInfos->DlgInfos.hwndLookInCB,
iItem);
if(!(tmpFolder = (LPSFOLDER) CBGetItemDataPtr(fodInfos->DlgInfos.hwndLookInCB,
iItem)))
return FALSE;
if(SUCCEEDED(IShellBrowser_BrowseObject(fodInfos->Shell.FOIShellBrowser,
@ -1929,16 +1930,16 @@ IShellFolder *GetShellFolderFromPidl(LPITEMIDLIST pidlAbs)
psf = psfParent;
if(pidlAbs && pidlAbs->mkid.cb)
{
if(FAILED(IShellFolder_BindToObject(psfParent, pidlAbs, NULL, &IID_IShellFolder, (LPVOID*)&psf)))
if(SUCCEEDED(IShellFolder_BindToObject(psfParent, pidlAbs, NULL, &IID_IShellFolder, (LPVOID*)&psf)))
{
psf = NULL;
IShellFolder_Release(psfParent);
return psf;
}
}
IShellFolder_Release(psfParent);
/* return the desktop */
return psfParent;
}
return psf;
return NULL;
}
/***********************************************************************
@ -1954,9 +1955,8 @@ LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl)
pidlParent = COMDLG32_PIDL_ILClone(pidl);
COMDLG32_PIDL_ILRemoveLastID(pidlParent);
return pidlParent;
}
/***********************************************************************

View File

@ -306,6 +306,15 @@ HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
if(!psfTmp)
return E_FAIL;
/* If the pidl to browse to is equal to the actual pidl ...
do nothing and pretend you did it*/
if(COMDLG32_PIDL_ILIsEqual(pidlTmp,fodInfos->ShellInfos.pidlAbsCurrent))
{
IShellFolder_Release(psfTmp);
COMDLG32_SHFree(pidlTmp);
return NOERROR;
}
/* Release the current fodInfos->Shell.FOIShellFolder and update its value */
IShellFolder_Release(fodInfos->Shell.FOIShellFolder);
fodInfos->Shell.FOIShellFolder = psfTmp;

View File

@ -59,7 +59,7 @@ BEGIN
MENUITEM "New &Link", 0x7052
MENUITEM SEPARATOR
END
MENUITEM "Propertys", FCIDM_SHVIEW_PROPERTIES
MENUITEM "Properties", FCIDM_SHVIEW_PROPERTIES
END
END
@ -74,7 +74,7 @@ BEGIN
MENUITEM "&Delete", FCIDM_SHVIEW_DELETE
MENUITEM "&Rename", 0x7050
MENUITEM SEPARATOR
MENUITEM "&Propertys", FCIDM_SHVIEW_PROPERTIES
MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES
END
END
SHBRSFORFOLDER_MSGBOX DIALOG 15, 40, 128, 152
@ -98,7 +98,7 @@ STRINGTABLE DISCARDABLE
IDS_SHV_COLUMN1 "File"
IDS_SHV_COLUMN2 "Size"
IDS_SHV_COLUMN3 "Type"
IDS_SHV_COLUMN4 "Modifyed"
IDS_SHV_COLUMN4 "Modified"
IDS_SHV_COLUMN5 "Size" /* drive view */
IDS_SHV_COLUMN6 "Size avaiable" /* drive view */
}