- Improve filebrowser a bit and add some FIXMEs to show what should be done later
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Tue, 11 Feb 2014 14:06:26 +0000 (14:06 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Tue, 11 Feb 2014 14:06:26 +0000 (14:06 +0000)
svn path=/branches/shell-experiments/; revision=62118

base/shell/filebrowser/filebrowser.c
base/shell/rshell/CDesktopBrowser.cpp
base/shell/rshell/CStartMenu.cpp

index ebede29..a3d5dc2 100644 (file)
@@ -37,7 +37,8 @@ int _tmain(int argc, _TCHAR* argv[])
         SHOpenNewFrame((LPITEMIDLIST)pidlDrives, NULL, 0, 0);
     }
 
         SHOpenNewFrame((LPITEMIDLIST)pidlDrives, NULL, 0, 0);
     }
 
-    Sleep(3000);
+    /* FIXME: we should wait a bit here and see if a window was created. If not we should exit this process */
+    ExitThread(0);
 
     return 0;
 }
 
     return 0;
 }
index 8bf2bdb..e43e617 100644 (file)
@@ -269,19 +269,9 @@ typedef HRESULT (WINAPI *SH_OPEN_NEW_FRAME)(LPITEMIDLIST pidl, IUnknown *paramC,
 
 HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT wFlags)
 {
 
 HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT wFlags)
 {
-    /* 
-     * We should use IShellWindows interface here in order to attempt to 
-     * find an open shell window that shows the requested pidl and activate it
-     */
-
-#if 0
-    HMODULE hBrowseui = LoadLibraryW(L"browseui.dll");
-    if (hBrowseui)
-    {
-        SH_OPEN_NEW_FRAME SHOpenNewFrame = (SH_OPEN_NEW_FRAME)GetProcAddress(hBrowseui, (LPCSTR)103);
-        return SHOpenNewFrame((LPITEMIDLIST)pidl, NULL, 0, 0);
-    }
-#endif
+    /* FIXME: Implement executing filebrowser.exe and somehow pass the pidl to it */
+
+    /* Returning failure here will make windows 7 and 8 to use the default file browser */
     return E_FAIL;
 }
 
     return E_FAIL;
 }
 
index fe97909..54a4618 100644 (file)
@@ -300,6 +300,9 @@ CStartMenu_Constructor(
     if (FAILED(hr))
         return NULL;
 
     if (FAILED(hr))
         return NULL;
 
+    /* FIXME: Use CLSID_MergedFolder class and IID_IAugmentedShellFolder2 interface here */
+    /* CLSID_MergedFolder 26fdc864-be88-46e7-9235-032d8ea5162e */
+    /* IID_IAugmentedShellFolder2 8db3b3f4-6cfe-11d1-8ae9-00c04fd918d0 */
     hr = SHGetFolderLocation(NULL, CSIDL_STARTMENU, 0, 0, &pidlStartMenu);
     hr = SHGetDesktopFolder(&shellFolder);
     hr = shellFolder->BindToObject(pidlStartMenu, NULL, IID_IShellFolder, (void**)&psfStartMenu);
     hr = SHGetFolderLocation(NULL, CSIDL_STARTMENU, 0, 0, &pidlStartMenu);
     hr = SHGetDesktopFolder(&shellFolder);
     hr = shellFolder->BindToObject(pidlStartMenu, NULL, IID_IShellFolder, (void**)&psfStartMenu);