diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
commit | 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch) | |
tree | fcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/XSoundNotify | |
parent | 7193759b046338c6f47ff2edb34743a1465791cd (diff) |
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/XSoundNotify')
-rw-r--r-- | plugins/XSoundNotify/src/Common.h | 4 | ||||
-rw-r--r-- | plugins/XSoundNotify/src/dialog.cpp | 16 | ||||
-rw-r--r-- | plugins/XSoundNotify/src/options.cpp | 12 | ||||
-rw-r--r-- | plugins/XSoundNotify/src/xsn_main.cpp | 6 |
4 files changed, 19 insertions, 19 deletions
diff --git a/plugins/XSoundNotify/src/Common.h b/plugins/XSoundNotify/src/Common.h index 106022b842..c87618ceae 100644 --- a/plugins/XSoundNotify/src/Common.h +++ b/plugins/XSoundNotify/src/Common.h @@ -23,11 +23,11 @@ struct XSN_Data
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR path[MAX_PATH];
BYTE ignore;
- __forceinline XSN_Data(HCONTACT _aContact, TCHAR *_path, BYTE _ignore) :
+ __forceinline XSN_Data(MCONTACT _aContact, TCHAR *_path, BYTE _ignore) :
hContact(_aContact)
{
_tcsncpy(path, _path, SIZEOF(path));
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index ec114a71b2..206d4be1c4 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -15,7 +15,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case WM_INITDIALOG:
{
TranslateDialogDefault(hwndDlg);
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
WindowList_Add(hChangeSoundDlgList, hwndDlg, hContact);
Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, SETTINGSNAME, "ChangeSoundDlg");
@@ -77,7 +77,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP switch (LOWORD(wParam)) {
case IDOK:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p != NULL) {
if (lstrcmpi(p->path, _T(""))) {
@@ -116,7 +116,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP ofn.lpstrDefExt = _T("");
if (GetOpenFileName(&ofn)) {
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
SetDlgItemText(hwndDlg, IDC_CONT_LABEL_SOUND, PathFindFileName(FileName));
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p == NULL)
@@ -134,7 +134,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case IDC_CONT_BUTTON_TEST_PLAY:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
isIgnoreSound = 0;
if (p == NULL) {
@@ -156,7 +156,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case IDC_CONT_BUTTON_RESET_SOUND:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
EnableWindow(GetDlgItem(hwndDlg, IDC_CONT_BUTTON_TEST_PLAY), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CONT_BUTTON_RESET_SOUND), FALSE);
CheckDlgButton(hwndDlg, IDC_CONT_IGNORE_SOUND, BST_UNCHECKED);
@@ -173,7 +173,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case IDC_CONT_IGNORE_SOUND:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p == NULL) {
DBVARIANT dbv;
@@ -195,7 +195,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP break;
case WM_DESTROY:
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
Utils_SaveWindowPosition(hwndDlg, hContact, SETTINGSNAME, "ChangeSoundDlg");
WindowList_Remove(hChangeSoundDlgList, hwndDlg);
}
@@ -204,7 +204,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam)
{
- HWND hChangeSoundDlg = WindowList_Find(hChangeSoundDlgList, (HCONTACT)wParam);
+ HWND hChangeSoundDlg = WindowList_Find(hChangeSoundDlgList, (MCONTACT)wParam);
if (!hChangeSoundDlg) {
hChangeSoundDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CONTACTS), 0, DlgProcContactsOptions, (LPARAM)wParam);
ShowWindow(hChangeSoundDlg, SW_SHOW);
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp index c7d98bc589..76143744ee 100644 --- a/plugins/XSoundNotify/src/options.cpp +++ b/plugins/XSoundNotify/src/options.cpp @@ -50,7 +50,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_PROTO, CB_GETCURSEL, 0, 0);
PROTOACCOUNT *pa = (PROTOACCOUNT *)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_PROTO, CB_GETITEMDATA, cursel, 0);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char* szUniqueId = (char*)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if ((INT_PTR) szUniqueId != CALLSERVICE_NOTFOUND && szUniqueId != NULL) {
DBVARIANT dbvuid = {0};
@@ -85,7 +85,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_OPT_COMBO_USERS:
if ((HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == LBN_SELCHANGE)) {
int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0);
- HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
+ MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_BUTTON_CHOOSE_SOUND), TRUE);
DBVARIANT dbv = {0};
if ( !db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv))
@@ -129,7 +129,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (GetOpenFileName(&ofn)) {
SetDlgItemText(hwndDlg, IDC_OPT_LABEL_SOUND, PathFindFileName(FileName));
int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0);
- HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
+ MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p == NULL)
XSN_Users.insert( new XSN_Data(hContact, FileName, IsDlgButtonChecked(hwndDlg, IDC_OPT_IGNORE_SOUND) ? 1 : 0));
@@ -149,7 +149,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_OPT_BUTTON_TEST_PLAY:
{
int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0);
- HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
+ MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
isIgnoreSound = 0;
if (p == NULL) {
@@ -176,7 +176,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l CheckDlgButton(hwndDlg, IDC_OPT_IGNORE_SOUND, BST_UNCHECKED);
SetDlgItemText(hwndDlg, IDC_OPT_LABEL_SOUND, TranslateT("Not set"));
int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0);
- HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
+ MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p != NULL) {
XSN_Users.remove(p);
@@ -191,7 +191,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_OPT_IGNORE_SOUND:
{
int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0);
- HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
+ MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p == NULL) {
DBVARIANT dbv;
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index a567a8d580..44acde8a95 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -113,9 +113,9 @@ static int ProcessEvent(WPARAM wParam, LPARAM lParam) if (!isReceiveMessage(HANDLE(lParam)))
return 0;
- isIgnoreSound = db_get_b((HCONTACT)wParam, SETTINGSNAME, SETTINGSIGNOREKEY, 0);
+ isIgnoreSound = db_get_b((MCONTACT)wParam, SETTINGSNAME, SETTINGSIGNOREKEY, 0);
DBVARIANT dbv;
- if ( !isIgnoreSound && !db_get_ts((HCONTACT)wParam, SETTINGSNAME, SETTINGSKEY, &dbv)) {
+ if ( !isIgnoreSound && !db_get_ts((MCONTACT)wParam, SETTINGSNAME, SETTINGSKEY, &dbv)) {
TCHAR PlaySoundPath[MAX_PATH] = {0};
PathToAbsoluteT(dbv.ptszVal, PlaySoundPath);
SkinPlaySoundFile(PlaySoundPath);
@@ -154,7 +154,7 @@ static int OnLoadInit(WPARAM wParam, LPARAM lParam) static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
char* szProto = GetContactProto(hContact);
PROTOACCOUNT *pa = ProtoGetAccount(szProto);
|