mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-11 05:52:19 +02:00
Show progress dialog during startup (#9255)
* Show progress dialog during startup for selection enumeration that can take a long time. * Updated with better code organization and a timer to ensure the progress dialog does not appear in most cases. * Update based on PR feedback * Change progress dialog delay from 1500ms to 2500ms * Move progress dialog invocation off the main UI thread Co-authored-by: Chris Davis (EDGE) <chrdavis@microsoft.com>
This commit is contained in:
34
src/modules/powerrename/lib/PowerRenameEnum.h
Normal file
34
src/modules/powerrename/lib/PowerRenameEnum.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#include "pch.h"
|
||||
#include "PowerRenameInterfaces.h"
|
||||
#include <vector>
|
||||
#include "srwlock.h"
|
||||
|
||||
class CPowerRenameEnum :
|
||||
public IPowerRenameEnum
|
||||
{
|
||||
public:
|
||||
// IUnknown
|
||||
IFACEMETHODIMP QueryInterface(_In_ REFIID iid, _Outptr_ void** resultInterface);
|
||||
IFACEMETHODIMP_(ULONG) AddRef();
|
||||
IFACEMETHODIMP_(ULONG) Release();
|
||||
|
||||
// ISmartRenameEnum
|
||||
IFACEMETHODIMP Start();
|
||||
IFACEMETHODIMP Cancel();
|
||||
|
||||
public:
|
||||
static HRESULT s_CreateInstance(_In_ IUnknown* pdo, _In_ IPowerRenameManager* pManager, _In_ REFIID iid, _Outptr_ void** resultInterface);
|
||||
|
||||
protected:
|
||||
CPowerRenameEnum();
|
||||
virtual ~CPowerRenameEnum();
|
||||
|
||||
HRESULT _Init(_In_ IUnknown* pdo, _In_ IPowerRenameManager* pManager);
|
||||
HRESULT _ParseEnumItems(_In_ IEnumShellItems* pesi, _In_ int depth = 0);
|
||||
|
||||
CComPtr<IPowerRenameManager> m_spsrm;
|
||||
CComPtr<IUnknown> m_spdo;
|
||||
bool m_canceled = false;
|
||||
long m_refCount = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user