summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-26 17:38:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-26 17:38:31 +0300
commitdea9c030340e50324eba97c72a27c151bed12e1c (patch)
tree6fc156f40f52a9fc6e6b29e60001959477ee1a5e /protocols/JabberG
parentc6e8f8223cab9d799593b7b2cfa22134aa9745d6 (diff)
AdvaImg:
- freeimage extracted to the separate library; - FI_INTERFACE removed, all references to it are replaced with direct calls of FreeImage_* functions; - unified project for AdvaImg
Diffstat (limited to 'protocols/JabberG')
-rwxr-xr-xprotocols/JabberG/jabber.vcxproj3
-rwxr-xr-xprotocols/JabberG/src/jabber.cpp7
-rwxr-xr-xprotocols/JabberG/src/jabber_userinfo.cpp2
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp2
-rw-r--r--protocols/JabberG/src/stdafx.h2
5 files changed, 5 insertions, 11 deletions
diff --git a/protocols/JabberG/jabber.vcxproj b/protocols/JabberG/jabber.vcxproj
index c6efee4881..74dddceefa 100755
--- a/protocols/JabberG/jabber.vcxproj
+++ b/protocols/JabberG/jabber.vcxproj
@@ -35,6 +35,9 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ProjectReference Include="..\..\libs\freeimage\freeimage.vcxproj">
+ <Project>{5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}</Project>
+ </ProjectReference>
<ProjectReference Include="..\..\libs\libaxolotl\libaxolotl.vcxproj">
<Project>{620e0be7-3763-4f35-9dbd-4770104e269c}</Project>
</ProjectReference>
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp
index 3a5282312c..fe30a49b98 100755
--- a/protocols/JabberG/src/jabber.cpp
+++ b/protocols/JabberG/src/jabber.cpp
@@ -60,7 +60,6 @@ PLUGININFOEX pluginInfo = {
};
CLIST_INTERFACE* pcli;
-FI_INTERFACE *FIP = nullptr;
HANDLE hExtraActivity = nullptr;
HANDLE hExtraMood = nullptr;
@@ -186,12 +185,6 @@ extern "C" int __declspec(dllexport) Load()
pci = Chat_GetInterface();
pcli = Clist_GetInterface();
- INT_PTR result = CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&FIP);
- if (FIP == nullptr || result != S_OK) {
- MessageBoxEx(nullptr, TranslateT("Fatal error, image services not found. Jabber Protocol will be disabled."), L"Error", MB_OK | MB_ICONERROR | MB_APPLMODAL, 0);
- return 1;
- }
-
char mirVer[100];
Miranda_GetVersionText(mirVer, _countof(mirVer));
mir_wstrcpy(szCoreVersion, _A2T(mirVer));
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index 02bf04ef50..ca396d758e 100755
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -658,7 +658,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP
if (item->photoFileName) {
photoInfo->ppro->debugLogW(L"Showing picture from %s", item->photoFileName);
photoInfo->hBitmap = Bitmap_Load(item->photoFileName);
- FIP->FI_Premultiply(photoInfo->hBitmap);
+ FreeImage_Premultiply(photoInfo->hBitmap);
ShowWindow(GetDlgItem(hwndDlg, IDC_SAVE), SW_SHOW);
}
}
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index e775b2b199..3191ea28de 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -296,7 +296,7 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
dat->ppro->debugLogW(L"Temp file = %s", szTempFileName);
if (CopyFile(szAvatarFileName, szTempFileName, FALSE) == TRUE) {
if ((dat->hBitmap = Bitmap_Load(szTempFileName)) != nullptr) {
- FIP->FI_Premultiply(dat->hBitmap);
+ FreeImage_Premultiply(dat->hBitmap);
mir_wstrcpy(dat->ppro->m_szPhotoFileName, szTempFileName);
EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), TRUE);
}
diff --git a/protocols/JabberG/src/stdafx.h b/protocols/JabberG/src/stdafx.h
index bbd82c7425..e9b233babc 100644
--- a/protocols/JabberG/src/stdafx.h
+++ b/protocols/JabberG/src/stdafx.h
@@ -587,8 +587,6 @@ extern unsigned int g_nTempFileId;
extern int g_cbCountries;
extern struct CountryListEntry* g_countries;
-extern FI_INTERFACE *FIP;
-
extern HANDLE hExtListInit, hDiscoInfoResult;
extern bool bSecureIM, bMirOTR, bNewGPG, bPlatform;