diff --git a/reactos/base/shell/explorer/desktop/desktop.cpp b/reactos/base/shell/explorer/desktop/desktop.cpp index a3d0215e522..7b1eae12767 100644 --- a/reactos/base/shell/explorer/desktop/desktop.cpp +++ b/reactos/base/shell/explorer/desktop/desktop.cpp @@ -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 +} diff --git a/reactos/base/shell/explorer/desktop/desktop.h b/reactos/base/shell/explorer/desktop/desktop.h index 00e9dca75cb..7062b38d3f0 100644 --- a/reactos/base/shell/explorer/desktop/desktop.h +++ b/reactos/base/shell/explorer/desktop/desktop.h @@ -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; diff --git a/reactos/base/shell/explorer/explorer_intres.rc b/reactos/base/shell/explorer/explorer_intres.rc index 06be918683a..7747a95ebbb 100644 --- a/reactos/base/shell/explorer/explorer_intres.rc +++ b/reactos/base/shell/explorer/explorer_intres.rc @@ -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 diff --git a/reactos/base/shell/explorer/make_explorer.dsp b/reactos/base/shell/explorer/make_explorer.dsp index e8a8c402c66..ccab9f8cac7 100644 --- a/reactos/base/shell/explorer/make_explorer.dsp +++ b/reactos/base/shell/explorer/make_explorer.dsp @@ -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 diff --git a/reactos/base/shell/explorer/shell/entries.cpp b/reactos/base/shell/explorer/shell/entries.cpp index b3d3efb68b5..3811bfaca22 100644 --- a/reactos/base/shell/explorer/shell/entries.cpp +++ b/reactos/base/shell/explorer/shell/entries.cpp @@ -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); diff --git a/reactos/base/shell/explorer/shell/filechild.cpp b/reactos/base/shell/explorer/shell/filechild.cpp index 98a074a7fa5..87e280c331e 100644 --- a/reactos/base/shell/explorer/shell/filechild.cpp +++ b/reactos/base/shell/explorer/shell/filechild.cpp @@ -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; diff --git a/reactos/base/shell/explorer/shell/filechild.h b/reactos/base/shell/explorer/shell/filechild.h index a81ea0ddd0e..089db61e2f2 100644 --- a/reactos/base/shell/explorer/shell/filechild.h +++ b/reactos/base/shell/explorer/shell/filechild.h @@ -109,6 +109,8 @@ protected: void set_curdir(Entry* entry); void activate_entry(Pane* pane); + void refresh(); + protected: Root _root; Pane* _left; diff --git a/reactos/base/shell/explorer/shell/mainframe.cpp b/reactos/base/shell/explorer/shell/mainframe.cpp index f6e1c2429bd..1dd01916f6b 100644 --- a/reactos/base/shell/explorer/shell/mainframe.cpp +++ b/reactos/base/shell/explorer/shell/mainframe.cpp @@ -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: diff --git a/reactos/base/shell/explorer/shell/shellbrowser.cpp b/reactos/base/shell/explorer/shell/shellbrowser.cpp index 09904e2a745..e4ec34714ce 100644 --- a/reactos/base/shell/explorer/shell/shellbrowser.cpp +++ b/reactos/base/shell/explorer/shell/shellbrowser.cpp @@ -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::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; diff --git a/reactos/base/shell/explorer/shell/shellbrowser.h b/reactos/base/shell/explorer/shell/shellbrowser.h index 1de93693b6e..ecd03df1c5d 100644 --- a/reactos/base/shell/explorer/shell/shellbrowser.h +++ b/reactos/base/shell/explorer/shell/shellbrowser.h @@ -175,6 +175,8 @@ protected: map _image_map; int get_image_idx(int icon_id); + + void refresh(); }; diff --git a/reactos/base/shell/explorer/taskbar/desktopbar.cpp b/reactos/base/shell/explorer/taskbar/desktopbar.cpp index 9a475205b39..6392a0ae8aa 100644 --- a/reactos/base/shell/explorer/taskbar/desktopbar.cpp +++ b/reactos/base/shell/explorer/taskbar/desktopbar.cpp @@ -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; } } diff --git a/reactos/base/shell/explorer/taskbar/quicklaunch.cpp b/reactos/base/shell/explorer/taskbar/quicklaunch.cpp index 19acaa39569..b0666f33b70 100644 --- a/reactos/base/shell/explorer/taskbar/quicklaunch.cpp +++ b/reactos/base/shell/explorer/taskbar/quicklaunch.cpp @@ -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;} diff --git a/reactos/base/shell/explorer/taskbar/startmenu.cpp b/reactos/base/shell/explorer/taskbar/startmenu.cpp index 81466d086ef..15cb5387757 100644 --- a/reactos/base/shell/explorer/taskbar/startmenu.cpp +++ b/reactos/base/shell/explorer/taskbar/startmenu.cpp @@ -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 } } diff --git a/reactos/base/shell/explorer/wexplorer.dsw b/reactos/base/shell/explorer/wexplorer.dsw new file mode 100644 index 00000000000..6bc7f9a2bf9 --- /dev/null +++ b/reactos/base/shell/explorer/wexplorer.dsw @@ -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> +{{{ +}}} + +############################################################################### +