Explorer: fix refresh

svn path=/trunk/; revision=21187
This commit is contained in:
Martin Fuchs
2006-02-23 22:50:03 +00:00
parent 851a06cae5
commit 5b247bc560
14 changed files with 344 additions and 27 deletions
@@ -599,7 +599,10 @@ bool DesktopShellView::DoContextMenu(int x, int y)
selection->Release();
CHECKERROR(hr);
if (SUCCEEDED(hr))
refresh();
else
CHECKERROR(hr);
return true;
}
@@ -838,3 +841,9 @@ void DesktopShellView::PositionIcons(int dir)
ListView_SetItemPosition32(_hwndListView, it->second, pos.second, pos.first);
}
}
void DesktopShellView::refresh()
{
///@todo
}
@@ -184,6 +184,8 @@ protected:
HRESULT DoDesktopContextMenu(int x, int y);
void PositionIcons(int dir=1);
void refresh();
DesktopDropTarget* _pDropTarget;
HWND _hwndListView;
int _icon_algo;
@@ -51,9 +51,10 @@ IDB_SDI BITMAP MOVEABLE PURE "res/sdi.bmp"
IDA_EXPLORER ACCELERATORS MOVEABLE PURE
BEGIN
"X", ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT
"S", ID_VIEW_FULLSCREEN, VIRTKEY, SHIFT, CONTROL,
NOINVERT
VK_F5, ID_REFRESH, VIRTKEY, NOINVERT
"X", ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT
END
IDA_SEARCH_PROGRAM ACCELERATORS MOVEABLE PURE
@@ -191,10 +191,6 @@ SOURCE=.\Jamfile
# End Source File
# Begin Source File
SOURCE=.\Makefile
# End Source File
# Begin Source File
SOURCE=".\Makefile-MinGW"
# End Source File
# Begin Source File
@@ -143,7 +143,7 @@ void Entry::read_directory_base(SORT_ORDER sortOrder, int scan_flags)
read_directory(scan_flags);
#ifndef ROSSHELL
if (g_Globals._prescan_nodes) { //@todo _prescan_nodes should not be used for reading the start menu.
if (g_Globals._prescan_nodes) { ///@todo _prescan_nodes should not be used for reading the start menu.
for(Entry*entry=_down; entry; entry=entry->_next)
if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
entry->read_directory(scan_flags);
@@ -481,13 +481,7 @@ LRESULT FileChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
break;}
case ID_REFRESH: {CONTEXT("ID_REFRESH");
WaitCursor wait;
bool expanded = _left->_cur->_expanded;
scan_entry(_left->_cur);
if (expanded)
expand_entry(_left->_cur);
refresh();
break;}
case ID_ACTIVATE: {CONTEXT("ID_ACTIVATE");
@@ -519,7 +513,12 @@ LRESULT FileChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
if (idx != -1) {
Entry* entry = (Entry*) ListBox_GetItemData(*pane, idx);
CHECKERROR(entry->do_context_menu(_hwnd, pt_screen, _cm_ifs));
HRESULT hr = entry->do_context_menu(_hwnd, pt_screen, _cm_ifs);
if (SUCCEEDED(hr))
refresh();
else
CHECKERROR(hr);
}
break;}
@@ -531,6 +530,18 @@ LRESULT FileChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
}
void FileChildWindow::refresh()
{
WaitCursor wait;
bool expanded = _left->_cur->_expanded;
scan_entry(_left->_cur);
if (expanded)
expand_entry(_left->_cur);
}
int FileChildWindow::Command(int id, int code)
{
Pane* pane = GetFocus()==_left_hwnd? _left: _right;
@@ -109,6 +109,8 @@ protected:
void set_curdir(Entry* entry);
void activate_entry(Pane* pane);
void refresh();
protected:
Root _root;
Pane* _left;
@@ -1538,7 +1538,7 @@ LRESULT SDIMainFrame::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
else
_shellpath_info._root_shell_path = DesktopFolderPath(); //SpecialFolderPath(CSIDL_DRIVES, _hwnd);
jump_to(shell_path, wparam); //@todo content of 'path' not used any more
jump_to(shell_path, wparam); ///@todo content of 'path' not used any more
return TRUE;} // success
default: def:
@@ -256,8 +256,10 @@ void ShellBrowser::invalidate_cache()
(void)TreeView_SetImageList(_left_hwnd, _himl_old, TVSIL_NORMAL);
ImageList_Destroy(_himl);
_himl_old = TreeView_SetImageList(_left_hwnd, _himl, TVSIL_NORMAL);
_himl = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_MASK|ILC_COLOR24, 2, 0);
ImageList_SetBkColor(_himl, GetSysColor(COLOR_WINDOW));
_himl_old = TreeView_SetImageList(_left_hwnd, _himl, TVSIL_NORMAL);
for(map<int,int>::const_iterator it=_image_map.begin(); it!=_image_map.end(); ++it)
g_Globals._icon_cache.free_icon(it->first);
@@ -397,7 +399,12 @@ void ShellBrowser::OnTreeItemRClick(int idCtrl, LPNMHDR pnmh)
Entry* entry = (Entry*)itemData;
ClientToScreen(_left_hwnd, &tvhti.pt);
CHECKERROR(entry->do_context_menu(_hwnd, tvhti.pt, _cm_ifs));
HRESULT hr = entry->do_context_menu(_hwnd, tvhti.pt, _cm_ifs);
if (SUCCEEDED(hr))
refresh();
else
CHECKERROR(hr);
}
}
}
@@ -457,7 +464,7 @@ void ShellBrowser::UpdateFolderView(IShellFolder* folder)
HRESULT STDMETHODCALLTYPE ShellBrowser::MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (uMsg == SFVM_INITMENUPOPUP) {
//@todo never reached
///@todo never reached
InsertMenu((HMENU)lParam, 0, MF_BYPOSITION, 12345, TEXT("TEST ENTRY"));
return S_OK;
}
@@ -494,7 +501,7 @@ HRESULT ShellBrowser::OnDefaultCommand(LPIDA pida)
if (_last_sel && select_entry(_last_sel, entry))
return S_OK;
//@todo look for hidden or new subfolders and refresh/add new entry instead of opening a new window
///@todo look for hidden or new subfolders and refresh/add new entry instead of opening a new window
return E_NOTIMPL;
}
}
@@ -598,6 +605,12 @@ bool ShellBrowser::select_folder(Entry* entry, bool expand)
}
void ShellBrowser::refresh()
{
///@todo
}
#ifndef _NO_MDI
MDIShellBrowserChild::MDIShellBrowserChild(HWND hwnd, const ShellChildWndInfo& info)
@@ -648,7 +661,7 @@ LRESULT MDIShellBrowserChild::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
break;}
case ID_REFRESH:
//@todo refresh shell child
///@todo refresh shell child
_shellBrowser->invalidate_cache();
break;
@@ -175,6 +175,8 @@ protected:
map<int, int> _image_map;
int get_image_idx(int icon_id);
void refresh();
};
@@ -487,7 +487,7 @@ void DesktopBar::ControlResize(WPARAM wparam, LPARAM lparam)
///@todo write code for taskbar being at sides or top.
switch(wparam) {
case WMSZ_BOTTOM: //@todo Taskbar is at the top of the screen
case WMSZ_BOTTOM: ///@todo Taskbar is at the top of the screen
break;
case WMSZ_TOP: // Taskbar is at the bottom of the screen
@@ -498,10 +498,10 @@ void DesktopBar::ControlResize(WPARAM wparam, LPARAM lparam)
dragRect->top = screenHeight - 5;
break;
case WMSZ_RIGHT: //@todo Taskbar is at the left of the screen
case WMSZ_RIGHT: ///@todo Taskbar is at the left of the screen
break;
case WMSZ_LEFT: //@todo Taskbar is at the right of the screen
case WMSZ_LEFT: ///@todo Taskbar is at the right of the screen
break;
}
}
@@ -250,9 +250,14 @@ LRESULT QuickLaunchBar::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
entry = it->second._entry;
}
if (entry) // entry is NULL for desktop switch buttons
CHECKERROR(entry->do_context_menu(_hwnd, screen_pt, _cm_ifs));
else
if (entry) { // entry is NULL for desktop switch buttons
HRESULT hr = entry->do_context_menu(_hwnd, screen_pt, _cm_ifs);
if (SUCCEEDED(hr))
AddShortcuts(); //refresh();
else
CHECKERROR(hr);
} else
goto def;
break;}
@@ -495,6 +495,7 @@ LRESULT StartMenu::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
if (entry) {
CHECKERROR(entry->do_context_menu(_hwnd, screen_pt, _cm_ifs)); // may close start menu because of focus loss
///@todo refresh on successfull context menu execution?
break; ///@todo handle context menu for more than one entry
}
}
+275
View File
@@ -0,0 +1,275 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "create_links"=..\create_links\create_links.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name wshell32
End Project Dependency
}}}
###############################################################################
Project: "explorer"=.\explorer.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name wshell32
End Project Dependency
Begin Project Dependency
Project_Dep_Name comctl32
End Project Dependency
Begin Project Dependency
Project_Dep_Name wcomctl32
End Project Dependency
Begin Project Dependency
Project_Dep_Name notifyhook
End Project Dependency
}}}
###############################################################################
Project: "make_explorer"=.\make_explorer.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "mpr"="..\..\wine-msvc\dlls\mpr\mpr.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name wine
End Project Dependency
Begin Project Dependency
Project_Dep_Name wine_port
End Project Dependency
Begin Project Dependency
Project_Dep_Name wine_unicode
End Project Dependency
}}}
###############################################################################
Project: "notifyhook"=.\notifyhook\notifyhook.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "urlmon"="..\..\wine-msvc\dlls\urlmon\urlmon.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name wine
End Project Dependency
Begin Project Dependency
Project_Dep_Name wine_port
End Project Dependency
Begin Project Dependency
Project_Dep_Name uuid
End Project Dependency
Begin Project Dependency
Project_Dep_Name wine_unicode
End Project Dependency
Begin Project Dependency
Project_Dep_Name wcomctl32
End Project Dependency
Begin Project Dependency
Project_Dep_Name wininet
End Project Dependency
}}}
###############################################################################
Project: "uuid"="..\..\wine-msvc\libs\uuid\uuid.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "wcomctl32"="..\..\wine-msvc\dlls\comctl32\wcomctl32.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name wine
End Project Dependency
Begin Project Dependency
Project_Dep_Name wine_unicode
End Project Dependency
}}}
###############################################################################
Project: "wine"="..\..\wine-msvc\libs\wine\wine.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name wine_port
End Project Dependency
}}}
###############################################################################
Project: "wine_port"="..\..\wine-msvc\libs\port\wine_port.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "wine_unicode"="..\..\wine-msvc\libs\unicode\wine_unicode.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "wininet"="..\..\wine-msvc\dlls\wininet\wininet.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name wine
End Project Dependency
Begin Project Dependency
Project_Dep_Name wine_port
End Project Dependency
Begin Project Dependency
Project_Dep_Name wshell32
End Project Dependency
}}}
###############################################################################
Project: "wshdocvw"="..\..\wine-msvc\dlls\shdocvw\wshdocvw.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name wine
End Project Dependency
Begin Project Dependency
Project_Dep_Name wine_port
End Project Dependency
Begin Project Dependency
Project_Dep_Name wine_unicode
End Project Dependency
Begin Project Dependency
Project_Dep_Name uuid
End Project Dependency
Begin Project Dependency
Project_Dep_Name urlmon
End Project Dependency
}}}
###############################################################################
Project: "wshell32"="..\..\wine-msvc\dlls\shell32\wshell32.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name wine
End Project Dependency
Begin Project Dependency
Project_Dep_Name wine_port
End Project Dependency
Begin Project Dependency
Project_Dep_Name wine_unicode
End Project Dependency
Begin Project Dependency
Project_Dep_Name wcomctl32
End Project Dependency
Begin Project Dependency
Project_Dep_Name uuid
End Project Dependency
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################