From a9b7347a7e9141e59790aa9bee5e1b5d648cbe0b Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sat, 9 Jun 2012 19:56:59 +0300 Subject: [PATCH] Cosmetics --- Build/Installer/Installer.nsi | 1 + Library/DialogManage.cpp | 46 +++++++++++++++++------------------ Library/DialogManage.h | 1 + 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/Build/Installer/Installer.nsi b/Build/Installer/Installer.nsi index 359356e8..29e33a66 100644 --- a/Build/Installer/Installer.nsi +++ b/Build/Installer/Installer.nsi @@ -951,6 +951,7 @@ Section Uninstall Delete "$INSTDIR\Rainmeter.dll" Delete "$INSTDIR\Rainmeter.exe" Delete "$INSTDIR\SkinInstaller.exe" + Delete "$INSTDIR\Launcher.exe" RMDir "$INSTDIR" ${If} $un.DeleteAll == 1 diff --git a/Library/DialogManage.cpp b/Library/DialogManage.cpp index 2f4a05d6..23f0c39d 100644 --- a/Library/DialogManage.cpp +++ b/Library/DialogManage.cpp @@ -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() { int sel = TabCtrl_GetCurSel(GetDlgItem(m_Window, IDC_MANAGE_TAB)); @@ -736,6 +713,29 @@ void CDialogManage::CTabSkins::ReadSkin() 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. ** diff --git a/Library/DialogManage.h b/Library/DialogManage.h index ef9db4d7..70a5fc08 100644 --- a/Library/DialogManage.h +++ b/Library/DialogManage.h @@ -66,6 +66,7 @@ private: void DisableControls(bool clear = false); void ReadSkin(); + static std::wstring GetTreeSelectionPath(HWND tree); static int PopulateTree(HWND tree, TVINSERTSTRUCT& tvi, int index = 0); std::wstring m_SkinFileName;