mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
re-activate already open shell/ntobj child windows instead of opening new windows
svn path=/trunk/; revision=7941
This commit is contained in:
parent
288705874e
commit
973445eeff
5 changed files with 26 additions and 5 deletions
|
@ -44,7 +44,9 @@
|
|||
|
||||
|
||||
#define PM_GET_FILEWND_PTR (WM_APP+0x05)
|
||||
#define PM_GET_CONTROLWINDOW (WM_APP+0x06)
|
||||
#define PM_GET_SHELLBROWSER_PTR (WM_APP+0x06)
|
||||
|
||||
#define PM_GET_CONTROLWINDOW (WM_APP+0x16)
|
||||
|
||||
#define PM_RESIZE_CHILDREN (WM_APP+0x17)
|
||||
#define PM_GET_WIDTH (WM_APP+0x18)
|
||||
|
|
|
@ -523,6 +523,9 @@ int MainFrame::Command(int id, int code)
|
|||
break;}
|
||||
|
||||
case ID_DRIVE_NTOBJ_NS: {
|
||||
if (activate_fs_window(TEXT("NTOBJ")))
|
||||
break;
|
||||
|
||||
#ifndef _NO_MDI
|
||||
FileChildWindow::create(_hmdiclient, NtObjChildWndInfo(TEXT("\\")));
|
||||
#else
|
||||
|
@ -533,10 +536,8 @@ int MainFrame::Command(int id, int code)
|
|||
case ID_DRIVE_DESKTOP: {
|
||||
TCHAR path[MAX_PATH];
|
||||
|
||||
/*TODO
|
||||
if (activate_fs_window(TEXT("Desktop")))
|
||||
break;
|
||||
*/
|
||||
|
||||
GetCurrentDirectory(MAX_PATH, path);
|
||||
|
||||
|
@ -769,6 +770,19 @@ bool MainFrame::activate_fs_window(LPCTSTR filesys)
|
|||
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
ShellBrowserChild* shell_child = (ShellBrowserChild*) SendMessage(child_wnd, PM_GET_SHELLBROWSER_PTR, 0, 0);
|
||||
|
||||
if (shell_child) {
|
||||
if (!lstrcmpi(shell_child->get_root()._fs, filesys)) {
|
||||
SendMessage(_hmdiclient, WM_MDIACTIVATE, (WPARAM)child_wnd, 0);
|
||||
|
||||
if (IsMinimized(child_wnd))
|
||||
ShowWindow(child_wnd, SW_SHOWNORMAL);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ void ShellBrowserChild::InitializeTree()
|
|||
_root._drive_type = DRIVE_UNKNOWN;
|
||||
lstrcpy(_root._volname, root_name); // most of the time "Desktop"
|
||||
_root._fs_flags = 0;
|
||||
lstrcpy(_root._fs, TEXT("Shell"));
|
||||
lstrcpy(_root._fs, TEXT("Desktop"));
|
||||
|
||||
//@@ _root._entry->read_tree(shell_info._root_shell_path.get_folder(), info._shell_path, SORT_NAME/*_sortOrder*/);
|
||||
|
||||
|
@ -406,6 +406,9 @@ LRESULT ShellBrowserChild::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
|||
case WM_GETISHELLBROWSER: // for Registry Explorer Plugin
|
||||
return (LRESULT)static_cast<IShellBrowser*>(this);
|
||||
|
||||
case PM_GET_SHELLBROWSER_PTR:
|
||||
return (LRESULT)this;
|
||||
|
||||
case PM_DISPATCH_COMMAND: {
|
||||
switch(LOWORD(wparam)) {
|
||||
case ID_WINDOW_NEW: {CONTEXT("ShellBrowserChild PM_DISPATCH_COMMAND ID_WINDOW_NEW");
|
||||
|
|
|
@ -101,6 +101,8 @@ struct ShellBrowserChild : public ChildWindow, public IShellBrowserImpl
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
const Root& get_root() const {return _root;}
|
||||
|
||||
protected:
|
||||
Root _root;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#define IDW_QUICKLAUNCHBAR 101
|
||||
|
||||
#define PM_REFRESH (WM_APP+0x16)
|
||||
#define PM_REFRESH (WM_APP+0x1B)
|
||||
|
||||
#define IDC_FIRST_QUICK_ID 0x4000
|
||||
|
||||
|
|
Loading…
Reference in a new issue