From 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 20:47:51 +0000 Subject: HCONTACT is not needed anymore git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AvatarHistory/src/AvatarDlg.cpp | 32 ++++++++++++++--------------- plugins/AvatarHistory/src/AvatarHistory.cpp | 12 +++++------ plugins/AvatarHistory/src/AvatarHistory.h | 8 ++++---- plugins/AvatarHistory/src/icolib.cpp | 2 +- plugins/AvatarHistory/src/options.cpp | 2 +- plugins/AvatarHistory/src/popup.cpp | 8 ++++---- plugins/AvatarHistory/src/popup.h | 8 ++++---- plugins/AvatarHistory/src/utils.cpp | 10 ++++----- 8 files changed, 41 insertions(+), 41 deletions(-) (limited to 'plugins/AvatarHistory/src') diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index 82a987b0b5..a0897015d1 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -23,22 +23,22 @@ Avatar History Plugin HGENMENU hMenu = NULL; DWORD WINAPI AvatarDialogThread(LPVOID param); static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam); -int ShowSaveDialog(HWND hwnd, TCHAR* fn,HCONTACT hContact = NULL); +int ShowSaveDialog(HWND hwnd, TCHAR* fn,MCONTACT hContact = NULL); BOOL ProtocolEnabled(const char *proto); -int FillAvatarListFromDB(HWND list, HCONTACT hContact); -int FillAvatarListFromFolder(HWND list, HCONTACT hContact); -int FillAvatarListFromFiles(HWND list, HCONTACT hContact); +int FillAvatarListFromDB(HWND list, MCONTACT hContact); +int FillAvatarListFromFolder(HWND list, MCONTACT hContact); +int FillAvatarListFromFiles(HWND list, MCONTACT hContact); int CleanupAvatarPic(HWND hwnd); bool UpdateAvatarPic(HWND hwnd); -TCHAR * GetContactFolder(TCHAR *fn, HCONTACT hContact); +TCHAR * GetContactFolder(TCHAR *fn, MCONTACT hContact); BOOL ResolveShortcut(TCHAR *shortcut, TCHAR *file); static INT_PTR ShowDialogSvc(WPARAM wParam, LPARAM lParam); struct AvatarDialogData { - HCONTACT hContact; + MCONTACT hContact; TCHAR fn[MAX_PATH]; HWND parent; }; @@ -65,7 +65,7 @@ public: TCHAR *filelink; }; -int OpenAvatarDialog(HCONTACT hContact, char* fn) +int OpenAvatarDialog(MCONTACT hContact, char* fn) { HWND hAvatarWindow = WindowList_Find(hAvatarWindowsList, hContact); if (hAvatarWindow) @@ -222,7 +222,7 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l DestroyMenu(menu); ListEntry *le = (ListEntry*) SendMessage(hwndList, LB_GETITEMDATA, pos, 0); - HCONTACT hContact = (HCONTACT) GetWindowLongPtr(hwnd, GWLP_USERDATA); + MCONTACT hContact = (MCONTACT) GetWindowLongPtr(hwnd, GWLP_USERDATA); switch(ret) { case ID_AVATARLISTPOPUP_SAVEAS: ShowSaveDialog(hwnd, le->filename, hContact); @@ -302,7 +302,7 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l switch(LOWORD(wParam)) { case IDOK: if (HIWORD(wParam) == BN_CLICKED) { - HCONTACT hContact = (HCONTACT) GetWindowLongPtr(hwnd, GWLP_USERDATA); + MCONTACT hContact = (MCONTACT) GetWindowLongPtr(hwnd, GWLP_USERDATA); db_set_b(hContact, MODULE_NAME, "AvatarPopups", (BYTE) IsDlgButtonChecked(hwnd, IDC_POPUPUSER)); db_set_b(hContact, MODULE_NAME, "LogToDisk", (BYTE) IsDlgButtonChecked(hwnd, IDC_LOGUSER)); db_set_b(hContact, MODULE_NAME, "LogToHistory", (BYTE) IsDlgButtonChecked(hwnd, IDC_HISTORYUSER)); @@ -324,7 +324,7 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l case IDC_OPENFOLDER: if (HIWORD(wParam) == BN_CLICKED && opts.log_per_contact_folders) { TCHAR avfolder[MAX_PATH]; - HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA); + MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA); GetContactFolder(avfolder, hContact); ShellExecute(NULL, db_get_b(NULL, MODULE_NAME, "OpenFolderMethod", 0) ? _T("explore") : _T("open"), avfolder, NULL, NULL, SW_SHOWNORMAL); return TRUE; @@ -373,7 +373,7 @@ int AddFileToList(TCHAR *path,TCHAR *lnk,TCHAR *filename, HWND list) return max_pos; } -int FillAvatarListFromFiles(HWND list, HCONTACT hContact) +int FillAvatarListFromFiles(HWND list, MCONTACT hContact) { int max_pos = 0; TCHAR dir[MAX_PATH], path[MAX_PATH]; @@ -400,7 +400,7 @@ int FillAvatarListFromFiles(HWND list, HCONTACT hContact) return 0; } -int FillAvatarListFromFolder(HWND list, HCONTACT hContact) +int FillAvatarListFromFolder(HWND list, MCONTACT hContact) { int max_pos = 0; TCHAR dir[MAX_PATH], path[MAX_PATH]; @@ -429,7 +429,7 @@ int FillAvatarListFromFolder(HWND list, HCONTACT hContact) return 0; } -int FillAvatarListFromDB(HWND list, HCONTACT hContact) +int FillAvatarListFromDB(HWND list, MCONTACT hContact) { int max_pos = 0; BYTE blob[2048]; @@ -513,7 +513,7 @@ int CleanupAvatarPic(HWND hwnd) int PreBuildContactMenu(WPARAM wParam,LPARAM lParam) { - char *proto = GetContactProto((HCONTACT)wParam); + char *proto = GetContactProto((MCONTACT)wParam); Menu_ShowItem(hMenu, ProtocolEnabled(proto)); return 0; } @@ -534,12 +534,12 @@ void InitMenuItem() static INT_PTR ShowDialogSvc(WPARAM wParam, LPARAM lParam) { - OpenAvatarDialog((HCONTACT)wParam, (char*)lParam); + OpenAvatarDialog((MCONTACT)wParam, (char*)lParam); return 0; } -int ShowSaveDialog(HWND hwnd, TCHAR* fn, HCONTACT hContact) +int ShowSaveDialog(HWND hwnd, TCHAR* fn, MCONTACT hContact) { TCHAR filter[MAX_PATH]; TCHAR file[MAX_PATH]; diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index 156134bea9..927c9d1c03 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -40,7 +40,7 @@ int OptInit(WPARAM wParam,LPARAM lParam); TCHAR* GetHistoryFolder(TCHAR *fn); TCHAR* GetProtocolFolder(TCHAR *fn, char *proto); -TCHAR* GetOldStyleAvatarName(TCHAR *fn, HCONTACT hContact); +TCHAR* GetOldStyleAvatarName(TCHAR *fn, MCONTACT hContact); void InitMenuItem(); @@ -84,7 +84,7 @@ static INT_PTR GetCachedAvatar(WPARAM wParam, LPARAM lParam) static INT_PTR IsEnabled(WPARAM wParam, LPARAM lParam) { - HCONTACT hContact = (HCONTACT) wParam; + MCONTACT hContact = (MCONTACT) wParam; return ContactEnabled(hContact, "LogToDisk", AVH_DEF_LOGTODISK) || ContactEnabled(hContact, "AvatarPopups", AVH_DEF_AVPOPUPS) || ContactEnabled(hContact, "LogToHistory", AVH_DEF_LOGTOHISTORY); @@ -105,11 +105,11 @@ static INT_PTR IsEnabled(WPARAM wParam, LPARAM lParam) static int AvatarChanged(WPARAM wParam, LPARAM lParam) { - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; if (hContact == NULL) return 0; - char *proto = GetContactProto((HCONTACT)wParam); + char *proto = GetContactProto((MCONTACT)wParam); if (proto == NULL) return 0; @@ -158,7 +158,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) ShowDebugPopup(hContact, TranslateT("AVH Debug: File copied successfully"), history_filename); if (ServiceExists(MS_MC_GETMETACONTACT)) { - HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, wParam, 0); + MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, wParam, 0); if (hMetaContact != NULL && ContactEnabled(hMetaContact, "LogToDisk", AVH_DEF_LOGTOHISTORY)) { TCHAR filename[MAX_PATH] = _T(""); @@ -203,7 +203,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) CreateOldStyleShortcut(hContact, history_filename); if (ServiceExists(MS_MC_GETMETACONTACT)) { - HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, wParam, 0); + MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, wParam, 0); if (hMetaContact != NULL && ContactEnabled(hMetaContact, "LogToDisk", AVH_DEF_LOGTOHISTORY)) CreateOldStyleShortcut(hMetaContact, history_filename); } diff --git a/plugins/AvatarHistory/src/AvatarHistory.h b/plugins/AvatarHistory/src/AvatarHistory.h index 334ef74109..fb3900c4fe 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.h +++ b/plugins/AvatarHistory/src/AvatarHistory.h @@ -60,22 +60,22 @@ void LoadOptions(); void SetupIcoLib(); HICON createDefaultOverlayedIcon(BOOL big); -HICON createProtoOverlayedIcon(HCONTACT hContact); +HICON createProtoOverlayedIcon(MCONTACT hContact); int PreBuildContactMenu(WPARAM wParam,LPARAM lParam); int IcoLibIconsChanged(WPARAM wParam,LPARAM lParam); -int OpenAvatarDialog(HCONTACT hContact, char* fn); +int OpenAvatarDialog(MCONTACT hContact, char* fn); // utils TCHAR* GetCachedAvatar(char *proto, TCHAR *hash); BOOL ProtocolEnabled(const char *proto); -BOOL ContactEnabled(HCONTACT hContact, char *setting, int def); +BOOL ContactEnabled(MCONTACT hContact, char *setting, int def); BOOL CopyImageFile(TCHAR *old_file, TCHAR *new_file); void ConvertToFilename(TCHAR *str, size_t size); -void CreateOldStyleShortcut(HCONTACT hContact, TCHAR *history_filename); +void CreateOldStyleShortcut(MCONTACT hContact, TCHAR *history_filename); BOOL CreateShortcut(TCHAR *file, TCHAR *shortcut); #define POPUP_ACTION_DONOTHING 0 diff --git a/plugins/AvatarHistory/src/icolib.cpp b/plugins/AvatarHistory/src/icolib.cpp index b3307b0a7b..88e6b4cae7 100644 --- a/plugins/AvatarHistory/src/icolib.cpp +++ b/plugins/AvatarHistory/src/icolib.cpp @@ -74,7 +74,7 @@ HICON createDefaultOverlayedIcon(BOOL big) } -HICON createProtoOverlayedIcon(HCONTACT hContact) +HICON createProtoOverlayedIcon(MCONTACT hContact) { HICON icon1 = LoadIconEx(I_OVERLAY); diff --git a/plugins/AvatarHistory/src/options.cpp b/plugins/AvatarHistory/src/options.cpp index 7044b2122f..f38ba519fa 100644 --- a/plugins/AvatarHistory/src/options.cpp +++ b/plugins/AvatarHistory/src/options.cpp @@ -133,7 +133,7 @@ static INT_PTR CALLBACK PopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA op.popup_use_win_colors = IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS) != 0; op.popup_use_default_colors = IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS) != 0; - HCONTACT hContact = db_find_first(); + MCONTACT hContact = db_find_first(); ShowTestPopup(hContact,TranslateT("Test Contact"), TranslateT("Test description"), &op); break; } diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp index ed36550961..af2de3d9ad 100644 --- a/plugins/AvatarHistory/src/popup.cpp +++ b/plugins/AvatarHistory/src/popup.cpp @@ -62,18 +62,18 @@ void ShowErrPopup(const TCHAR *description, const TCHAR *title) } -void ShowTestPopup(HCONTACT hContact,const TCHAR *title, const TCHAR *description, const Options *op) +void ShowTestPopup(MCONTACT hContact,const TCHAR *title, const TCHAR *description, const Options *op) { ShowPopupEx(hContact, title, description, NULL, POPUP_TYPE_TEST, op); } -void ShowPopup(HCONTACT hContact, const TCHAR *title, const TCHAR *description) +void ShowPopup(MCONTACT hContact, const TCHAR *title, const TCHAR *description) { ShowPopupEx(hContact, title, description, (void*)hContact, POPUP_TYPE_NORMAL, &opts); } -void ShowDebugPopup(HCONTACT hContact, const TCHAR *title, const TCHAR *description) +void ShowDebugPopup(MCONTACT hContact, const TCHAR *title, const TCHAR *description) { if (db_get_b(NULL,MODULE_NAME,"Debug",0)) { @@ -89,7 +89,7 @@ typedef struct PopupDataType; // Show an popup -void ShowPopupEx(HCONTACT hContact, const TCHAR *title, const TCHAR *description, +void ShowPopupEx(MCONTACT hContact, const TCHAR *title, const TCHAR *description, void *plugin_data, int type, const Options *op) { if (ServiceExists(MS_POPUP_ADDPOPUPT)) diff --git a/plugins/AvatarHistory/src/popup.h b/plugins/AvatarHistory/src/popup.h index 6738f7d577..edc08e5bcb 100644 --- a/plugins/AvatarHistory/src/popup.h +++ b/plugins/AvatarHistory/src/popup.h @@ -54,16 +54,16 @@ void DeInitPopups(); #define POPUP_TYPE_ERROR 2 // Show an popup -void ShowPopup(HCONTACT hContact, const TCHAR *title, const TCHAR *description); -void ShowDebugPopup(HCONTACT hContact, const TCHAR *title, const TCHAR *description); +void ShowPopup(MCONTACT hContact, const TCHAR *title, const TCHAR *description); +void ShowDebugPopup(MCONTACT hContact, const TCHAR *title, const TCHAR *description); // Show an test -void ShowTestPopup(HCONTACT hContact,const TCHAR *title, const TCHAR *description, const Options *op); +void ShowTestPopup(MCONTACT hContact,const TCHAR *title, const TCHAR *description, const Options *op); // Show an error popup void ShowErrPopup(const char *description, const char *title = NULL); -void ShowPopupEx(HCONTACT hContact, const TCHAR *title, const TCHAR *description, +void ShowPopupEx(MCONTACT hContact, const TCHAR *title, const TCHAR *description, void *plugin_data, int type, const Options *op); diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp index 3d0bd65ec3..57e30f163a 100644 --- a/plugins/AvatarHistory/src/utils.cpp +++ b/plugins/AvatarHistory/src/utils.cpp @@ -34,7 +34,7 @@ BOOL ProtocolEnabled(const char *proto) return (BOOL) db_get_b(NULL, MODULE_NAME, setting, TRUE); } -BOOL ContactEnabled(HCONTACT hContact, char *setting, int def) +BOOL ContactEnabled(MCONTACT hContact, char *setting, int def) { if (hContact == NULL) return FALSE; @@ -77,7 +77,7 @@ void ConvertToFilename(TCHAR *str, size_t size) } } -int GetUIDFromHContact(HCONTACT contact, TCHAR* uinout, int uinout_len) +int GetUIDFromHContact(MCONTACT contact, TCHAR* uinout, int uinout_len) { bool found = true; @@ -138,7 +138,7 @@ TCHAR* GetProtocolFolder(TCHAR *fn, char *proto) return fn; } -TCHAR* GetContactFolder(TCHAR *fn, HCONTACT hContact) +TCHAR* GetContactFolder(TCHAR *fn, MCONTACT hContact) { char *proto = GetContactProto(hContact); GetProtocolFolder(fn, proto); @@ -158,7 +158,7 @@ TCHAR* GetContactFolder(TCHAR *fn, HCONTACT hContact) return fn; } -TCHAR* GetOldStyleAvatarName(TCHAR *fn, HCONTACT hContact) +TCHAR* GetOldStyleAvatarName(TCHAR *fn, MCONTACT hContact) { GetContactFolder(fn, hContact); @@ -172,7 +172,7 @@ TCHAR* GetOldStyleAvatarName(TCHAR *fn, HCONTACT hContact) return fn; } -void CreateOldStyleShortcut(HCONTACT hContact, TCHAR *history_filename) +void CreateOldStyleShortcut(MCONTACT hContact, TCHAR *history_filename) { TCHAR shortcut[MAX_PATH] = _T(""); -- cgit v1.2.3