From ec66d1b6b90768af42c781514c27abb28b1584b3 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Mon, 12 Apr 2004 17:57:44 +0000 Subject: [PATCH] show waitcursor when switching to anotehr dir svn path=/trunk/; revision=9115 --- reactos/subsys/system/explorer/shell/entries.h | 2 +- reactos/subsys/system/explorer/shell/filechild.cpp | 10 ++++++---- reactos/subsys/system/explorer/shell/shellfs.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/reactos/subsys/system/explorer/shell/entries.h b/reactos/subsys/system/explorer/shell/entries.h index ed1b9aa8992..6754c40feeb 100644 --- a/reactos/subsys/system/explorer/shell/entries.h +++ b/reactos/subsys/system/explorer/shell/entries.h @@ -51,7 +51,7 @@ enum SCAN_FLAGS { SCAN_EXTRACT_ICONS = 1, SCAN_DO_ACCESS = 2, - SCAN_ALL = 3, + SCAN_ALL = 0,//@@3, SCAN_FILESYSTEM = 4 }; diff --git a/reactos/subsys/system/explorer/shell/filechild.cpp b/reactos/subsys/system/explorer/shell/filechild.cpp index 160bb50a8b2..7b928614b22 100644 --- a/reactos/subsys/system/explorer/shell/filechild.cpp +++ b/reactos/subsys/system/explorer/shell/filechild.cpp @@ -267,6 +267,8 @@ void FileChildWindow::set_curdir(Entry* entry) _right->_cur = entry; if (entry) { + WaitCursor wait; + if (!entry->_scanned) scan_entry(entry); else { @@ -467,6 +469,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); @@ -560,13 +563,15 @@ int FileChildWindow::Command(int id, int code) } -void FileChildWindow::activate_entry(Pane* pane) +void FileChildWindow::activate_entry(Pane* pane) ///@todo enable using key accelerator { Entry* entry = pane->_cur; if (!entry) return; + WaitCursor wait; + if ((entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || // a directory? entry->_down) // a file with NTFS sub-streams? { @@ -611,7 +616,6 @@ void FileChildWindow::scan_entry(Entry* entry) CONTEXT("FileChildWindow::scan_entry()"); int idx = ListBox_GetCurSel(_left_hwnd); - HCURSOR old_cursor = SetCursor(LoadCursor(0, IDC_WAIT)); // delete sub entries in left pane for(;;) { @@ -642,8 +646,6 @@ void FileChildWindow::scan_entry(Entry* entry) _right->set_header(); _header_wdths_ok = false; - - SetCursor(old_cursor); } diff --git a/reactos/subsys/system/explorer/shell/shellfs.h b/reactos/subsys/system/explorer/shell/shellfs.h index beae8c7d1e3..7bec8c27679 100644 --- a/reactos/subsys/system/explorer/shell/shellfs.h +++ b/reactos/subsys/system/explorer/shell/shellfs.h @@ -100,7 +100,7 @@ struct ShellDirectory : public ShellEntry, public Directory virtual void read_directory(int scan_flags=SCAN_ALL); virtual const void* get_next_path_component(const void*) const; - virtual Entry* find_entry(const void* p); + virtual Entry* find_entry(const void*); virtual bool get_path(PTSTR path) const;