summaryrefslogtreecommitdiff
path: root/plugins/SimpleStatusMsg/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SimpleStatusMsg/src')
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp42
-rw-r--r--plugins/SimpleStatusMsg/src/msgbox.cpp38
-rw-r--r--plugins/SimpleStatusMsg/src/options.cpp32
4 files changed, 57 insertions, 57 deletions
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index 177282ccad..a36675e407 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -383,7 +383,7 @@ int LoadAwayMsgModule(void)
hWindowList2 = WindowList_Create();
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
SET_UID(mi, 0xd3282acc, 0x9ff1, 0x4ede, 0x8a, 0x1e, 0x36, 0x72, 0x3f, 0x44, 0x4f, 0x84);
CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index 13893bcc83..f3c15eb8ab 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -289,7 +289,7 @@ wchar_t* InsertBuiltinVarsIntoMsg(wchar_t *in, const char *szProto, int)
mir_snprintf(buff, "SMsg%d", k);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg == NULL)
continue;
@@ -334,7 +334,7 @@ wchar_t* InsertBuiltinVarsIntoMsg(wchar_t *in, const char *szProto, int)
mir_snprintf(buff, "DefMsg%d", k);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg == NULL)
continue;
@@ -413,7 +413,7 @@ static wchar_t *GetAwayMessageFormat(int iStatus, const char *szProto)
else
mir_snprintf(szSetting, "Msg");
- format = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting));
+ format = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting));
}
else if (flags & STATUS_LAST_MSG)
{
@@ -426,7 +426,7 @@ static wchar_t *GetAwayMessageFormat(int iStatus, const char *szProto)
if (szLastMsg == NULL)
return NULL; //mir_wstrdup(L"");
- format = db_get_tsa(NULL, "SimpleStatusMsg", szLastMsg);
+ format = db_get_wsa(NULL, "SimpleStatusMsg", szLastMsg);
mir_free(szLastMsg);
}
else if (flags & STATUS_THIS_MSG)
@@ -436,7 +436,7 @@ static wchar_t *GetAwayMessageFormat(int iStatus, const char *szProto)
else
mir_snprintf(szSetting, "Default");
- format = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting));
+ format = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting));
if (format == NULL)
format = mir_wstrdup(L"");
}
@@ -449,7 +449,7 @@ static wchar_t *GetAwayMessageFormat(int iStatus, const char *szProto)
void DBWriteMessage(char *szSetting, wchar_t *tszMsg)
{
if (tszMsg && mir_wstrlen(tszMsg))
- db_set_ts(NULL, "SimpleStatusMsg", szSetting, tszMsg);
+ db_set_ws(NULL, "SimpleStatusMsg", szSetting, tszMsg);
else
db_unset(NULL, "SimpleStatusMsg", szSetting);
}
@@ -512,7 +512,7 @@ static wchar_t *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVar
if ((!iStatus || iStatus == ID_STATUS_CURRENT) && szProto)
{
mir_snprintf(szSetting, "FCur%sMsg", szProto);
- format = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ format = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
}
else
{
@@ -533,14 +533,14 @@ static wchar_t *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVar
if (flags & PROTO_THIS_MSG)
{
mir_snprintf(szSetting, "Proto%sDefault", szProto);
- format = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ format = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (format == NULL)
format = mir_wstrdup(L"");
}
else if (flags & PROTO_NOCHANGE && szProto)
{
mir_snprintf(szSetting, "FCur%sMsg", szProto);
- format = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ format = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
}
else if (flags & PROTO_POPUPDLG)
format = GetAwayMessageFormat(iStatus, szProto);
@@ -627,7 +627,7 @@ int HasProtoStaticStatusMsg(const char *szProto, int iInitialStatus, int iStatus
else if (flags & PROTO_THIS_MSG)
{
mir_snprintf(szSetting, "Proto%sDefault", szProto);
- wchar_t *szSimpleStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *szSimpleStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (szSimpleStatusMsg != NULL)
{
SaveMessageToDB(szProto, szSimpleStatusMsg, TRUE);
@@ -1012,7 +1012,7 @@ int ChangeStatusMessage(WPARAM wParam, LPARAM lParam)
}
else if (iProtoFlags & PROTO_NOCHANGE && !bOnStartup) {
mir_snprintf(szSetting, "FCur%sMsg", szProto);
- wchar_t *msg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *msg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
#ifdef _DEBUG
log2file("ChangeStatusMessage(): Set %s status and \"%S\" status message for %s.", StatusModeToDbSetting(iStatus, ""), msg, szProto);
@@ -1076,7 +1076,7 @@ int ChangeStatusMessage(WPARAM wParam, LPARAM lParam)
wchar_t *msg;
if (iProtoFlags & PROTO_NOCHANGE) {
mir_snprintf(szSetting, "FCur%sMsg", accounts->pa[i]->szModuleName);
- msg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ msg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
}
else
msg = GetAwayMessageFormat(iStatus, NULL);
@@ -1159,7 +1159,7 @@ int SetStartupStatus(int i)
else if (flags & PROTO_NOCHANGE)
{
mir_snprintf(szSetting, "FCur%sMsg", accounts->pa[i]->szModuleName);
- fmsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ fmsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
}
else
fmsg = GetAwayMessageFormat(iStatus, accounts->pa[i]->szModuleName);
@@ -1296,7 +1296,7 @@ VOID CALLBACK UpdateMsgTimerProc(HWND, UINT, UINT_PTR, DWORD)
continue;
mir_snprintf(szBuffer, "FCur%sMsg", accounts->pa[i]->szModuleName);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szBuffer);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szBuffer);
if (tszStatusMsg == NULL)
continue;
@@ -1305,7 +1305,7 @@ VOID CALLBACK UpdateMsgTimerProc(HWND, UINT, UINT_PTR, DWORD)
mir_snprintf(szBuffer, "Cur%sMsg", accounts->pa[i]->szModuleName);
- tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szBuffer);
+ tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szBuffer);
if ((tszMsg && tszStatusMsg && !mir_wstrcmp(tszMsg, tszStatusMsg)) || (!tszMsg && !tszStatusMsg))
{
mir_free(tszStatusMsg);
@@ -1346,10 +1346,10 @@ void RegisterHotkey(void)
HOTKEYDESC hkd = {0};
hkd.cbSize = sizeof(hkd);
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "SimpleStatusMsg_OpenDialog";
- hkd.ptszDescription = LPGENW("Open status message dialog");
- hkd.ptszSection = LPGENW("Status message");
+ hkd.pwszDescription = LPGENW("Open status message dialog");
+ hkd.pwszSection = LPGENW("Status message");
hkd.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_OEM_3);
Hotkey_Register(&hkd);
@@ -1384,7 +1384,7 @@ static int ChangeStatusMsgPrebuild(WPARAM, LPARAM)
return 0;
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
if (!db_get_b(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", 1))
mi.flags |= CMIF_HIDDEN;
mi.hIcolibItem = GetIconHandle(IDI_CSMSG);
@@ -1530,7 +1530,7 @@ static int CSStatusChange(WPARAM wParam, LPARAM)
for (int j = 1; j <= max_hist_msgs; j++)
{
mir_snprintf(buff, "SMsg%d", j);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg != NULL)
{
if (!mir_wstrcmp(tszStatusMsg, szMsgW))
@@ -1718,7 +1718,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
}
}
- g_ptszWinampSong = db_get_tsa(NULL, "SimpleStatusMsg", "AmpLastTitle");
+ g_ptszWinampSong = db_get_wsa(NULL, "SimpleStatusMsg", "AmpLastTitle");
if (g_ptszWinampSong == NULL)
g_ptszWinampSong = mir_wstrdup(L"SimpleStatusMsg");
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp
index 20bc2a0347..844ce83b41 100644
--- a/plugins/SimpleStatusMsg/src/msgbox.cpp
+++ b/plugins/SimpleStatusMsg/src/msgbox.cpp
@@ -238,7 +238,7 @@ HWND WINAPI CreateRecentComboBoxEx(HWND hwndDlg, struct MsgBoxData *data)
mir_snprintf(buff, "SMsg%d", j);
j--;
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg != NULL) {
if (*tszStatusMsg != '\0') {
found = TRUE;
@@ -332,7 +332,7 @@ HWND WINAPI CreateRecentComboBoxEx(HWND hwndDlg, struct MsgBoxData *data)
for (int i = 1; i <= data->num_def_msgs; ++i) {
// predefined messages
mir_snprintf(buff, "DefMsg%d", i);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg != NULL) {
if (*tszStatusMsg != '\0') {
cbei.iItem = -1;
@@ -640,7 +640,7 @@ void ClearHistory(struct MsgBoxData *data, int cur_sel)
for (i = 1; i <= data->max_hist_msgs; i++) {
mir_snprintf(text, "SMsg%d", i);
- db_set_ts(NULL, "SimpleStatusMsg", text, L"");
+ db_set_ws(NULL, "SimpleStatusMsg", text, L"");
}
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", "");
for (i = 0; i < accounts->count; i++) {
@@ -716,7 +716,7 @@ void SetEditControlText(struct MsgBoxData *data, HWND hwndDlg, int iStatus)
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting != NULL) {
if (*szSetting != '\0') {
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg != NULL) {
if (*tszStatusMsg != '\0') {
SetDlgItemText(hwndDlg, IDC_EDIT1, tszStatusMsg);
@@ -745,7 +745,7 @@ void SetEditControlText(struct MsgBoxData *data, HWND hwndDlg, int iStatus)
else
mir_snprintf(setting, "Default");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting));
if (tszStatusMsg != NULL) {
SetDlgItemText(hwndDlg, IDC_EDIT1, tszStatusMsg);
fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)tszStatusMsg);
@@ -760,7 +760,7 @@ void SetEditControlText(struct MsgBoxData *data, HWND hwndDlg, int iStatus)
else
mir_snprintf(setting, "Msg");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting));
if (tszStatusMsg != NULL) {
SetDlgItemText(hwndDlg, IDC_EDIT1, tszStatusMsg);
fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)tszStatusMsg);
@@ -1131,7 +1131,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
db_set_s(NULL, "SimpleStatusMsg", szSetting, "");
mir_snprintf(szSetting, "%sMsg", msgbox_data->m_szProto);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, szSetting), L"");
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, szSetting), L"");
}
else {
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", "");
@@ -1153,10 +1153,10 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
mir_snprintf(szSetting, "%sMsg", accounts->pa[j]->szModuleName);
iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), L"");
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), L"");
}
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), L""); // for compatibility with some plugins
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), L""); // for compatibility with some plugins
}
if (bCurrentStatus)
@@ -1172,7 +1172,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
for (int i = 1; i <= msgbox_data->max_hist_msgs; i++) {
mir_snprintf(buff, "SMsg%d", i);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", buff);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", buff);
if (tszStatusMsg != NULL) {
if (!mir_wstrcmp(tszStatusMsg, tszMsg)) {
found = true;
@@ -1181,7 +1181,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
db_set_s(NULL, "SimpleStatusMsg", buff2, buff);
mir_snprintf(buff2, "%sMsg", msgbox_data->m_szProto);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg);
}
else {
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", buff);
@@ -1203,7 +1203,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
mir_snprintf(buff2, "%sMsg", accounts->pa[j]->szModuleName);
iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg);
}
}
mir_free(tszStatusMsg);
@@ -1222,14 +1222,14 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
last_modified_msg++;
mir_snprintf(buff, "SMsg%d", last_modified_msg);
- db_set_ts(NULL, "SimpleStatusMsg", buff, tszMsg);
+ db_set_ws(NULL, "SimpleStatusMsg", buff, tszMsg);
if (msgbox_data->m_szProto) {
mir_snprintf(buff2, "Last%sMsg", msgbox_data->m_szProto);
db_set_s(NULL, "SimpleStatusMsg", buff2, buff);
mir_snprintf(buff2, "%sMsg", msgbox_data->m_szProto);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg);
}
else {
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", buff);
@@ -1251,14 +1251,14 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
mir_snprintf(buff2, "%sMsg", accounts->pa[j]->szModuleName);
iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg);
}
}
db_set_w(NULL, "SimpleStatusMsg", "LMMsg", (WORD)last_modified_msg);
}
if (!msgbox_data->m_szProto)
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), tszMsg); // for compatibility with some plugins
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), tszMsg); // for compatibility with some plugins
if (bCurrentStatus)
SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, ID_STATUS_CURRENT, tszMsg, msgbox_data->m_bOnStartup);
@@ -1386,7 +1386,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
if (LOWORD(histitem.lParam) == HISTORY_MSG) {
char szSetting[16];
mir_snprintf(szSetting, "SMsg%d", (int)HIWORD(histitem.lParam));
- db_set_ts(NULL, "SimpleStatusMsg", szSetting, L"");
+ db_set_ws(NULL, "SimpleStatusMsg", szSetting, L"");
SendMessage(msgbox_data->recent_cbex, CBEM_DELETEITEM, (WPARAM)msgbox_data->curr_sel_msg, 0);
}
if (LOWORD(histitem.lParam) == PREDEFINED_MSG) {
@@ -1504,7 +1504,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
if (LOWORD(histitem.lParam) == HISTORY_MSG) {
mir_snprintf(buff, "SMsg%d", (int)HIWORD(histitem.lParam));
- db_set_ts(NULL, "SimpleStatusMsg", buff, L"");
+ db_set_ws(NULL, "SimpleStatusMsg", buff, L"");
}
else if (LOWORD(histitem.lParam) == PREDEFINED_MSG)
msgbox_data->m_bPredefChanged = TRUE;
@@ -1598,7 +1598,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
mir_snprintf(buff, "DefMsg%d", i);
if (LOWORD(cbitem.lParam) == PREDEFINED_MSG) {
new_num_def_msgs++;
- db_set_ts(NULL, "SimpleStatusMsg", buff, text);
+ db_set_ws(NULL, "SimpleStatusMsg", buff, text);
}
else
db_unset(NULL, "SimpleStatusMsg", buff);
diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp
index ebed7ada43..b6ddf1cc11 100644
--- a/plugins/SimpleStatusMsg/src/options.cpp
+++ b/plugins/SimpleStatusMsg/src/options.cpp
@@ -138,7 +138,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
val = db_get_b(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(i, "Flags"), STATUS_DEFAULT);
data->status_msg[0].flags[i - ID_STATUS_ONLINE] = val;
- ptrW text( db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(i, "Default")));
+ ptrW text( db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(i, "Default")));
mir_wstrncpy(data->status_msg[0].msg[i - ID_STATUS_ONLINE], (text == NULL) ? GetDefaultMessage(i) : text, 1024);
for (j = 0; j < accounts->count; j++)
@@ -150,7 +150,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
val = db_get_b(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(i, setting), STATUS_DEFAULT);
data->status_msg[j+1].flags[i-ID_STATUS_ONLINE] = val;
mir_snprintf(setting, "%sDefault", accounts->pa[j]->szModuleName);
- text = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(i, setting));
+ text = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(i, setting));
mir_wstrncpy(data->status_msg[j + 1].msg[i - ID_STATUS_ONLINE], (text == NULL) ? GetDefaultMessage(i) : text, 1024);
}
}
@@ -203,7 +203,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
if (index != CB_ERR && index != CB_ERRSPACE)
{
mir_snprintf(setting, "Proto%sDefault", accounts->pa[i]->szModuleName);
- data->proto_msg[i+1].msg = db_get_tsa(NULL, "SimpleStatusMsg", setting);
+ data->proto_msg[i+1].msg = db_get_wsa(NULL, "SimpleStatusMsg", setting);
mir_snprintf(setting, "Proto%sFlags", accounts->pa[i]->szModuleName);
val = db_get_b(NULL, "SimpleStatusMsg", setting, PROTO_DEFAULT);
@@ -451,7 +451,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting)
{
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg && mir_wstrlen(tszStatusMsg))
{
if (tszStatusMsg && mir_wstrlen(tszStatusMsg))
@@ -489,7 +489,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
else
mir_snprintf(setting, "Msg");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
if (tszStatusMsg)
{
SetDlgItemText(hwndDlg, IDC_OPTEDIT1, tszStatusMsg);
@@ -602,7 +602,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting != NULL)
{
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg)
{
if (tszStatusMsg[0])
@@ -639,7 +639,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
else
mir_snprintf(setting, "Msg");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
if (tszStatusMsg != NULL)
{
SetDlgItemText(hwndDlg, IDC_OPTEDIT1, tszStatusMsg);
@@ -697,7 +697,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting != NULL)
{
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg)
{
if (tszStatusMsg[0])
@@ -726,7 +726,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
else
mir_snprintf(setting, "Msg");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting));
if (tszStatusMsg != NULL)
{
SetDlgItemText(hwndDlg, IDC_OPTEDIT1, tszStatusMsg);
@@ -807,7 +807,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting != NULL)
{
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg)
{
if (tszStatusMsg[0])
@@ -837,7 +837,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
else
mir_snprintf(setting, "Msg");
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(i + ID_STATUS_ONLINE, setting));
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SRAway", StatusModeToDbSetting(i + ID_STATUS_ONLINE, setting));
if (tszStatusMsg != NULL)
{
SetDlgItemText(hwndDlg, IDC_OPTEDIT1, tszStatusMsg);
@@ -999,7 +999,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
{
if (accounts->statusMsgFlags & Proto_Status2Flag(i))
{
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(i, "Default"), data->status_msg[0].msg[i - ID_STATUS_ONLINE]);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(i, "Default"), data->status_msg[0].msg[i - ID_STATUS_ONLINE]);
db_set_b(NULL, "SimpleStatusMsg", StatusModeToDbSetting(i, "Flags"), (BYTE)data->status_msg[0].flags[i - ID_STATUS_ONLINE]);
for (int j = 0; j < accounts->count; j++)
@@ -1013,7 +1013,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
if (CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(i))
{
mir_snprintf(szSetting, "%sDefault", accounts->pa[j]->szModuleName);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(i, szSetting), data->status_msg[j + 1].msg[i - ID_STATUS_ONLINE]);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(i, szSetting), data->status_msg[j + 1].msg[i - ID_STATUS_ONLINE]);
mir_snprintf(szSetting, "%sFlags", accounts->pa[j]->szModuleName);
db_set_b(NULL, "SimpleStatusMsg", StatusModeToDbSetting(i, szSetting), (BYTE)data->status_msg[j + 1].flags[i - ID_STATUS_ONLINE]);
@@ -1041,7 +1041,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
mir_snprintf(szSetting, "Proto%sDefault", accounts->pa[i]->szModuleName);
if (data->proto_msg[i+1].msg && (data->proto_msg[i+1].flags & PROTO_THIS_MSG))
- db_set_ts(NULL, "SimpleStatusMsg", szSetting, data->proto_msg[i+1].msg);
+ db_set_ws(NULL, "SimpleStatusMsg", szSetting, data->proto_msg[i+1].msg);
// else
// db_unset(NULL, "SimpleStatusMsg", szSetting);
@@ -1181,7 +1181,7 @@ static bool IsHistoryMsgsFound(HWND, int histMax)
if (j < 1)
j = histMax;
mir_snprintf(szSetting, "SMsg%d", j);
- wchar_t *tszStatusMsg = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
+ wchar_t *tszStatusMsg = db_get_wsa(NULL, "SimpleStatusMsg", szSetting);
if (tszStatusMsg != NULL) {
if (*tszStatusMsg != '\0') {
mir_free(tszStatusMsg);
@@ -1330,7 +1330,7 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
for (int i = 1; i <= max_hist_msgs; i++) {
char text[8];
mir_snprintf(text, "SMsg%d", i);
- db_set_ts(NULL, "SimpleStatusMsg", text, L"");
+ db_set_ws(NULL, "SimpleStatusMsg", text, L"");
}
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", "");