summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat_options.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-22 22:53:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-22 22:53:04 +0300
commit9a153012f6d737108fc11a75a2780f7f40adddb9 (patch)
tree930d100b63e3b2fee30140f6ece3f81af7a21d06 /plugins/TabSRMM/src/chat_options.cpp
parent23f676163a595018346050eccb5cc8b2571381e6 (diff)
tabSRMM: empty highlight list isn't stored in profile
Diffstat (limited to 'plugins/TabSRMM/src/chat_options.cpp')
-rw-r--r--plugins/TabSRMM/src/chat_options.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp
index 4492c18e78..9d522e9382 100644
--- a/plugins/TabSRMM/src/chat_options.cpp
+++ b/plugins/TabSRMM/src/chat_options.cpp
@@ -351,12 +351,6 @@ HICON LoadIconEx(char *pszIcoLibName)
return IcoLib_GetIcon(szTemp);
}
-static void InitSetting(wchar_t* &ppPointer, const char *pszSetting, const wchar_t *pszDefault)
-{
- ptrW val(db_get_wsa(0, CHAT_MODULE, pszSetting));
- replaceStrW(ppPointer, (val != nullptr) ? val : pszDefault);
-}
-
#define OPT_FIXHEADINGS (WM_USER+1)
static UINT _o1controls[] = { IDC_CHECKBOXES, IDC_GROUP, IDC_STATIC_ADD };
@@ -407,10 +401,8 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading1, branch1, _countof(branch1), 0x0000);
FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading2, branch2, _countof(branch2), 0x0000);
- wchar_t* pszGroup = nullptr;
- InitSetting(pszGroup, "AddToGroup", L"Chat rooms");
- SetDlgItemText(hwndDlg, IDC_GROUP, pszGroup);
- mir_free(pszGroup);
+ ptrW pszGroup(db_get_wsa(0, CHAT_MODULE, "AddToGroup"));
+ SetDlgItemText(hwndDlg, IDC_GROUP, (pszGroup != nullptr) ? pszGroup : TranslateT("Chat rooms"));
}
break;