mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 05:06:36 +02:00
[PowerRename] Show UI info if item cannot be renamed (#19934)
* PowerRename cleanup * Extract ExplorerItem as a UserControl * Add VisualStateManager * UI fixes * Implement error UI logic Highlight items that couldn't be renamed and add error message flyout * Update src/modules/powerrename/lib/PowerRenameManager.cpp Address PR comment Co-authored-by: Jay <65828559+Jay-o-Way@users.noreply.github.com> * Update src/modules/powerrename/lib/PowerRenameManager.cpp Address PR comment Co-authored-by: Jay <65828559+Jay-o-Way@users.noreply.github.com> * Folder max path is 247 * Implement State() properly Co-authored-by: Niels Laute <niels.laute@live.nl> Co-authored-by: Jay <65828559+Jay-o-Way@users.noreply.github.com>
This commit is contained in:
@@ -29,6 +29,8 @@ public:
|
||||
IFACEMETHODIMP GetId(_Out_ int* id);
|
||||
IFACEMETHODIMP GetDepth(_Out_ UINT* depth);
|
||||
IFACEMETHODIMP PutDepth(_In_ int depth);
|
||||
IFACEMETHODIMP GetStatus(_Out_ PowerRenameItemRenameStatus* status);
|
||||
IFACEMETHODIMP PutStatus(_In_ PowerRenameItemRenameStatus status);
|
||||
IFACEMETHODIMP Reset();
|
||||
IFACEMETHODIMP ShouldRenameItem(_In_ DWORD flags, _Out_ bool* shouldRename);
|
||||
IFACEMETHODIMP IsItemVisible(_In_ DWORD filter, _In_ DWORD flags, _Out_ bool* isItemVisible);
|
||||
@@ -49,18 +51,18 @@ protected:
|
||||
|
||||
HRESULT _Init(_In_ IShellItem* psi);
|
||||
|
||||
bool m_selected = true;
|
||||
bool m_isFolder = false;
|
||||
bool m_isTimeParsed = false;
|
||||
bool m_canRename = true;
|
||||
int m_id = -1;
|
||||
int m_iconIndex = -1;
|
||||
UINT m_depth = 0;
|
||||
HRESULT m_error = S_OK;
|
||||
PWSTR m_path = nullptr;
|
||||
PWSTR m_originalName = nullptr;
|
||||
PWSTR m_newName = nullptr;
|
||||
SYSTEMTIME m_time = {0};
|
||||
CSRWLock m_lock;
|
||||
long m_refCount = 0;
|
||||
bool m_selected = true;
|
||||
bool m_isFolder = false;
|
||||
bool m_isTimeParsed = false;
|
||||
bool m_canRename = true;
|
||||
int m_id = -1;
|
||||
int m_iconIndex = -1;
|
||||
UINT m_depth = 0;
|
||||
PowerRenameItemRenameStatus m_status = PowerRenameItemRenameStatus::Init;
|
||||
PWSTR m_path = nullptr;
|
||||
PWSTR m_originalName = nullptr;
|
||||
PWSTR m_newName = nullptr;
|
||||
SYSTEMTIME m_time = {0};
|
||||
CSRWLock m_lock;
|
||||
long m_refCount = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user