mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[PowerRename] Fluent UX (#13678)
* PowerRename new UI * Add scrollviewer * Don't deploy PowerRenameUI_new * Visual updates * Visual updates * Updates * Update Resources.resw * Added docs button * Update MainWindow.xaml * Wire Docs button * RegEx -> regular expressions * Update Show only renamed list on search/replace text changed * Update Show only renamed list on search/replace text changed - proper fix Set searchTerm to NULL when cleared - fix Show only renamed files on clear searchTerm * Files/folders input error handling * Fix renaming with keeping UI window opened After renaming folder, all of it's children need path update. Without path update, further renaming of children items would fail. * Update only children, not all items with greater depth * Fix dictionary false positives * Remove .NET dep * Rename PowerRenameUI_new to PowerRenameUILib Rename executable PowerRenameUIHost to PowerRename Co-authored-by: Laute <Niels.Laute@philips.com>
This commit is contained in:
35
src/modules/powerrename/lib/MRUListHandler.h
Normal file
35
src/modules/powerrename/lib/MRUListHandler.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include "pch.h"
|
||||
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
#include <common/utils/json.h>
|
||||
|
||||
class MRUListHandler
|
||||
{
|
||||
public:
|
||||
MRUListHandler(unsigned int size, const std::wstring& filePath, const std::wstring& regPath);
|
||||
|
||||
void Push(const std::wstring& data);
|
||||
bool Next(std::wstring& data);
|
||||
|
||||
void Reset();
|
||||
|
||||
const std::vector<std::wstring>& GetItems();
|
||||
private:
|
||||
void Load();
|
||||
void Save();
|
||||
void MigrateFromRegistry();
|
||||
json::JsonArray Serialize();
|
||||
void ParseJson();
|
||||
|
||||
bool Exists(const std::wstring& data);
|
||||
|
||||
std::vector<std::wstring> items;
|
||||
unsigned int pushIdx;
|
||||
unsigned int nextIdx;
|
||||
unsigned int size;
|
||||
const std::wstring jsonFilePath;
|
||||
const std::wstring registryFilePath;
|
||||
};
|
||||
Reference in New Issue
Block a user