fix SDI shell browser

svn path=/trunk/; revision=14464
This commit is contained in:
Martin Fuchs 2005-04-03 09:16:20 +00:00
parent 1e7d27e8c9
commit e56e6b57c7
5 changed files with 12 additions and 13 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright 2003, 2004 Martin Fuchs
* Copyright 2003, 2004, 2005 Martin Fuchs
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -1652,17 +1652,16 @@ void SDIMainFrame::jump_to(LPCTSTR path, int mode)
void SDIMainFrame::jump_to(LPCITEMIDLIST path, int mode)
{
/*@@todo
if (_shellBrowser.get() && (_shellpath_info._open_mode&~OWM_PIDL)==(mode&~OWM_PIDL)) {
ShellPath shell_path = path;
_shellBrowser->jump_to(shell_path);
_shellpath_info._shell_path = shell_path;
} else */{
} else {
_shellpath_info._open_mode = mode;
_shellpath_info._shell_path = path;
_shellpath_info._root_shell_path = DesktopFolderPath(); //@@
_shellpath_info._root_shell_path = SpecialFolderPath(CSIDL_DRIVES, _hwnd); //@@
update_shell_browser();
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2003, 2004 Martin Fuchs
* Copyright 2003, 2004, 2005 Martin Fuchs
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -71,7 +71,7 @@ LRESULT ShellBrowser::Init(HWND hWndFrame)
_hWndFrame = hWndFrame;
const String& root_name = GetDesktopFolder().get_name(_create_info._root_shell_path, SHGDN_FORPARSING);
const String& root_name = GetDesktopFolder().get_name(_create_info._root_shell_path, SHGDN_FORADDRESSBAR);
_root._drive_type = DRIVE_UNKNOWN;
lstrcpy(_root._volname, root_name);

View file

@ -1,5 +1,5 @@
/*
* Copyright 2003, 2004 Martin Fuchs
* Copyright 2003, 2004, 2005 Martin Fuchs
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -135,6 +135,9 @@ struct ShellBrowser : public IShellBrowserImpl
void UpdateFolderView(IShellFolder* folder);
HTREEITEM select_entry(HTREEITEM hitem, Entry* entry, bool expand=true);
// for SDIMainFrame
void jump_to(LPCITEMIDLIST pidl);
protected:
HWND _hwnd;
HWND _left_hwnd;
@ -158,9 +161,6 @@ protected:
void InitializeTree(HIMAGELIST himl);
bool InitDragDrop();
// for SDIMainFrame
void jump_to(LPCITEMIDLIST pidl);
};

View file

@ -1,5 +1,5 @@
/*
* Copyright 2003, 2004 Martin Fuchs
* Copyright 2003, 2004, 2005 Martin Fuchs
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -58,7 +58,7 @@ struct ShellDirectory : public ShellEntry, public Directory
{
CONTEXT("ShellDirectory::ShellDirectory()");
lstrcpy(_data.cFileName, root_folder.get_name(shell_path, SHGDN_FORPARSING));
lstrcpy(_data.cFileName, root_folder.get_name(shell_path, SHGDN_FORADDRESSBAR));
_data.dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY;
_shell_attribs = SFGAO_FOLDER;

View file

@ -1898,7 +1898,7 @@ int StartMenuHandler::Command(int id, int code)
break;
case IDC_DRIVES:
///@todo exclude removeable drives
///@todo exclude removable drives
CreateSubmenu(id, CSIDL_DRIVES, ResString(IDS_DRIVES));
break;