mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Tweaks and fixes
This commit is contained in:
parent
3a6f955a3c
commit
211e1d657f
@ -270,22 +270,23 @@ INT_PTR CDialogManage::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
|
||||
case IDC_MANAGE_HELP_BUTTON:
|
||||
{
|
||||
std::wstring url = L"http://docs.rainmeter.net/";
|
||||
std::wstring url = L"http://docs.rainmeter.net/manual/user-interface/manage#";
|
||||
|
||||
HWND hwnd = c_Dialog->GetActiveTabWindow();
|
||||
if (hwnd == m_TabSkins.GetWindow())
|
||||
{
|
||||
url.append(L"manual/user-interface/manage#SkinsTab");
|
||||
url += L"Skins";
|
||||
}
|
||||
else if (hwnd == m_TabLayouts.GetWindow())
|
||||
{
|
||||
url.append(L"/manual/user-interface/manage#LayoutsTab");
|
||||
url += L"Layouts";
|
||||
}
|
||||
else if (hwnd == m_TabSettings.GetWindow())
|
||||
else // if (hwnd == m_TabSettings.GetWindow())
|
||||
{
|
||||
url.append(L"/manual/user-interface/manage#SettingsTab");
|
||||
url += L"Settings";
|
||||
}
|
||||
|
||||
|
||||
url += L"Tab";
|
||||
ShellExecute(m_Window, L"open", url.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||
}
|
||||
break;
|
||||
|
@ -1498,12 +1498,12 @@ void CRainmeter::ToggleSkin(int folderIndex, int fileIndex)
|
||||
}
|
||||
}
|
||||
|
||||
void CRainmeter::SetSkinPath(std::wstring skinPath)
|
||||
void CRainmeter::SetSkinPath(const std::wstring& skinPath)
|
||||
{
|
||||
WritePrivateProfileString(L"Rainmeter", L"SkinPath", skinPath.c_str(), m_IniFile.c_str());
|
||||
}
|
||||
|
||||
void CRainmeter::SetSkinEditor(std::wstring editor)
|
||||
void CRainmeter::SetSkinEditor(const std::wstring& editor)
|
||||
{
|
||||
LPCWSTR tmp = editor.empty() ? NULL : editor.c_str();
|
||||
if (!tmp)
|
||||
|
@ -138,7 +138,7 @@ public:
|
||||
const std::wstring& GetLogFile() { return m_LogFile; }
|
||||
const std::wstring& GetSettingsPath() { return m_SettingsPath; }
|
||||
const std::wstring& GetSkinPath() { return m_SkinPath; }
|
||||
void SetSkinPath(std::wstring skinPath);
|
||||
void SetSkinPath(const std::wstring& skinPath);
|
||||
std::wstring GetLayoutPath() { return m_SettingsPath + L"Layouts\\"; }
|
||||
std::wstring GetPluginPath() { return m_Path + L"Plugins\\"; }
|
||||
std::wstring GetUserPluginPath() { return m_SettingsPath + L"Plugins\\"; }
|
||||
@ -154,7 +154,7 @@ public:
|
||||
const std::wstring& GetDrive() { return m_Drive; }
|
||||
|
||||
const std::wstring& GetSkinEditor() { return m_SkinEditor; }
|
||||
void SetSkinEditor(std::wstring editor);
|
||||
void SetSkinEditor(const std::wstring& editor);
|
||||
const std::wstring& GetStatsDate() { return m_StatsDate; }
|
||||
|
||||
HWND GetWindow() { return m_Window; }
|
||||
|
@ -333,23 +333,14 @@ void CTrayWindow::ShowUpdateNotification(const WCHAR* newVersion)
|
||||
ShowNotification(TRAY_NOTIFICATION_UPDATE, GetString(ID_STR_UPDATEAVAILABLE), text.c_str());
|
||||
}
|
||||
|
||||
void CTrayWindow::SetTrayIcon(bool state)
|
||||
void CTrayWindow::SetTrayIcon(bool enabled)
|
||||
{
|
||||
std::wstring iniFile = Rainmeter->GetIniFile();
|
||||
enabled ? TryAddTrayIcon() : RemoveTrayIcon();
|
||||
m_IconEnabled = enabled;
|
||||
|
||||
if (state)
|
||||
{
|
||||
// Delete the key from Rainmeter.ini
|
||||
WritePrivateProfileString(L"Rainmeter", L"TrayIcon", NULL, iniFile.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
WritePrivateProfileString(L"Rainmeter", L"TrayIcon", L"0", iniFile.c_str());
|
||||
}
|
||||
|
||||
CConfigParser parser;
|
||||
parser.Initialize(iniFile, NULL, NULL);
|
||||
ReadOptions(parser);
|
||||
// Save to Rainmeter.ini.
|
||||
const std::wstring& iniFile = Rainmeter->GetIniFile();
|
||||
WritePrivateProfileString(L"Rainmeter", L"TrayIcon", enabled ? NULL : L"0", iniFile.c_str());
|
||||
}
|
||||
|
||||
void CTrayWindow::ReadOptions(CConfigParser& parser)
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
void ReadOptions(CConfigParser& parser);
|
||||
HWND GetWindow() { return m_Window; }
|
||||
bool IsTrayIconEnabled() { return m_IconEnabled; }
|
||||
void SetTrayIcon(bool state);
|
||||
void SetTrayIcon(bool enabled);
|
||||
|
||||
void ShowWelcomeNotification();
|
||||
void ShowUpdateNotification(const WCHAR* newVersion);
|
||||
|
Loading…
Reference in New Issue
Block a user