summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-08-29 19:50:22 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-08-29 19:50:22 +0000
commit3ad0e7bcb4d239cdc7d1eba66c13318b8d4d6895 (patch)
tree04695c307c5100761c4e618f5f89ccb09b9180f9 /plugins
parente1690a2bc1c63a18ea015627920f0a7e98723cb1 (diff)
Toaster: reverted :-(
git-svn-id: http://svn.miranda-ng.org/main/trunk@15105 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Toaster/src/avatars.cpp2
-rw-r--r--plugins/Toaster/src/avatars.h28
-rw-r--r--plugins/Toaster/src/main.cpp2
-rw-r--r--plugins/Toaster/src/services.cpp10
-rw-r--r--plugins/Toaster/src/stdafx.h4
5 files changed, 0 insertions, 46 deletions
diff --git a/plugins/Toaster/src/avatars.cpp b/plugins/Toaster/src/avatars.cpp
deleted file mode 100644
index 716dda68f1..0000000000
--- a/plugins/Toaster/src/avatars.cpp
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "stdafx.h"
-
diff --git a/plugins/Toaster/src/avatars.h b/plugins/Toaster/src/avatars.h
deleted file mode 100644
index 9321b6bfbf..0000000000
--- a/plugins/Toaster/src/avatars.h
+++ /dev/null
@@ -1,28 +0,0 @@
-class ToasterAvatar
-{
- ptrW wszPath;
- int iFormat;
- MCONTACT hContact;
- FIBITMAP *bitmap;
-
-public:
- ToasterAvatar(PROTO_AVATAR_INFORMATION *pai) : wszPath(pai->filename), iFormat(pai->format), hContact(pai->hContact)
- {
- bitmap = (FIBITMAP*)CallService(MS_IMG_LOAD, (WPARAM)wszPath, IMGL_WCHAR | IMGL_RETURNDIB);
- }
-
- ~ToasterAvatar()
- {
- CallService(MS_IMG_UNLOAD, (WPARAM)bitmap);
- }
-
- INT_PTR Save(const wchar_t *wszSavePath)
- {
- IMGSRVC_INFO isi = { sizeof(isi) };
- isi.wszName = mir_wstrdup(wszSavePath);
- isi.dib = bitmap;
- isi.dwMask = IMGI_FBITMAP;
- isi.fif = FREE_IMAGE_FORMAT::FIF_PNG;
- return CallService(MS_IMG_SAVE, (WPARAM)&isi, IMGL_WCHAR);
- }
-}; \ No newline at end of file
diff --git a/plugins/Toaster/src/main.cpp b/plugins/Toaster/src/main.cpp
index eb8a9e50f1..ccfedcefa1 100644
--- a/plugins/Toaster/src/main.cpp
+++ b/plugins/Toaster/src/main.cpp
@@ -3,7 +3,6 @@
int hLangpack;
HINSTANCE g_hInstance;
-HANDLE g_hTempAvatarsFolder;
PLUGININFOEX pluginInfo =
{
@@ -41,7 +40,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- g_hTempAvatarsFolder = FoldersRegisterCustomPathT(MODULE, Translate("Temp avatars"), VARSW(L"%miranda_userdata%\\Temp"));
HookEvent(ME_SYSTEM_PRESHUTDOWN, &OnPreShutdown);
InitServices();
diff --git a/plugins/Toaster/src/services.cpp b/plugins/Toaster/src/services.cpp
index 323eb50b72..03475b5f38 100644
--- a/plugins/Toaster/src/services.cpp
+++ b/plugins/Toaster/src/services.cpp
@@ -46,16 +46,6 @@ static void ShowToastNotification(TCHAR* text, TCHAR* title, MCONTACT hContact)
PROTO_AVATAR_INFORMATION pai = { 0 };
pai.hContact = hContact;
CallProtoService(szProto, PS_GETAVATARINFO, (WPARAM)0, (LPARAM)&pai);
- if (pai.format != PA_FORMAT_PNG)
- {
- wchar_t dir[MAX_PATH];
- FoldersGetCustomPathT(g_hTempAvatarsFolder, dir, _countof(dir), VARSW(L"%miranda_userdata%\\Temp"));
- ToasterAvatar *ta = new ToasterAvatar(&pai);
- CMStringW wszPath(FORMAT, L"%s\\%lld.%d.png", dir, hContact, db_get_dw(hContact, "ContactPhoto", "ImageHash"));
- ta->Save(wszPath);
- imagePath = wszPath.Detach();
- delete ta;
- }
imagePath = pai.filename[0] ? mir_tstrdup(pai.filename) : nullptr;
}
}
diff --git a/plugins/Toaster/src/stdafx.h b/plugins/Toaster/src/stdafx.h
index 01c4b0e0d6..d198146e97 100644
--- a/plugins/Toaster/src/stdafx.h
+++ b/plugins/Toaster/src/stdafx.h
@@ -16,8 +16,6 @@
#include <m_popup.h>
#include <m_message.h>
#include <m_chat.h>
-#include <m_imgsrvc.h>
-#include <m_folders.h>
#include "version.h"
#include "resource.h"
@@ -32,12 +30,10 @@ DEFINE_PROPERTYKEY(PKEY_AppUserModel_ID, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0,
#include "toast_event_handler.h"
#include "toast_notification.h"
#include "add_to_start_menu.h"
-#include "avatars.h"
extern HINSTANCE g_hInstance;
extern mir_cs csNotifications;
extern OBJLIST<ToastNotification> lstNotifications;
-extern HANDLE g_hTempAvatarsFolder;
struct callbackArg
{