diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-21 07:14:20 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-21 07:14:20 +0000 |
commit | e3c5e2d3c36dded39795fb065b382452a9259084 (patch) | |
tree | 6717269cae3685d5e30d42de51aafccec3d22f16 | |
parent | 8e2c9664fc513802d8dee642f4214c227e227993 (diff) |
Tipper:
*Support for Unicode Fingerprint Service (if it exists)
*Fix for the preview image (seems there is a bug in m_folders.h, will ask Eblis)
*minor optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@114 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/TipperYM/options.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/popwin.cpp | 24 |
2 files changed, 19 insertions, 7 deletions
diff --git a/plugins/TipperYM/options.cpp b/plugins/TipperYM/options.cpp index 597f0eb76b..d5946cae76 100644 --- a/plugins/TipperYM/options.cpp +++ b/plugins/TipperYM/options.cpp @@ -1946,7 +1946,7 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (opt.szPreviewFile[0])
{
HDC hdcMem = CreateCompatibleDC(dis->hDC);
- HBITMAP hbmpPreview = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)opt.szPreviewFile, 0);
+ HBITMAP hbmpPreview = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)opt.szPreviewFile, IMGL_TCHAR);
if (hbmpPreview)
{
int iWidth = dis->rcItem.right - dis->rcItem.left;
diff --git a/plugins/TipperYM/popwin.cpp b/plugins/TipperYM/popwin.cpp index ce98801312..38acd9e6b6 100644 --- a/plugins/TipperYM/popwin.cpp +++ b/plugins/TipperYM/popwin.cpp @@ -91,11 +91,13 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (CallService(MS_PROTO_ISACCOUNTLOCKED,0,(LPARAM)pwd->clcit.szProto))
mir_sntprintf(pwd->swzTitle, SIZEOF(pwd->swzTitle), TranslateT("%s (locked)"), pwd->swzTitle);
+ // protocol status
+ WORD wStatus = (WORD)CallProtoService(pwd->clcit.szProto, PS_GETSTATUS, 0, 0);
+
// get status icon
if (pwd->bIsIconVisible[0])
{
- WORD status = CallProtoService(pwd->clcit.szProto, PS_GETSTATUS, 0, 0);
- pwd->extraIcons[0].hIcon = LoadSkinnedProtoIcon(pwd->clcit.szProto, status);
+ pwd->extraIcons[0].hIcon = LoadSkinnedProtoIcon(pwd->clcit.szProto, wStatus);
pwd->extraIcons[0].bDestroy = false;
}
@@ -134,8 +136,6 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa }
}
- // protocol status
- WORD wStatus = (WORD)CallProtoService(pwd->clcit.szProto, PS_GETSTATUS, 0, 0);
TCHAR *swzText = (TCHAR *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, wStatus, GSMDF_TCHAR);
if (swzText)
{
@@ -461,6 +461,19 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa // fingerprint icon
if (pwd->bIsIconVisible[5])
{
+#ifdef _UNICODE
+ if (ServiceExists(MS_FP_GETCLIENTICONT))
+ {
+ for (i = 0; opt.exIconsOrder[i] != 5; i++);
+ if (!DBGetContactSettingTString(pwd->hContact, szProto, "MirVer", &dbv))
+ {
+ pwd->extraIcons[i].hIcon = (HICON)CallService(MS_FP_GETCLIENTICONT, (WPARAM)dbv.ptszVal, 0);
+ pwd->extraIcons[i].bDestroy = true;
+ DBFreeVariant(&dbv);
+ }
+ }
+ else
+#endif
if (ServiceExists(MS_FP_GETCLIENTICON))
{
for (i = 0; opt.exIconsOrder[i] != 5; i++);
@@ -1897,13 +1910,12 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa {
if (DBGetContactSettingDword(0, MODULE, "FavouriteContactsCount", 0))
{
- HANDLE hContact;
TCHAR swzName[256];
TCHAR swzStatus[256];
bool bTitlePainted = false;
int iCount = 0, iCountOnline = 0;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
while (hContact)
{
if (DBGetContactSettingByte(hContact, MODULE, "FavouriteContact", 0))
|