diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-22 22:53:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-22 22:53:04 +0300 |
commit | 9a153012f6d737108fc11a75a2780f7f40adddb9 (patch) | |
tree | 930d100b63e3b2fee30140f6ece3f81af7a21d06 /plugins | |
parent | 23f676163a595018346050eccb5cc8b2571381e6 (diff) |
tabSRMM: empty highlight list isn't stored in profile
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/chat_options.cpp | 12 | ||||
-rw-r--r-- | plugins/TabSRMM/src/muchighlight.cpp | 1 |
2 files changed, 3 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;
diff --git a/plugins/TabSRMM/src/muchighlight.cpp b/plugins/TabSRMM/src/muchighlight.cpp index 50fc240d3e..01390be456 100644 --- a/plugins/TabSRMM/src/muchighlight.cpp +++ b/plugins/TabSRMM/src/muchighlight.cpp @@ -247,6 +247,7 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L ::GetDlgItemText(hwndDlg, IDC_HIGHLIGHTNICKPATTERN, szBuf, iLen + 1);
db_set_ws(0, CHAT_MODULE, "HighlightNames", szBuf);
}
+ else db_set_ws(0, CHAT_MODULE, "HighlightNames", L"");
iLen = ::GetWindowTextLength(::GetDlgItem(hwndDlg, IDC_HIGHLIGHTTEXTPATTERN));
if (iLen) {
|