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/SmileyAdd | |
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/SmileyAdd')
-rw-r--r-- | plugins/SmileyAdd/src/customsmiley.cpp | 6 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/customsmiley.h | 12 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/dlgboxsubclass.cpp | 8 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/general.cpp | 6 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/general.h | 4 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/options.cpp | 4 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/options.h | 4 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/richcall.cpp | 4 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/services.cpp | 16 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/services.h | 2 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/smileys.cpp | 10 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/smileys.h | 4 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/smltool.cpp | 6 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/smltool.h | 2 |
14 files changed, 44 insertions, 44 deletions
diff --git a/plugins/SmileyAdd/src/customsmiley.cpp b/plugins/SmileyAdd/src/customsmiley.cpp index 7249242fa7..ca5f24ed26 100644 --- a/plugins/SmileyAdd/src/customsmiley.cpp +++ b/plugins/SmileyAdd/src/customsmiley.cpp @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. SmileyPackCListType g_SmileyPackCStore;
-bool SmileyPackCListType::AddSmileyPack(HCONTACT hContact, TCHAR* dir)
+bool SmileyPackCListType::AddSmileyPack(MCONTACT hContact, TCHAR* dir)
{
bool res = true;
if (GetSmileyPack(hContact) == NULL) {
@@ -38,7 +38,7 @@ bool SmileyPackCListType::AddSmileyPack(HCONTACT hContact, TCHAR* dir) }
-bool SmileyPackCListType::AddSmiley(HCONTACT hContact, TCHAR* path)
+bool SmileyPackCListType::AddSmiley(MCONTACT hContact, TCHAR* path)
{
SmileyPackCType *smpack = GetSmileyPack(hContact);
if (smpack == NULL) {
@@ -51,7 +51,7 @@ bool SmileyPackCListType::AddSmiley(HCONTACT hContact, TCHAR* path) }
-SmileyPackCType* SmileyPackCListType::GetSmileyPack(HCONTACT id)
+SmileyPackCType* SmileyPackCListType::GetSmileyPack(MCONTACT id)
{
for (int i = 0; i < m_SmileyPacks.getCount(); i++)
if (m_SmileyPacks[i].GetId() == id)
diff --git a/plugins/SmileyAdd/src/customsmiley.h b/plugins/SmileyAdd/src/customsmiley.h index 5ccfa5e04f..7e5f10b015 100644 --- a/plugins/SmileyAdd/src/customsmiley.h +++ b/plugins/SmileyAdd/src/customsmiley.h @@ -37,7 +37,7 @@ private: SmileyVectorType m_SmileyList;
SmileyLookupType m_SmileyLookup;
- HCONTACT m_id;
+ MCONTACT m_id;
void InsertLookup(SmileyCType& sml, CMString& lk, bool first);
void AddTriggersToSmileyLookup(void);
@@ -50,8 +50,8 @@ public: SmileyCType* GetSmiley(unsigned index) { return &m_SmileyList[index]; }
- HCONTACT GetId(void) { return m_id; }
- void SetId(HCONTACT id) { m_id = id; }
+ MCONTACT GetId(void) { return m_id; }
+ void SetId(MCONTACT id) { m_id = id; }
bool LoadSmileyDir(TCHAR* dir);
bool LoadSmiley(TCHAR* path);
@@ -69,12 +69,12 @@ private: public:
int NumberOfSmileyPacks(void) { return m_SmileyPacks.getCount(); }
- bool AddSmileyPack(HCONTACT hContact, TCHAR* dir);
- bool AddSmiley(HCONTACT hContact, TCHAR* path);
+ bool AddSmileyPack(MCONTACT hContact, TCHAR* dir);
+ bool AddSmiley(MCONTACT hContact, TCHAR* path);
void ClearAndFreeAll(void) { m_SmileyPacks.destroy(); }
- SmileyPackCType* GetSmileyPack(HCONTACT id);
+ SmileyPackCType* GetSmileyPack(MCONTACT id);
};
extern SmileyPackCListType g_SmileyPackCStore;
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 84723b91fa..426998964a 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // we are not supposed to use this object, so be aware
typedef struct NewMessageWindowLParam
{
- HCONTACT hContact;
+ MCONTACT hContact;
int isSend;
const char *szInitialText;
}
@@ -56,7 +56,7 @@ public: mutable HBITMAP hSmlBmp;
mutable HICON hSmlIco;
int idxLastChar;
- HCONTACT hContact;
+ MCONTACT hContact;
bool doSmileyReplace;
bool doSmileyButton;
bool OldButtonPlace;
@@ -267,7 +267,7 @@ int UpdateSrmmDlg(WPARAM wParam, LPARAM /* lParam */) {
WaitForSingleObject(g_hMutex, 2000);
for (int i=0; i < g_MsgWndList.getCount(); ++i) {
- if (wParam == 0 || g_MsgWndList[i]->hContact == (HCONTACT)wParam) {
+ if (wParam == 0 || g_MsgWndList[i]->hContact == (MCONTACT)wParam) {
SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, FALSE, 0);
SendMessage(g_MsgWndList[i]->hwnd, DM_OPTIONSAPPLIED, 0, 0);
SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, TRUE, 0);
@@ -290,7 +290,7 @@ static MsgWndData* IsMsgWnd(HWND hwnd) }
-static void MsgWndDetect(HWND hwndDlg, HCONTACT hContact, msgData* datm)
+static void MsgWndDetect(HWND hwndDlg, MCONTACT hContact, msgData* datm)
{
MsgWndData dat;
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 91050e25cd..ed70db98f7 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -211,11 +211,11 @@ void DestroyGdiPlus(void) }
}
-HCONTACT DecodeMetaContact(HCONTACT hContact)
+MCONTACT DecodeMetaContact(MCONTACT hContact)
{
if (hContact == NULL) return NULL;
- HCONTACT hReal = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
- if (hReal == NULL || hReal == (HCONTACT)CALLSERVICE_NOTFOUND)
+ MCONTACT hReal = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ if (hReal == NULL || hReal == (MCONTACT)CALLSERVICE_NOTFOUND)
hReal = hContact;
return hReal;
diff --git a/plugins/SmileyAdd/src/general.h b/plugins/SmileyAdd/src/general.h index f9c255e3fc..5d62528903 100644 --- a/plugins/SmileyAdd/src/general.h +++ b/plugins/SmileyAdd/src/general.h @@ -164,7 +164,7 @@ bool IsOldSrmm(void); int CalculateTextHeight(HDC hdc, CHARFORMAT2* chf);
const TCHAR* GetImageExt(CMString &fname);
-HCONTACT DecodeMetaContact(HCONTACT hContact);
+MCONTACT DecodeMetaContact(MCONTACT hContact);
bool IsSmileyProto(char* proto);
HICON ImageList_GetIconFixed (HIMAGELIST himl, INT i, UINT fStyle);
@@ -180,7 +180,7 @@ HICON GetDefaultIcon(bool copy = true); void CloseRichCallback(HWND hwnd);
void CloseRichOwnerCallback(HWND hwnd);
-bool SetRichCallback(HWND hwnd, HCONTACT hContact, bool subany, bool subnew);
+bool SetRichCallback(HWND hwnd, MCONTACT hContact, bool subany, bool subnew);
void SetRichOwnerCallback(HWND hwnd, HWND hwndInput, HWND hwndLog);
void ProcessAllInputAreas(bool restoreText);
void RichEditData_Destroy(void);
diff --git a/plugins/SmileyAdd/src/options.cpp b/plugins/SmileyAdd/src/options.cpp index 7fb45de5f0..3bf0895ab3 100644 --- a/plugins/SmileyAdd/src/options.cpp +++ b/plugins/SmileyAdd/src/options.cpp @@ -633,7 +633,7 @@ void OptionsType::WriteCustomCategories(const CMString& cats) }
-void OptionsType::ReadContactCategory(HCONTACT hContact, CMString& cats)
+void OptionsType::ReadContactCategory(MCONTACT hContact, CMString& cats)
{
DBVARIANT dbv;
INT_PTR res = db_get_ts(hContact, "SmileyAdd", "CustomCategory", &dbv);
@@ -644,7 +644,7 @@ void OptionsType::ReadContactCategory(HCONTACT hContact, CMString& cats) }
-void OptionsType::WriteContactCategory(HCONTACT hContact, const CMString& cats)
+void OptionsType::WriteContactCategory(MCONTACT hContact, const CMString& cats)
{
if (cats.IsEmpty())
db_unset(hContact, "SmileyAdd", "CustomCategory");
diff --git a/plugins/SmileyAdd/src/options.h b/plugins/SmileyAdd/src/options.h index ed953c5760..c7fcb9ebd2 100644 --- a/plugins/SmileyAdd/src/options.h +++ b/plugins/SmileyAdd/src/options.h @@ -48,10 +48,10 @@ public: static void ReadPackFileName(CMString& filename, const CMString& name,
const CMString& defaultFilename);
static void ReadCustomCategories(CMString& cats);
- static void ReadContactCategory(HCONTACT hContact, CMString& cats);
+ static void ReadContactCategory(MCONTACT hContact, CMString& cats);
static void WritePackFileName(const CMString& filename, const CMString& name);
static void WriteCustomCategories(const CMString& cats);
- static void WriteContactCategory(HCONTACT hContact, const CMString& cats);
+ static void WriteContactCategory(MCONTACT hContact, const CMString& cats);
};
extern OptionsType opt;
diff --git a/plugins/SmileyAdd/src/richcall.cpp b/plugins/SmileyAdd/src/richcall.cpp index 73579c0be9..9257a6c796 100644 --- a/plugins/SmileyAdd/src/richcall.cpp +++ b/plugins/SmileyAdd/src/richcall.cpp @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. struct RichEditData
{
HWND hwnd;
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hToolTip;
int tipActive;
bool inputarea;
@@ -312,7 +312,7 @@ static LRESULT CALLBACK RichEditSubclass(HWND hwnd, UINT uMsg, WPARAM wParam, LP return result;
}
-bool SetRichCallback(HWND hwnd, HCONTACT hContact, bool subany, bool subnew)
+bool SetRichCallback(HWND hwnd, MCONTACT hContact, bool subany, bool subnew)
{
RichEditData* rdt = g_RichEditList.find((RichEditData*)&hwnd);
if (rdt == NULL) {
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index f7db0a0b94..66a5af8009 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -23,7 +23,7 @@ LIST<void> menuHandleArray(5); //implementation of service functions
-SmileyPackType* GetSmileyPack(const char* proto, HCONTACT hContact, SmileyPackCType** smlc)
+SmileyPackType* GetSmileyPack(const char* proto, MCONTACT hContact, SmileyPackCType** smlc)
{
hContact = DecodeMetaContact(hContact);
if (smlc)
@@ -100,7 +100,7 @@ INT_PTR ShowSmileySelectionCommand(WPARAM, LPARAM lParam) if (smaddInfo == NULL || smaddInfo->cbSize < SMADD_SHOWSEL_SIZE_V1) return FALSE;
HWND parent = smaddInfo->cbSize > SMADD_SHOWSEL_SIZE_V1 ? smaddInfo->hwndParent : NULL;
- HCONTACT hContact = smaddInfo->cbSize > SMADD_SHOWSEL_SIZE_V2 ? smaddInfo->hContact : NULL;
+ MCONTACT hContact = smaddInfo->cbSize > SMADD_SHOWSEL_SIZE_V2 ? smaddInfo->hContact : NULL;
SmileyToolWindowParam *stwp = new SmileyToolWindowParam;
stwp->pSmileyPack = GetSmileyPack(smaddInfo->Protocolname, hContact);
@@ -155,7 +155,7 @@ INT_PTR GetSmileyIconCommand(WPARAM, LPARAM lParam) static int GetInfoCommandE(SMADD_INFO2* smre, bool retDup)
{
if (smre == NULL || smre->cbSize < SMADD_INFO_SIZE_V1) return FALSE;
- HCONTACT hContact = smre->cbSize > SMADD_INFO_SIZE_V1 ? smre->hContact : NULL;
+ MCONTACT hContact = smre->cbSize > SMADD_INFO_SIZE_V1 ? smre->hContact : NULL;
SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname, hContact);
@@ -282,7 +282,7 @@ INT_PTR ParseTextBatch(WPARAM, LPARAM lParam) SMADD_BATCHPARSE2* smre = (SMADD_BATCHPARSE2*) lParam;
if (smre == NULL || smre->cbSize < SMADD_BATCHPARSE_SIZE_V1) return FALSE;
- HCONTACT hContact = smre->cbSize > SMADD_BATCHPARSE_SIZE_V1 ? smre->hContact : NULL;
+ MCONTACT hContact = smre->cbSize > SMADD_BATCHPARSE_SIZE_V1 ? smre->hContact : NULL;
SmileyPackCType* smcp = NULL;
SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname, hContact,
@@ -356,7 +356,7 @@ INT_PTR RegisterPack(WPARAM, LPARAM lParam) INT_PTR CustomCatMenu(WPARAM wParam, LPARAM lParam)
{
- const HCONTACT hContact = (HCONTACT)wParam;
+ const MCONTACT hContact = (MCONTACT)wParam;
if (lParam != 0)
{
SmileyCategoryType* smct = g_SmileyCategories.GetSmileyCategory((unsigned)lParam - 3);
@@ -382,7 +382,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) {
SmileyCategoryListType::SmileyCategoryVectorType& smc = *g_SmileyCategories.GetSmileyCategoryList();
- char* protnam = GetContactProto((HCONTACT)wParam);
+ char* protnam = GetContactProto((MCONTACT)wParam);
bool haveMenu = IsSmileyProto(protnam);
if (haveMenu && opt.UseOneForAll) {
unsigned cnt = 0;
@@ -399,7 +399,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) if (haveMenu) {
CMString cat;
- opt.ReadContactCategory((HCONTACT)wParam, cat);
+ opt.ReadContactCategory((MCONTACT)wParam, cat);
CLISTMENUITEM mi = { sizeof(mi) };
mi.hParentMenu = hContactMenuItem;
@@ -540,7 +540,7 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam) int DbSettingChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
if (hContact == NULL) return 0;
diff --git a/plugins/SmileyAdd/src/services.h b/plugins/SmileyAdd/src/services.h index 21ee912e79..8121ef0203 100644 --- a/plugins/SmileyAdd/src/services.h +++ b/plugins/SmileyAdd/src/services.h @@ -38,7 +38,7 @@ INT_PTR LoadContactSmileys(WPARAM, LPARAM lParam); int AccountListChanged(WPARAM wParam, LPARAM lParam);
int DbSettingChanged(WPARAM wParam, LPARAM lParam);
-SmileyPackType* GetSmileyPack(const char* proto, HCONTACT hContact = NULL, SmileyPackCType** smlc = NULL);
+SmileyPackType* GetSmileyPack(const char* proto, MCONTACT hContact = NULL, SmileyPackCType** smlc = NULL);
#endif // SMILEYADD_SERVICES_H_
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 51e1fafb8d..10446dbfc2 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -152,7 +152,7 @@ SmileyType* SmileyPackType::GetSmiley(unsigned index) }
-static DWORD_PTR ConvertServiceParam(HCONTACT hContact, const TCHAR *param)
+static DWORD_PTR ConvertServiceParam(MCONTACT hContact, const TCHAR *param)
{
DWORD_PTR ret;
if (param == NULL)
@@ -168,7 +168,7 @@ static DWORD_PTR ConvertServiceParam(HCONTACT hContact, const TCHAR *param) }
-void SmileyType::CallSmileyService(HCONTACT hContact)
+void SmileyType::CallSmileyService(MCONTACT hContact)
{
_TPattern * srvsplit = _TPattern::compile(_T("(.*)\\|(.*)\\|(.*)"));
_TMatcher * m0 = srvsplit->createTMatcher(GetTriggerText());
@@ -856,7 +856,7 @@ void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc) {
CMString tname(A2T_SM(acc->szModuleName));
- 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* proto = GetContactProto(hContact);
if (proto == NULL)
continue;
@@ -878,7 +878,7 @@ void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc) }
}
-void SmileyCategoryListType::AddContactTransportAsCategory(HCONTACT hContact, const CMString& defaultFile)
+void SmileyCategoryListType::AddContactTransportAsCategory(MCONTACT hContact, const CMString& defaultFile)
{
char* proto = GetContactProto(hContact);
if (proto == NULL) return;
@@ -944,7 +944,7 @@ void SmileyCategoryListType::AddAllProtocolsAsCategory(void) for (int i = 0; i < protoCount; i++)
AddAccountAsCategory(accList[i], defaultFile);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
AddContactTransportAsCategory(hContact, defaultFile);
CMString cats;
diff --git a/plugins/SmileyAdd/src/smileys.h b/plugins/SmileyAdd/src/smileys.h index 4e7d95f6fa..d0ed2756c9 100644 --- a/plugins/SmileyAdd/src/smileys.h +++ b/plugins/SmileyAdd/src/smileys.h @@ -76,7 +76,7 @@ public: HICON GetIconDup(void);
HBITMAP GetBitmap(COLORREF bkgClr, int sizeX, int sizeY);
- void CallSmileyService(HCONTACT hContact);
+ void CallSmileyService(MCONTACT hContact);
void SetHidden(bool hid) { SetFlagsBit(HiddenSmiley, hid); }
void SetRegEx(bool regex) { SetFlagsBit(RegExSmiley, regex); }
@@ -291,7 +291,7 @@ public: void AddAndLoad(const CMString& name, const CMString& displayName);
void AddAllProtocolsAsCategory(void);
void AddAccountAsCategory(PROTOACCOUNT *acc, const CMString& defaultFile);
- void AddContactTransportAsCategory(HCONTACT hContact, const CMString& defaultFile);
+ void AddContactTransportAsCategory(MCONTACT hContact, const CMString& defaultFile);
void ClearAndLoadAll(void);
void ClearAll(void)
diff --git a/plugins/SmileyAdd/src/smltool.cpp b/plugins/SmileyAdd/src/smltool.cpp index 821173887b..e8adc50c89 100644 --- a/plugins/SmileyAdd/src/smltool.cpp +++ b/plugins/SmileyAdd/src/smltool.cpp @@ -45,7 +45,7 @@ private: int m_Direction;
UINT m_TargetMessage;
WPARAM m_TargetWParam;
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
int rowSel;
bool m_Choosing;
@@ -171,10 +171,10 @@ LRESULT SmileyToolWindowType::DialogProcedure(UINT msg, WPARAM wParam, LPARAM lP struct smlsrvstruct
{
- smlsrvstruct(SmileyType *tsml, HCONTACT thContact)
+ smlsrvstruct(SmileyType *tsml, MCONTACT thContact)
: sml(tsml), hContact(thContact) {}
SmileyType *sml;
- HCONTACT hContact;
+ MCONTACT hContact;
};
void CALLBACK smileyServiceCallback(void* arg)
diff --git a/plugins/SmileyAdd/src/smltool.h b/plugins/SmileyAdd/src/smltool.h index ccdab2511e..76a9c7e06e 100644 --- a/plugins/SmileyAdd/src/smltool.h +++ b/plugins/SmileyAdd/src/smltool.h @@ -32,7 +32,7 @@ struct SmileyToolWindowParam HWND hWndParent;
UINT targetMessage;
WPARAM targetWParam;
- HCONTACT hContact;
+ MCONTACT hContact;
};
|