diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-26 12:11:50 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-26 12:11:50 +0300 |
commit | 1c669484c03d93c5eb489d51a018c7dca7b1a5fc (patch) | |
tree | 374d945c1713936da52fe63821d9aef38d01a0a4 | |
parent | 26597eb5d2148d9b53ff0719b7e4eb6ef09d4bbd (diff) |
unused variable removed
-rw-r--r-- | src/mir_app/src/options.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index 4fe2e783f2..59555a026e 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -569,11 +569,10 @@ class COptionsDlg : public CDlgBase opd = m_arOpd[i];
wchar_t *ptszGroup = TranslateW_LP(opd->ptszGroup, opd->pPlugin);
- wchar_t *ptszTitle = opd->getString(opd->ptszTitle), *useTitle;
wchar_t *ptszTab = TranslateW_LP(opd->ptszTab, opd->pPlugin);
+ wchar_t *ptszTitle = opd->getString(opd->ptszTitle);
tvis.hParent = nullptr;
- useTitle = ptszTitle;
if (ptszGroup != nullptr) {
tvis.hParent = FindNamedTreeItem(nullptr, ptszGroup);
@@ -584,24 +583,27 @@ class COptionsDlg : public CDlgBase }
}
else {
- tvi.hItem = FindNamedTreeItem(nullptr, useTitle);
+ tvi.hItem = FindNamedTreeItem(nullptr, ptszTitle);
if (tvi.hItem != nullptr) {
if (i == m_currentPage)
m_hCurrentPage = tvi.hItem;
tvi.mask = TVIF_PARAM;
m_pageTree.GetItem(&tvi);
- if (tvi.lParam < 0)
+ if (tvi.lParam < 0) {
+ tvi.lParam = i;
+ m_pageTree.SetItem(&tvi);
continue;
+ }
}
}
if (ptszTab != nullptr) {
HTREEITEM hItem;
if (tvis.hParent == nullptr)
- hItem = FindNamedTreeItem(nullptr, useTitle);
+ hItem = FindNamedTreeItem(nullptr, ptszTitle);
else
- hItem = FindNamedTreeItem(tvis.hParent, useTitle);
+ hItem = FindNamedTreeItem(tvis.hParent, ptszTitle);
if (hItem != nullptr) {
if (i == m_currentPage)
m_hCurrentPage = hItem;
@@ -609,7 +611,7 @@ class COptionsDlg : public CDlgBase }
}
- tvis.item.pszText = useTitle;
+ tvis.item.pszText = ptszTitle;
tvis.item.lParam = i;
opd->hTreeItem = m_pageTree.InsertItem(&tvis);
if (i == m_currentPage)
|