.cosmetics

This commit is contained in:
Mirek Fidler 2025-11-05 17:03:02 +01:00
parent 5295b60a93
commit cd6dbc25f7
2 changed files with 10 additions and 18 deletions

View file

@ -109,11 +109,8 @@ String DirFinder::Get(const String& substring, const char *files)
String DirFinder::GetVisualStudioFolder(int drive, String pf)
{
constexpr auto VISUAL_STUDIO_FOLDER = "Microsoft Visual Studio";
pf.Set(0, drive);
pf = AppendFileName(pf, VISUAL_STUDIO_FOLDER);
return pf;
return AppendFileName(pf, "Microsoft Visual Studio");
}
bool CheckDirs(const Vector<String>& d, int count)

View file

@ -51,9 +51,6 @@ void VerifyUppHubRequirements()
}
class UppHubSettingsDlg final : public WithUppHubSettingsLayout<TopWindow> {
public:
static constexpr auto GLOBAL_CONFIG_NAME = "UppHubDlgSettings";
public:
UppHubSettingsDlg();
@ -73,15 +70,20 @@ UppHubSettingsDlg::UppHubSettingsDlg()
};
}
INITBLOCK
{
RegisterGlobalConfig("UppHubDlgSettings");
}
void UppHubSettingsDlg::LoadGlobalSettings()
{
LoadFromGlobal(*this, GLOBAL_CONFIG_NAME);
LoadFromGlobal(*this, "UppHubDlgSettings");
RefreshCtrls();
}
void UppHubSettingsDlg::SaveGlobalSettings()
{
StoreToGlobal(*this, GLOBAL_CONFIG_NAME);
StoreToGlobal(*this, "UppHubDlgSettings");
}
void UppHubSettingsDlg::RefreshCtrls()
@ -92,8 +94,6 @@ void UppHubSettingsDlg::RefreshCtrls()
}
struct UppHubDlg : WithUppHubLayout<TopWindow> {
static constexpr auto LIST_KEY = "PACKAGE";
SplitterFrame splitter;
ArrayCtrl list;
RichTextView info;
@ -129,7 +129,7 @@ struct UppHubDlg : WithUppHubLayout<TopWindow> {
void Menu(Bar& bar);
UppHubNest *Get(const String& name) { return upv.FindPtr(name); }
UppHubNest *Current() { return list.IsCursor() ? Get(list.Get(LIST_KEY)) : nullptr; }
UppHubNest *Current() { return list.IsCursor() ? Get(list.GetKey()) : nullptr; }
UppHubDlg();
@ -146,7 +146,7 @@ UppHubDlg::UppHubDlg()
parent.Add(list.SizePos());
parent.AddFrame(splitter.Right(info, 500));
list.AddKey(LIST_KEY);
list.AddKey();
list.AddColumn("Package").Sorting();
list.AddColumn("Category").Sorting();
list.AddColumn("Description");
@ -209,11 +209,6 @@ UppHubDlg::UppHubDlg()
settings.LoadGlobalSettings();
}
INITBLOCK
{
RegisterGlobalConfig(UppHubSettingsDlg::GLOBAL_CONFIG_NAME);
}
bool UppHubDlg::Key(dword key, int count)
{
if(key == K_CTRL_K) {