Cosmetic changes.

This commit is contained in:
spx
2012-02-21 19:15:10 +00:00
parent bcb2326d33
commit bb865ec514
5 changed files with 55 additions and 56 deletions

View File

@ -1145,6 +1145,37 @@ void CRainmeter::ReloadSettings()
ReadGeneralSettings(m_IniFile);
}
void CRainmeter::EditSettings()
{
std::wstring command = m_ConfigEditor + L" \"";
command += m_IniFile;
command += L'"';
RunCommand(m_Window, command.c_str(), SW_SHOWNORMAL);
}
void CRainmeter::EditSkinFile(const std::wstring& name, const std::wstring& iniFile)
{
std::wstring command = m_SkinPath + name;
command += L'\\';
command += iniFile;
bool writable = CSystem::IsFileWritable(command.c_str());
command.insert(0, L" \"");
command.insert(0, m_ConfigEditor);
command += L'"';
// Execute as admin if in protected location
RunCommand(m_Window, command.c_str(), SW_SHOWNORMAL, !writable);
}
void CRainmeter::OpenSkinFolder(const std::wstring& name)
{
std::wstring command = L'"' + m_SkinPath;
if (!name.empty()) command += name;
command += L'"';
RunCommand(m_Window, command.c_str(), SW_SHOWNORMAL);
}
void CRainmeter::ActivateActiveConfigs()
{
std::multimap<int, int>::const_iterator iter = m_ConfigOrders.begin();
@ -3031,6 +3062,17 @@ void CRainmeter::StopLogging()
SetLogging(false);
}
void CRainmeter::ShowLogFile()
{
// Check if the file exists
if (_waccess(m_LogFile.c_str(), 0) != -1)
{
std::wstring command = m_LogViewer + L" ";
command += m_LogFile;
RunCommand(m_Window, command.c_str(), SW_SHOWNORMAL);
}
}
void CRainmeter::DeleteLogFile()
{
// Check if the file exists