mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
FileView: Tweaks and cosmetics.
This commit is contained in:
parent
c7071ebbf8
commit
7186f0988a
@ -89,8 +89,7 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
|
|||||||
|
|
||||||
for (auto iter : g_ParentMeasures)
|
for (auto iter : g_ParentMeasures)
|
||||||
{
|
{
|
||||||
if (_wcsicmp(iter->name, path.c_str()) == 0 &&
|
if (_wcsicmp(iter->name, path.c_str()) == 0 && iter->skin == skin)
|
||||||
iter->skin == skin)
|
|
||||||
{
|
{
|
||||||
child->parent = iter;
|
child->parent = iter;
|
||||||
break;
|
break;
|
||||||
@ -687,6 +686,9 @@ unsigned __stdcall SystemThreadProc(void* pParam)
|
|||||||
{
|
{
|
||||||
EnterCriticalSection(&g_CriticalSection);
|
EnterCriticalSection(&g_CriticalSection);
|
||||||
parent->files.clear();
|
parent->files.clear();
|
||||||
|
parent->fileCount = 0;
|
||||||
|
parent->folderCount = 0;
|
||||||
|
parent->folderSize = 0;
|
||||||
LeaveCriticalSection(&g_CriticalSection);
|
LeaveCriticalSection(&g_CriticalSection);
|
||||||
|
|
||||||
tmp->files.clear();
|
tmp->files.clear();
|
||||||
@ -729,21 +731,18 @@ unsigned __stdcall SystemThreadProc(void* pParam)
|
|||||||
RecursiveType rType = tmp->recursiveType;
|
RecursiveType rType = tmp->recursiveType;
|
||||||
GetFolderInfo(folderQueue, folder, tmp, (rType == RECURSIVE_PARTIAL) ? RECURSIVE_NONE : rType);
|
GetFolderInfo(folderQueue, folder, tmp, (rType == RECURSIVE_PARTIAL) ? RECURSIVE_NONE : rType);
|
||||||
|
|
||||||
if (rType != RECURSIVE_NONE)
|
while (rType != RECURSIVE_NONE && !folderQueue.empty())
|
||||||
{
|
|
||||||
while (!folderQueue.empty())
|
|
||||||
{
|
{
|
||||||
folder = folderQueue.front();
|
folder = folderQueue.front();
|
||||||
GetFolderInfo(folderQueue, folder, tmp, rType);
|
GetFolderInfo(folderQueue, folder, tmp, rType);
|
||||||
folderQueue.pop();
|
folderQueue.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Sort
|
// Sort
|
||||||
const int sortAsc = tmp->sortAscending ? 1 : -1;
|
const int sortAsc = tmp->sortAscending ? 1 : -1;
|
||||||
auto begin = ((tmp->path != L"" || !tmp->path.empty()) && (tmp->showDotDot && tmp->recursiveType != RECURSIVE_FULL)) ?
|
auto begin = ((tmp->path != L"" || !tmp->path.empty()) &&
|
||||||
tmp->files.begin() + 1: tmp->files.begin();
|
(tmp->showDotDot && tmp->recursiveType != RECURSIVE_FULL)) ? tmp->files.begin() + 1: tmp->files.begin();
|
||||||
|
|
||||||
switch (tmp->sortType)
|
switch (tmp->sortType)
|
||||||
{
|
{
|
||||||
@ -852,6 +851,7 @@ unsigned __stdcall SystemThreadProc(void* pParam)
|
|||||||
|
|
||||||
EnterCriticalSection(&g_CriticalSection);
|
EnterCriticalSection(&g_CriticalSection);
|
||||||
parent->files = tmp->files;
|
parent->files = tmp->files;
|
||||||
|
parent->files.shrink_to_fit();
|
||||||
parent->fileCount = tmp->fileCount;
|
parent->fileCount = tmp->fileCount;
|
||||||
parent->folderCount = tmp->folderCount;
|
parent->folderCount = tmp->folderCount;
|
||||||
parent->folderSize = tmp->folderSize;
|
parent->folderSize = tmp->folderSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user