diff --git a/reactos/subsys/system/explorer/doc/TODO.txt b/reactos/subsys/system/explorer/doc/TODO.txt index 286a87e1570..7b44bcdb71e 100644 --- a/reactos/subsys/system/explorer/doc/TODO.txt +++ b/reactos/subsys/system/explorer/doc/TODO.txt @@ -30,16 +30,12 @@ - Startmenu: You can't close the start menu with pressing Win-key You can open the start menu with pressing Win-key, but can't close with another hit of Win-key. -- Despite of settings, the clock's always shown I set my Win-Exp to hide the clock shown in - the taskbar, but the ROS-Exp ignores the setting and always shows the clock. +- > Despite of settings, the clock's always shown I set my Win-Explorer to hide the clock + > shown in the taskbar, but the ROS-Exp ignores the setting and always shows the clock. Yes, ROS explorer doesn't read many settings from the registry currently, as it doesn't have a way to configure them. (missing configuration dialogs) -- Wenn man in der Toolbar auf "NT Obj." klickt und dann mit der rechten - Maustaste in die TreeView klickt, gibt es eine COM Exeption "Falscher Parameter". - Wenn man das öfter macht crasht das Programm. - -- Es scheint ein paar GDI-Leaks in deinem Programm zu geben… +- Es scheint ein paar GDI-Leaks in deinem Programm zu geben. Wenn man ein neues MDI Fenster öffnet und dann wieder schließt, werden - einige GDI-Objekte nicht wieder gelöscht… + einige GDI-Objekte nicht wieder gelöscht. diff --git a/reactos/subsys/system/explorer/shell/entries.cpp b/reactos/subsys/system/explorer/shell/entries.cpp index 94f927c5887..add7c202914 100644 --- a/reactos/subsys/system/explorer/shell/entries.cpp +++ b/reactos/subsys/system/explorer/shell/entries.cpp @@ -315,19 +315,6 @@ void Entry::smart_scan(int scan_flags) } -ShellPath Entry::create_absolute_pidl() const -{ - CONTEXT("Entry::create_absolute_pidl()"); - - TCHAR path[MAX_PATH]; - - if (get_path(path)) - return ShellPath(path); - - return ShellPath(); -} - - void Entry::extract_icon() { TCHAR path[MAX_PATH]; diff --git a/reactos/subsys/system/explorer/shell/entries.h b/reactos/subsys/system/explorer/shell/entries.h index 92b0457f370..b55330a3d47 100644 --- a/reactos/subsys/system/explorer/shell/entries.h +++ b/reactos/subsys/system/explorer/shell/entries.h @@ -109,7 +109,7 @@ public: virtual const void* get_next_path_component(const void*) {return NULL;} virtual Entry* find_entry(const void*) {return NULL;} virtual bool get_path(PTSTR path) const = 0; - virtual ShellPath create_absolute_pidl() const; + virtual ShellPath create_absolute_pidl() const {return (LPCITEMIDLIST)NULL;} virtual HRESULT GetUIObjectOf(HWND hWnd, REFIID riid, LPVOID* ppvOut); virtual BOOL launch_entry(HWND hwnd, UINT nCmdShow=SW_SHOWNORMAL); }; diff --git a/reactos/subsys/system/explorer/shell/fatfs.cpp b/reactos/subsys/system/explorer/shell/fatfs.cpp index 75d9128b10b..a2c0b120bc6 100644 --- a/reactos/subsys/system/explorer/shell/fatfs.cpp +++ b/reactos/subsys/system/explorer/shell/fatfs.cpp @@ -293,6 +293,21 @@ bool FATEntry::get_path(PTSTR path) const return true; } +ShellPath FATEntry::create_absolute_pidl() const +{ + CONTEXT("WinEntry::create_absolute_pidl()"); + + return (LPCITEMIDLIST)NULL; +/* prepend root path if the drive is currently actually mounted in the file system -> return working PIDL + TCHAR path[MAX_PATH]; + + if (get_path(path)) + return ShellPath(path); + + return ShellPath(); +*/ +} + FATDirectory::FATDirectory(FATDrive& drive, LPCTSTR root_path) : FATEntry(), diff --git a/reactos/subsys/system/explorer/shell/fatfs.h b/reactos/subsys/system/explorer/shell/fatfs.h index cdc7125fced..ba6cfacbd98 100644 --- a/reactos/subsys/system/explorer/shell/fatfs.h +++ b/reactos/subsys/system/explorer/shell/fatfs.h @@ -35,6 +35,7 @@ protected: FATEntry() : Entry(ET_FAT) {} virtual bool get_path(PTSTR path) const; + virtual ShellPath create_absolute_pidl() const; DWORD _cluster; }; diff --git a/reactos/subsys/system/explorer/shell/filechild.cpp b/reactos/subsys/system/explorer/shell/filechild.cpp index eb0b572d9a2..c45dd0fdecc 100644 --- a/reactos/subsys/system/explorer/shell/filechild.cpp +++ b/reactos/subsys/system/explorer/shell/filechild.cpp @@ -501,22 +501,24 @@ LRESULT FileChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) ShellPath shell_path = entry->create_absolute_pidl(); LPCITEMIDLIST pidl_abs = shell_path; - IShellFolder* parentFolder; - LPCITEMIDLIST pidlLast; + if (pidl_abs) { + IShellFolder* parentFolder; + LPCITEMIDLIST pidlLast; - static DynamicFct SHBindToParent(TEXT("SHELL32"), "SHBindToParent"); + static DynamicFct SHBindToParent(TEXT("SHELL32"), "SHBindToParent"); - if (SHBindToParent) { - // get and use the parent folder to display correct context menu in all cases -> correct "Properties" dialog for directories, ... - if (SUCCEEDED((*SHBindToParent)(pidl_abs, IID_IShellFolder, (LPVOID*)&parentFolder, &pidlLast))) { - HRESULT hr = ShellFolderContextMenu(parentFolder, _hwnd, 1, &pidlLast, pos.x, pos.y); + if (SHBindToParent) { + // get and use the parent folder to display correct context menu in all cases -> correct "Properties" dialog for directories, ... + if (SUCCEEDED((*SHBindToParent)(pidl_abs, IID_IShellFolder, (LPVOID*)&parentFolder, &pidlLast))) { + HRESULT hr = ShellFolderContextMenu(parentFolder, _hwnd, 1, &pidlLast, pos.x, pos.y); - parentFolder->Release(); + parentFolder->Release(); - CHECKERROR(hr); + CHECKERROR(hr); + } + } else { + CHECKERROR(ShellFolderContextMenu(GetDesktopFolder(), _hwnd, 1, &pidl_abs, pos.x, pos.y)); } - } else { - CHECKERROR(ShellFolderContextMenu(GetDesktopFolder(), _hwnd, 1, &pidl_abs, pos.x, pos.y)); } } break;} diff --git a/reactos/subsys/system/explorer/shell/winfs.cpp b/reactos/subsys/system/explorer/shell/winfs.cpp index 7a13156fa64..e30ad5e1318 100644 --- a/reactos/subsys/system/explorer/shell/winfs.cpp +++ b/reactos/subsys/system/explorer/shell/winfs.cpp @@ -280,3 +280,15 @@ bool WinEntry::get_path(PTSTR path) const return true; } + +ShellPath WinEntry::create_absolute_pidl() const +{ + CONTEXT("WinEntry::create_absolute_pidl()"); + + TCHAR path[MAX_PATH]; + + if (get_path(path)) + return ShellPath(path); + + return ShellPath(); +} diff --git a/reactos/subsys/system/explorer/shell/winfs.h b/reactos/subsys/system/explorer/shell/winfs.h index 8e371e8acf0..1a3b716d1c4 100644 --- a/reactos/subsys/system/explorer/shell/winfs.h +++ b/reactos/subsys/system/explorer/shell/winfs.h @@ -35,6 +35,7 @@ protected: WinEntry() : Entry(ET_WINDOWS) {} virtual bool get_path(PTSTR path) const; + virtual ShellPath create_absolute_pidl() const; };