mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Minor improvement to About dialog (The plugins list is now generated only when Plugins entry is selected, not on initialization. As a result, the About dialog opens considerably faster.).
This commit is contained in:
parent
7b5330896f
commit
054bcd9796
@ -288,6 +288,11 @@ void UpdateWidgets()
|
|||||||
ListView_SetColumn(widget, 2, &lvc);
|
ListView_SetColumn(widget, 2, &lvc);
|
||||||
|
|
||||||
// Update the list of plugins
|
// Update the list of plugins
|
||||||
|
if (g_Plugins.empty())
|
||||||
|
{
|
||||||
|
ScanPlugins();
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<PLUGIN_INFO>::const_iterator iter = g_Plugins.begin();
|
std::vector<PLUGIN_INFO>::const_iterator iter = g_Plugins.begin();
|
||||||
LVITEM vitem;
|
LVITEM vitem;
|
||||||
vitem.mask = LVIF_TEXT;
|
vitem.mask = LVIF_TEXT;
|
||||||
@ -343,8 +348,6 @@ void ScanPlugins()
|
|||||||
|
|
||||||
std::wstring files = Rainmeter->GetPluginPath() + L"*.dll";
|
std::wstring files = Rainmeter->GetPluginPath() + L"*.dll";
|
||||||
|
|
||||||
g_Plugins.clear();
|
|
||||||
|
|
||||||
// Start searching for .ini files in the given directory.
|
// Start searching for .ini files in the given directory.
|
||||||
hSearch = FindFirstFile(files.c_str(), &fileData);
|
hSearch = FindFirstFile(files.c_str(), &fileData);
|
||||||
do
|
do
|
||||||
@ -486,8 +489,6 @@ BOOL OnInitAboutDialog(HWND window)
|
|||||||
lvc.cx = 150;
|
lvc.cx = 150;
|
||||||
lvc.pszText = L"Message";
|
lvc.pszText = L"Message";
|
||||||
ListView_InsertColumn(widget, 2, &lvc);
|
ListView_InsertColumn(widget, 2, &lvc);
|
||||||
|
|
||||||
ScanPlugins();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateWidgets();
|
UpdateWidgets();
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
HWND OpenAboutDialog(HWND hwndOwner, HINSTANCE instance);
|
HWND OpenAboutDialog(HWND hwndOwner, HINSTANCE instance);
|
||||||
void UpdateAboutDialog();
|
void UpdateAboutDialog();
|
||||||
void UpdateAboutStatistics(LPCTSTR entryName = NULL);
|
void UpdateAboutStatistics(LPCTSTR entryName = NULL);
|
||||||
|
void ScanPlugins();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user