summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10>2012-03-06 10:13:13 +0000
committer(no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10>2012-03-06 10:13:13 +0000
commitfa3cdddd7fa6c0b50b117709da605a524e36117a (patch)
treed5c313121131c85cd1cdfa99298795736edb9a7b
parentbee94b5c80be73abd32db65d68d7acaaf5738883 (diff)
Compatibility with Unicode avatars
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@597 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r--tipper/popwin.cpp28
-rw-r--r--tipper/tipper_9.vcproj12
-rw-r--r--tipper/version.h4
3 files changed, 18 insertions, 26 deletions
diff --git a/tipper/popwin.cpp b/tipper/popwin.cpp
index d0cbf4f..79f6f17 100644
--- a/tipper/popwin.cpp
+++ b/tipper/popwin.cpp
@@ -262,7 +262,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
PROTO_AVATAR_INFORMATION AI = {0};
AI.cbSize = sizeof(AI);
AI.hContact = pwd->hContact;
- CallService(svc, (WPARAM)GAIF_FORCE, (LPARAM)&AI);
+ CallService(svc, 0, (LPARAM)&AI);
}
SendMessage(hwnd, PUM_REFRESH_VALUES, 0, 0);
}
@@ -574,7 +574,6 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
}
if(pwd->rows) free(pwd->rows);
- if(pwd->hBm) DeleteObject(pwd->hBm);
free(pwd); pwd = 0;
SetWindowLongPtr(hwnd, GWLP_USERDATA, 0);
}
@@ -730,25 +729,24 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
// avatar height
pwd->av_height = 0;
- if(!pwd->text_tip && options.av_layout != PAV_NONE && ServiceExists(MS_AV_DRAWAVATAR)) {
+ if (!pwd->text_tip && options.av_layout != PAV_NONE && ServiceExists(MS_AV_DRAWAVATAR))
+ {
AVATARCACHEENTRY *ace = 0;
- if(pwd->hContact) ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)pwd->hContact, 0);
+ if (pwd->hContact) ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)pwd->hContact, 0);
else ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)pwd->clcit.proto);
- if(ace && (ace->dwFlags & AVS_BITMAP_VALID) && !(ace->dwFlags & AVS_HIDEONCLIST)) {
- if(pwd->hBm) DeleteObject(pwd->hBm);
- pwd->hBm = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)ace->szFilename);
- BITMAP bm;
- GetObject(pwd->hBm, sizeof(bm), &bm);
- if(options.no_resize_av || (bm.bmHeight <= options.av_size && bm.bmWidth <= options.av_size)) {
- pwd->real_av_width = bm.bmWidth;
- pwd->real_av_height = bm.bmHeight;
+ if (ace && (ace->dwFlags & AVS_BITMAP_VALID) && !(ace->dwFlags & AVS_HIDEONCLIST))
+ {
+ pwd->hBm = ace->hbmPic;
+ if (options.no_resize_av || (ace->bmHeight <= options.av_size && ace->bmWidth <= options.av_size)) {
+ pwd->real_av_width = ace->bmWidth;
+ pwd->real_av_height = ace->bmHeight;
} else {
- if(bm.bmHeight >= bm.bmWidth) {
+ if (ace->bmHeight >= ace->bmWidth) {
pwd->real_av_height = options.av_size;
- pwd->real_av_width = (int)(options.av_size * (bm.bmWidth / (double)bm.bmHeight));
+ pwd->real_av_width = options.av_size * ace->bmWidth / ace->bmHeight;
} else {
- pwd->real_av_height = (int)(options.av_size * (bm.bmHeight / (double)bm.bmWidth));
+ pwd->real_av_height = options.av_size * ace->bmHeight / ace->bmWidth;
pwd->real_av_width = options.av_size;
}
}
diff --git a/tipper/tipper_9.vcproj b/tipper/tipper_9.vcproj
index d20201d..b60fdbc 100644
--- a/tipper/tipper_9.vcproj
+++ b/tipper/tipper_9.vcproj
@@ -482,7 +482,7 @@
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="comctl32.lib"
- OutputFile="c:\miranda im\plugins\$(ProjectName).dll"
+ OutputFile="\miranda im\plugins\$(ProjectName).dll"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="2"
@@ -537,7 +537,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="3"
+ Optimization="1"
InlineFunctionExpansion="1"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="2"
@@ -554,7 +554,6 @@
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="common.h"
WarningLevel="3"
- DebugInformationFormat="3"
DisableSpecificWarnings="4996"
/>
<Tool
@@ -571,8 +570,6 @@
IgnoreImportLibrary="true"
AdditionalDependencies="comctl32.lib"
IgnoreDefaultLibraryNames=""
- GenerateDebugInformation="true"
- SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
@@ -627,7 +624,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="3"
+ Optimization="1"
InlineFunctionExpansion="1"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="2"
@@ -644,7 +641,6 @@
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="common.h"
WarningLevel="3"
- DebugInformationFormat="3"
DisableSpecificWarnings="4996"
/>
<Tool
@@ -661,8 +657,6 @@
IgnoreImportLibrary="true"
AdditionalDependencies="comctl32.lib"
IgnoreDefaultLibraryNames=""
- GenerateDebugInformation="true"
- SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
diff --git a/tipper/version.h b/tipper/version.h
index fbd8045..ce7c948 100644
--- a/tipper/version.h
+++ b/tipper/version.h
@@ -4,12 +4,12 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 4
#define __RELEASE_NUM 1
-#define __BUILD_NUM 8
+#define __BUILD_NUM 9
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
#define __STRINGIFY(x) #x
-#define __VERSION_STRING "0.4.1.8"
+#define __VERSION_STRING "0.4.1.9"
#define __DESC "Tool Tip notification windows"
#define __AUTHOR "Scott Ellis"