summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SeenPlugin')
-rw-r--r--plugins/SeenPlugin/src/file.cpp8
-rw-r--r--plugins/SeenPlugin/src/history.cpp12
-rw-r--r--plugins/SeenPlugin/src/main.cpp8
-rw-r--r--plugins/SeenPlugin/src/menu.cpp2
-rw-r--r--plugins/SeenPlugin/src/options.cpp30
-rw-r--r--plugins/SeenPlugin/src/userinfo.cpp2
-rw-r--r--plugins/SeenPlugin/src/utils.cpp20
7 files changed, 41 insertions, 41 deletions
diff --git a/plugins/SeenPlugin/src/file.cpp b/plugins/SeenPlugin/src/file.cpp
index bd61b7a820..411d85a71e 100644
--- a/plugins/SeenPlugin/src/file.cpp
+++ b/plugins/SeenPlugin/src/file.cpp
@@ -30,17 +30,17 @@ static wchar_t *g_ptszFileStamp, *g_ptszFileName;
void InitFileOutput(void)
{
- ptrW tszFileName(db_get_tsa(NULL, S_MOD, "FileName"));
+ ptrW tszFileName(db_get_wsa(NULL, S_MOD, "FileName"));
if (tszFileName == NULL)
tszFileName = mir_wstrdup(DEFAULT_FILENAME);
- replaceStrW(g_ptszFileName, VARST(tszFileName));
+ replaceStrW(g_ptszFileName, VARSW(tszFileName));
wchar_t *tszPath = NEWWSTR_ALLOCA(g_ptszFileName);
wchar_t *p = wcsrchr(tszPath, '\\');
if (p) *p = 0;
- CreateDirectoryTreeT(tszPath);
+ CreateDirectoryTreeW(tszPath);
- ptrW tszFileStamp(db_get_tsa(NULL, S_MOD, "FileStamp"));
+ ptrW tszFileStamp(db_get_wsa(NULL, S_MOD, "FileStamp"));
replaceStrW(g_ptszFileStamp, (tszFileStamp == NULL) ? DEFAULT_FILESTAMP : tszFileStamp);
}
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp
index a89a7f2ce3..84639ea0a6 100644
--- a/plugins/SeenPlugin/src/history.cpp
+++ b/plugins/SeenPlugin/src/history.cpp
@@ -52,12 +52,12 @@ void HistoryWrite(MCONTACT hContact)
wchar_t *ptszString;
DBVARIANT dbv;
- if (!db_get_ts(NULL, S_MOD, "HistoryStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "HistoryStamp", &dbv)) {
ptszString = ParseString(dbv.ptszVal, hContact);
db_free(&dbv);
}
else ptszString = ParseString(DEFAULT_HISTORYSTAMP, hContact);
- db_set_ts(hContact, S_MOD, BuildSetting(historyLast), ptszString);
+ db_set_ws(hContact, S_MOD, BuildSetting(historyLast), ptszString);
historyLast = (historyLast + 1) % historyMax;
db_set_w(hContact, S_MOD, "HistoryLast", historyLast);
@@ -88,7 +88,7 @@ void LoadHistoryList(MCONTACT hContact, HWND hwnd, int nList)
i = (i - 1 + historyMax) % historyMax;
DBVARIANT dbv;
- if (!db_get_ts(hContact, S_MOD, BuildSetting(i), &dbv)) {
+ if (!db_get_ws(hContact, S_MOD, BuildSetting(i), &dbv)) {
SendDlgItemMessage(hwnd, nList, LB_ADDSTRING, 0, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
@@ -188,9 +188,9 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA
SendDlgItemMessage(hwndDlg, IDC_SENDMSG, BM_SETIMAGE, IMAGE_ICON, (WPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
//set-up tooltips
- SendDlgItemMessage(hwndDlg, IDC_DETAILS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("View User's Details"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_USERMENU, BUTTONADDTOOLTIP, (WPARAM)TranslateT("User Menu"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_SENDMSG, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Send Instant Message"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_DETAILS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("View User's Details"), BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_USERMENU, BUTTONADDTOOLTIP, (WPARAM)TranslateT("User Menu"), BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_SENDMSG, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Send Instant Message"), BATF_UNICODE);
Utils_RestoreWindowPositionNoMove(hwndDlg, NULL, S_MOD, "History_");
ShowWindow(hwndDlg, SW_SHOW);
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp
index cb98026c61..5ab4b3e6eb 100644
--- a/plugins/SeenPlugin/src/main.cpp
+++ b/plugins/SeenPlugin/src/main.cpp
@@ -104,10 +104,10 @@ extern "C" __declspec(dllexport) int Load(void)
LoadWatchedProtos();
- SkinAddNewSoundExT("LastSeenTrackedStatusChange", LPGENW("LastSeen"), LPGENW("User status change"));
- SkinAddNewSoundExT("LastSeenTrackedStatusOnline", LPGENW("LastSeen"), LPGENW("Changed to Online"));
- SkinAddNewSoundExT("LastSeenTrackedStatusOffline", LPGENW("LastSeen"), LPGENW("User Logged Off"));
- SkinAddNewSoundExT("LastSeenTrackedStatusFromOffline", LPGENW("LastSeen"), LPGENW("User Logged In"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusChange", LPGENW("LastSeen"), LPGENW("User status change"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusOnline", LPGENW("LastSeen"), LPGENW("Changed to Online"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusOffline", LPGENW("LastSeen"), LPGENW("User Logged Off"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusFromOffline", LPGENW("LastSeen"), LPGENW("User Logged In"));
return 0;
}
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp
index b2728560d2..c8e9777004 100644
--- a/plugins/SeenPlugin/src/menu.cpp
+++ b/plugins/SeenPlugin/src/menu.cpp
@@ -43,7 +43,7 @@ int BuildContactMenu(WPARAM hContact, LPARAM)
}
LPCTSTR ptszName;
- ptrW tszStamp(db_get_tsa(NULL, S_MOD, "MenuStamp"));
+ ptrW tszStamp(db_get_wsa(NULL, S_MOD, "MenuStamp"));
if (tszStamp != NULL)
ptszName = ParseString(tszStamp , hContact);
else
diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp
index 178eaf301d..b2cbc80f12 100644
--- a/plugins/SeenPlugin/src/options.cpp
+++ b/plugins/SeenPlugin/src/options.cpp
@@ -58,13 +58,13 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
EnableWindow(GetDlgItem(hdlg, i + 20), hasPopups);
}
- if (!db_get_ts(NULL, S_MOD, "PopupStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "PopupStamp", &dbv)) {
SetDlgItemText(hdlg, IDC_POPUPSTAMP, dbv.ptszVal);
db_free(&dbv);
}
else SetDlgItemText(hdlg, IDC_POPUPSTAMP, DEFAULT_POPUPSTAMP);
- if (!db_get_ts(NULL, S_MOD, "PopupStampText", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "PopupStampText", &dbv)) {
SetDlgItemText(hdlg, IDC_POPUPSTAMPTEXT, dbv.ptszVal);
db_free(&dbv);
}
@@ -130,10 +130,10 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
switch (((LPNMHDR)lparam)->code) {
case PSN_APPLY:
GetDlgItemText(hdlg, IDC_POPUPSTAMP, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "PopupStamp", szstamp);
+ db_set_ws(NULL, S_MOD, "PopupStamp", szstamp);
GetDlgItemText(hdlg, IDC_POPUPSTAMPTEXT, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "PopupStampText", szstamp);
+ db_set_ws(NULL, S_MOD, "PopupStampText", szstamp);
bchecked = (BYTE)IsDlgButtonChecked(hdlg, IDC_POPUPS);
if (db_get_b(NULL, S_MOD, "UsePopups", 0) != bchecked)
@@ -189,31 +189,31 @@ INT_PTR CALLBACK OptsSettingsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM
EnableWindow(GetDlgItem(hdlg, IDC_HISTORYSTAMP), IsDlgButtonChecked(hdlg, IDC_HISTORY));
EnableWindow(GetDlgItem(hdlg, IDC_COUNT), IsDlgButtonChecked(hdlg, IDC_MISSEDONES));
- if (!db_get_ts(NULL, S_MOD, "MenuStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "MenuStamp", &dbv)) {
SetDlgItemText(hdlg, IDC_MENUSTAMP, dbv.ptszVal);
db_free(&dbv);
}
else SetDlgItemText(hdlg, IDC_MENUSTAMP, DEFAULT_MENUSTAMP);
- if (!db_get_ts(NULL, S_MOD, "UserStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "UserStamp", &dbv)) {
SetDlgItemText(hdlg, IDC_USERSTAMP, dbv.ptszVal);
db_free(&dbv);
}
else SetDlgItemText(hdlg, IDC_USERSTAMP, DEFAULT_USERSTAMP);
- if (!db_get_ts(NULL, S_MOD, "FileStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "FileStamp", &dbv)) {
SetDlgItemText(hdlg, IDC_FILESTAMP, dbv.ptszVal);
db_free(&dbv);
}
else SetDlgItemText(hdlg, IDC_FILESTAMP, DEFAULT_FILESTAMP);
- if (!db_get_ts(NULL, S_MOD, "FileName", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "FileName", &dbv)) {
SetDlgItemText(hdlg, IDC_FILENAME, dbv.ptszVal);
db_free(&dbv);
}
else SetDlgItemText(hdlg, IDC_FILENAME, DEFAULT_FILENAME);
- if (!db_get_ts(NULL, S_MOD, "HistoryStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "HistoryStamp", &dbv)) {
SetDlgItemText(hdlg, IDC_HISTORYSTAMP, dbv.ptszVal);
db_free(&dbv);
}
@@ -287,19 +287,19 @@ INT_PTR CALLBACK OptsSettingsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM
switch (((LPNMHDR)lparam)->code) {
case PSN_APPLY:
GetDlgItemText(hdlg, IDC_MENUSTAMP, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "MenuStamp", szstamp);
+ db_set_ws(NULL, S_MOD, "MenuStamp", szstamp);
GetDlgItemText(hdlg, IDC_USERSTAMP, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "UserStamp", szstamp);
+ db_set_ws(NULL, S_MOD, "UserStamp", szstamp);
GetDlgItemText(hdlg, IDC_FILESTAMP, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "FileStamp", szstamp);
+ db_set_ws(NULL, S_MOD, "FileStamp", szstamp);
GetDlgItemText(hdlg, IDC_FILENAME, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "FileName", szstamp);
+ db_set_ws(NULL, S_MOD, "FileName", szstamp);
GetDlgItemText(hdlg, IDC_HISTORYSTAMP, szstamp, _countof(szstamp));
- db_set_ts(NULL, S_MOD, "HistoryStamp", szstamp);
+ db_set_ws(NULL, S_MOD, "HistoryStamp", szstamp);
db_set_w(NULL, S_MOD, "HistoryMax", (WORD)(GetDlgItemInt(hdlg, IDC_HISTORYSIZE, NULL, FALSE) + 1));
@@ -432,7 +432,7 @@ int OptionsInit(WPARAM wparam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 100000000;
odp.hInstance = hInstance;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_SETTINGS);
odp.pwszGroup = LPGENW("Contacts");
odp.pwszTitle = LPGENW("Last seen");
diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp
index 4fb56ce9f7..881b69ae1e 100644
--- a/plugins/SeenPlugin/src/userinfo.cpp
+++ b/plugins/SeenPlugin/src/userinfo.cpp
@@ -41,7 +41,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar
case WM_REFRESH_UI:
{
- ptrW szout(db_get_tsa(NULL, S_MOD, "UserStamp"));
+ ptrW szout(db_get_wsa(NULL, S_MOD, "UserStamp"));
wchar_t *str = ParseString((szout != NULL) ? szout : DEFAULT_USERSTAMP, wparam);
SetDlgItemText(hdlg, IDC_INFOTEXT, str);
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index 8ff36e51f0..3cb5dad4f2 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -207,7 +207,7 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
charPtr = wantempty ? L"" : TranslateT("<unknown>");
goto LBL_charPtr;
}
- charPtr = TranslateTS(weekdays[isetting]);
+ charPtr = TranslateW(weekdays[isetting]);
LBL_charPtr:
d += mir_snwprintf(d, MAXSIZE - (d - sztemp), L"%s", charPtr);
break;
@@ -215,17 +215,17 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
case 'w':
isetting = st.wDayOfWeek;
if (isetting == -1) goto LBL_noData;
- charPtr = TranslateTS(wdays_short[isetting]);
+ charPtr = TranslateW(wdays_short[isetting]);
goto LBL_charPtr;
case 'E':
if (!(isetting = st.wMonth)) goto LBL_noData;
- charPtr = TranslateTS(monthnames[isetting - 1]);
+ charPtr = TranslateW(monthnames[isetting - 1]);
goto LBL_charPtr;
case 'e':
if (!(isetting = st.wMonth)) goto LBL_noData;
- charPtr = TranslateTS(mnames_short[isetting - 1]);
+ charPtr = TranslateW(mnames_short[isetting - 1]);
goto LBL_charPtr;
case 'H':
@@ -263,7 +263,7 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
goto LBL_noData;
case 'G':
- if (!db_get_ts(hcontact, "CList", "Group", &dbv)) {
+ if (!db_get_ws(hcontact, "CList", "Group", &dbv)) {
wcsncpy(szdbsetting, dbv.ptszVal, _countof(szdbsetting));
db_free(&dbv);
charPtr = szdbsetting;
@@ -291,7 +291,7 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
goto LBL_noData;
case 'T':
- if (db_get_ts(hcontact, "CList", "StatusMsg", &dbv))
+ if (db_get_ws(hcontact, "CList", "StatusMsg", &dbv))
goto LBL_noData;
d += mir_snwprintf(d, MAXSIZE - (d - sztemp), L"%s", dbv.ptszVal);
@@ -313,7 +313,7 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
case 'i':
case 'r':
if (isJabber(szProto)) {
- if (info = db_get_tsa(hcontact, szProto, *p == 'i' ? "Resource" : "System")) {
+ if (info = db_get_wsa(hcontact, szProto, *p == 'i' ? "Resource" : "System")) {
charPtr = info;
goto LBL_charPtr;
}
@@ -340,7 +340,7 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
goto LBL_charPtr;
case 'C': // Get Client Info
- if (info = db_get_tsa(hcontact, szProto, "MirVer")) {
+ if (info = db_get_wsa(hcontact, szProto, "MirVer")) {
charPtr = info;
goto LBL_charPtr;
}
@@ -476,13 +476,13 @@ void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus)
ppd.lchContact = hcontact;
ppd.lchIcon = Skin_LoadProtoIcon(lpzProto, newStatus);
- if (!db_get_ts(NULL, S_MOD, "PopupStamp", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "PopupStamp", &dbv)) {
wcsncpy(ppd.lptzContactName, ParseString(dbv.ptszVal, hcontact), MAX_CONTACTNAME);
db_free(&dbv);
}
else wcsncpy(ppd.lptzContactName, ParseString(DEFAULT_POPUPSTAMP, hcontact), MAX_CONTACTNAME);
- if (!db_get_ts(NULL, S_MOD, "PopupStampText", &dbv)) {
+ if (!db_get_ws(NULL, S_MOD, "PopupStampText", &dbv)) {
wcsncpy(ppd.lptzText, ParseString(dbv.ptszVal, hcontact), MAX_SECONDLINE);
db_free(&dbv);
}