diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
commit | d296f9f99daf102b9af5d56690e2bd00d61c1267 (patch) | |
tree | 39311caaf80abf0b47ecb78cf94dc8157b193575 /plugins/XSoundNotify/src | |
parent | ffc521e5d5e9bd66feb65afe0046b3fc7e073356 (diff) |
database:
- senseless fiels ptszVal removed from DBVARIANT, pwszVal is used instead;
- if you want db_get to return a string, you need to use db_get_s.
Diffstat (limited to 'plugins/XSoundNotify/src')
-rw-r--r-- | plugins/XSoundNotify/src/dialog.cpp | 6 | ||||
-rw-r--r-- | plugins/XSoundNotify/src/options.cpp | 12 | ||||
-rw-r--r-- | plugins/XSoundNotify/src/xsn_main.cpp | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index 32754d42c2..110e72a6d5 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -55,7 +55,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP if (!db_get_ws(hContact, MODULENAME, SETTINGSKEY, &dbv)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_CONT_BUTTON_TEST_PLAY), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CONT_BUTTON_RESET_SOUND), TRUE);
- SetDlgItemText(hwndDlg, IDC_CONT_LABEL_SOUND, PathFindFileName(dbv.ptszVal));
+ SetDlgItemText(hwndDlg, IDC_CONT_LABEL_SOUND, PathFindFileName(dbv.pwszVal));
db_free(&dbv);
}
else {
@@ -136,7 +136,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP DBVARIANT dbv;
if (!db_get_ws(hContact, MODULENAME, SETTINGSKEY, &dbv)) {
wchar_t longpath[MAX_PATH] = { 0 };
- PathToAbsoluteW(dbv.ptszVal, longpath);
+ PathToAbsoluteW(dbv.pwszVal, longpath);
Skin_PlaySoundFile(longpath);
db_free(&dbv);
}
@@ -169,7 +169,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP DBVARIANT dbv;
if (!db_get_ws(hContact, MODULENAME, SETTINGSKEY, &dbv)) {
wchar_t longpath[MAX_PATH];
- PathToAbsoluteW(dbv.ptszVal, longpath);
+ PathToAbsoluteW(dbv.pwszVal, longpath);
XSN_Users.insert(new XSN_Data(hContact, longpath, IsDlgButtonChecked(hwndDlg, IDC_CONT_IGNORE_SOUND) ? 1 : 0, 1));
db_free(&dbv);
}
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp index 32e14c5569..bbbad8fe54 100644 --- a/plugins/XSoundNotify/src/options.cpp +++ b/plugins/XSoundNotify/src/options.cpp @@ -100,7 +100,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (!db_get_ws(NULL, MODULENAME, pa->szModuleName, &dbv)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_BUTTON_TEST_PLAY), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_BUTTON_RESET_SOUND), TRUE);
- SetDlgItemText(hwndDlg, IDC_OPT_LABEL_SOUND, PathFindFileName(dbv.ptszVal));
+ SetDlgItemText(hwndDlg, IDC_OPT_LABEL_SOUND, PathFindFileName(dbv.pwszVal));
db_free(&dbv);
}
else {
@@ -120,7 +120,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (!db_get_ws(hContact, MODULENAME, SETTINGSKEY, &dbv)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_BUTTON_TEST_PLAY), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_BUTTON_RESET_SOUND), TRUE);
- SetDlgItemText(hwndDlg, IDC_OPT_LABEL_SOUND, PathFindFileName(dbv.ptszVal));
+ SetDlgItemText(hwndDlg, IDC_OPT_LABEL_SOUND, PathFindFileName(dbv.pwszVal));
db_free(&dbv);
}
else {
@@ -202,7 +202,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l DBVARIANT dbv;
if (!db_get_ws(NULL, MODULENAME, pa->szModuleName, &dbv)) {
wchar_t longpath[MAX_PATH];
- PathToAbsoluteW(dbv.ptszVal, longpath);
+ PathToAbsoluteW(dbv.pwszVal, longpath);
Skin_PlaySoundFile(longpath);
db_free(&dbv);
}
@@ -221,7 +221,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l DBVARIANT dbv;
if (!db_get_ws(hContact, MODULENAME, SETTINGSKEY, &dbv)) {
wchar_t longpath[MAX_PATH];
- PathToAbsoluteW(dbv.ptszVal, longpath);
+ PathToAbsoluteW(dbv.pwszVal, longpath);
Skin_PlaySoundFile(longpath);
db_free(&dbv);
}
@@ -281,7 +281,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l DBVARIANT dbv;
if (!db_get_ws(NULL, MODULENAME, pa->szModuleName, &dbv)) {
wchar_t longpath[MAX_PATH];
- PathToAbsoluteW(dbv.ptszVal, longpath);
+ PathToAbsoluteW(dbv.pwszVal, longpath);
XSN_Users.insert(new XSN_Data((LPARAM)pa->szModuleName, longpath, IsDlgButtonChecked(hwndDlg, IDC_OPT_IGNORE_SOUND) ? 1 : 0, 0));
db_free(&dbv);
}
@@ -297,7 +297,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l DBVARIANT dbv;
if (!db_get_ws(hContact, MODULENAME, SETTINGSKEY, &dbv)) {
wchar_t longpath[MAX_PATH];
- PathToAbsoluteW(dbv.ptszVal, longpath);
+ PathToAbsoluteW(dbv.pwszVal, longpath);
XSN_Users.insert(new XSN_Data(hContact, longpath, IsDlgButtonChecked(hwndDlg, IDC_OPT_IGNORE_SOUND) ? 1 : 0, 1));
db_free(&dbv);
}
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index bb7e1ecb2f..c29a1ea852 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -108,7 +108,7 @@ static int ProcessEvent(WPARAM hContact, LPARAM lParam) DBVARIANT dbv;
if (!isIgnoreSound && !db_get_ws(hContact, MODULENAME, SETTINGSKEY, &dbv)) {
wchar_t PlaySoundPath[MAX_PATH] = { 0 };
- PathToAbsoluteW(dbv.ptszVal, PlaySoundPath);
+ PathToAbsoluteW(dbv.pwszVal, PlaySoundPath);
isOwnSound = 0;
Skin_PlaySoundFile(PlaySoundPath);
db_free(&dbv);
@@ -125,7 +125,7 @@ static int ProcessEvent(WPARAM hContact, LPARAM lParam) mir_free(value);
if (!isIgnoreAccSound && !db_get_ws(NULL, MODULENAME, pa->szModuleName, &dbv)) {
wchar_t PlaySoundPath[MAX_PATH] = { 0 };
- PathToAbsoluteW(dbv.ptszVal, PlaySoundPath);
+ PathToAbsoluteW(dbv.pwszVal, PlaySoundPath);
isAccSound = 0;
Skin_PlaySoundFile(PlaySoundPath);
db_free(&dbv);
@@ -153,7 +153,7 @@ static int ProcessChatEvent(WPARAM, LPARAM lParam) DBVARIANT dbv;
if (!isIgnoreSound && !db_get_ws(hContact, MODULENAME, SETTINGSKEY, &dbv)) {
wchar_t PlaySoundPath[MAX_PATH] = { 0 };
- PathToAbsoluteW(dbv.ptszVal, PlaySoundPath);
+ PathToAbsoluteW(dbv.pwszVal, PlaySoundPath);
isOwnSound = 0;
Skin_PlaySoundFile(PlaySoundPath);
db_free(&dbv);
@@ -169,7 +169,7 @@ static int ProcessChatEvent(WPARAM, LPARAM lParam) mir_free(value);
if (!isIgnoreAccSound && !db_get_ws(NULL, MODULENAME, pa->szModuleName, &dbv)) {
wchar_t PlaySoundPath[MAX_PATH] = { 0 };
- PathToAbsoluteW(dbv.ptszVal, PlaySoundPath);
+ PathToAbsoluteW(dbv.pwszVal, PlaySoundPath);
isAccSound = 0;
Skin_PlaySoundFile(PlaySoundPath);
db_free(&dbv);
|