Cosmetics

This commit is contained in:
Birunthan Mohanathas 2012-06-09 19:56:59 +03:00
parent 83f1b1ae0e
commit a9b7347a7e
3 changed files with 25 additions and 23 deletions

View File

@ -951,6 +951,7 @@ Section Uninstall
Delete "$INSTDIR\Rainmeter.dll" Delete "$INSTDIR\Rainmeter.dll"
Delete "$INSTDIR\Rainmeter.exe" Delete "$INSTDIR\Rainmeter.exe"
Delete "$INSTDIR\SkinInstaller.exe" Delete "$INSTDIR\SkinInstaller.exe"
Delete "$INSTDIR\Launcher.exe"
RMDir "$INSTDIR" RMDir "$INSTDIR"
${If} $un.DeleteAll == 1 ${If} $un.DeleteAll == 1

View File

@ -137,29 +137,6 @@ void CDialogManage::UpdateSkins(CMeterWindow* meterWindow, bool deleted)
} }
} }
std::wstring GetTreeSelectionPath(HWND tree)
{
WCHAR buffer[MAX_PATH];
// Get current selection name
TVITEM tvi = {0};
tvi.hItem = TreeView_GetSelection(tree);
tvi.mask = TVIF_TEXT;
tvi.pszText = buffer;
tvi.cchTextMax = MAX_PATH;
TreeView_GetItem(tree, &tvi);
std::wstring path = buffer;
while ((tvi.hItem = TreeView_GetParent(tree, tvi.hItem)) != NULL)
{
TreeView_GetItem(tree, &tvi);
path.insert(0, 1, L'\\');
path.insert(0, buffer);
}
return path;
}
CDialog::CTab& CDialogManage::GetActiveTab() CDialog::CTab& CDialogManage::GetActiveTab()
{ {
int sel = TabCtrl_GetCurSel(GetDlgItem(m_Window, IDC_MANAGE_TAB)); int sel = TabCtrl_GetCurSel(GetDlgItem(m_Window, IDC_MANAGE_TAB));
@ -736,6 +713,29 @@ void CDialogManage::CTabSkins::ReadSkin()
delete [] buffer; delete [] buffer;
} }
std::wstring CDialogManage::CTabSkins::GetTreeSelectionPath(HWND tree)
{
WCHAR buffer[MAX_PATH];
// Get current selection name
TVITEM tvi = {0};
tvi.hItem = TreeView_GetSelection(tree);
tvi.mask = TVIF_TEXT;
tvi.pszText = buffer;
tvi.cchTextMax = MAX_PATH;
TreeView_GetItem(tree, &tvi);
std::wstring path = buffer;
while ((tvi.hItem = TreeView_GetParent(tree, tvi.hItem)) != NULL)
{
TreeView_GetItem(tree, &tvi);
path.insert(0, 1, L'\\');
path.insert(0, buffer);
}
return path;
}
/* /*
** Populates the treeview with folders and skins. ** Populates the treeview with folders and skins.
** **

View File

@ -66,6 +66,7 @@ private:
void DisableControls(bool clear = false); void DisableControls(bool clear = false);
void ReadSkin(); void ReadSkin();
static std::wstring GetTreeSelectionPath(HWND tree);
static int PopulateTree(HWND tree, TVINSERTSTRUCT& tvi, int index = 0); static int PopulateTree(HWND tree, TVINSERTSTRUCT& tvi, int index = 0);
std::wstring m_SkinFileName; std::wstring m_SkinFileName;