summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-09-27 20:17:40 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-09-27 20:17:40 +0000
commitb03e423cdb55d973230e20842bfc0fd826718201 (patch)
tree798fd755efb65e1144701764d397e18f8d40aff4 /protocols
parent68d2b18623f74651c5fd5fbd34cf585653edc1c8 (diff)
added protocol icon
git-svn-id: http://svn.miranda-ng.org/main/trunk@1693 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Skype/Skype.vcxproj1
-rw-r--r--protocols/Skype/Skype.vcxproj.filters3
-rw-r--r--protocols/Skype/src/skype.cpp2
-rw-r--r--protocols/Skype/src/skype.h6
-rw-r--r--protocols/Skype/src/skype_events.cpp3
-rw-r--r--protocols/Skype/src/skype_icons.cpp6
-rw-r--r--protocols/Skype/src/skype_proto.cpp11
7 files changed, 24 insertions, 8 deletions
diff --git a/protocols/Skype/Skype.vcxproj b/protocols/Skype/Skype.vcxproj
index e98db9ce2f..278c9c5f2e 100644
--- a/protocols/Skype/Skype.vcxproj
+++ b/protocols/Skype/Skype.vcxproj
@@ -107,6 +107,7 @@
<ClCompile Include="src\skype.cpp" />
<ClCompile Include="src\skype_dialogs.cpp" />
<ClCompile Include="src\skype_events.cpp" />
+ <ClCompile Include="src\skype_icons.cpp" />
<ClCompile Include="src\skype_proto.cpp" />
<ClCompile Include="src\skype_settings.cpp" />
<ClCompile Include="src\skype_subclassing.cpp" />
diff --git a/protocols/Skype/Skype.vcxproj.filters b/protocols/Skype/Skype.vcxproj.filters
index f830252540..a9d8ee45eb 100644
--- a/protocols/Skype/Skype.vcxproj.filters
+++ b/protocols/Skype/Skype.vcxproj.filters
@@ -22,6 +22,9 @@
<ClCompile Include="src\skype_utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\skype_icons.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\resource.h">
diff --git a/protocols/Skype/src/skype.cpp b/protocols/Skype/src/skype.cpp
index 1f6edceb20..418d4040ed 100644
--- a/protocols/Skype/src/skype.cpp
+++ b/protocols/Skype/src/skype.cpp
@@ -103,6 +103,8 @@ extern "C" int __declspec(dllexport) Load(void)
pd.fnUninit = (pfnUninitProto)SkypeProtoUninit;
CallService(MS_PROTO_REGISTERMODULE, 0, reinterpret_cast<LPARAM>(&pd));
+ IconsLoad();
+
return 0;
}
diff --git a/protocols/Skype/src/skype.h b/protocols/Skype/src/skype.h
index 2c16c608cf..469e2373a6 100644
--- a/protocols/Skype/src/skype.h
+++ b/protocols/Skype/src/skype.h
@@ -27,12 +27,12 @@
#include <m_protomod.h>
#include <m_protosvc.h>
#include <m_protoint.h>
-//#include <m_skin.h>
+#include <m_skin.h>
//#include <statusmodes.h>
//#include <m_system.h>
//#include <m_userinfo.h>
//#include <m_addcontact.h>
-//#include <m_icolib.h>
+#include <m_icolib.h>
#include <m_utils.h>
#include <m_system_cpp.h>
//#include <m_hotkeys.h>
@@ -63,6 +63,8 @@ extern HINSTANCE g_hInstance;
#include "skype_subclassing.h"
+void IconsLoad();
+
static const char* g_keyFileName = "..\\..\\..\\SkypeKit\\keypair.crt";
extern CSkype* g_skype;
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp
index d899e593b8..1546ed6e85 100644
--- a/protocols/Skype/src/skype_events.cpp
+++ b/protocols/Skype/src/skype_events.cpp
@@ -1,10 +1,7 @@
#include "skype_proto.h"
-//void IconsLoad();
-
int CSkypeProto::OnModulesLoaded(WPARAM, LPARAM)
{
- //IconsLoad();
this->HookEvent(ME_OPT_INITIALISE, &CSkypeProto::OnOptionsInit);
return 0;
diff --git a/protocols/Skype/src/skype_icons.cpp b/protocols/Skype/src/skype_icons.cpp
index cbd893fb2d..db213b8197 100644
--- a/protocols/Skype/src/skype_icons.cpp
+++ b/protocols/Skype/src/skype_icons.cpp
@@ -17,17 +17,19 @@ void IconsLoad()
{
TCHAR szFile[MAX_PATH];
char szSettingName[100];
+ TCHAR szSectionName[100];
SKINICONDESC sid = {0};
unsigned i;
- GetModuleFileName(hInst, szFile, MAX_PATH);
+ GetModuleFileName(g_hInstance, szFile, MAX_PATH);
sid.cbSize = sizeof(SKINICONDESC);
sid.flags = SIDF_ALL_TCHAR;
sid.ptszDefaultFile = szFile;
sid.pszName = szSettingName;
- sid.ptszSection = _T(MODULE);
+ sid.ptszSection = szSectionName;
+ mir_sntprintf(szSectionName, SIZEOF(szSectionName), _T("%s/%s"), LPGENT("Protocols"), LPGENT(MODULE));
for (i = 0; i < SIZEOF(iconList); i++)
{
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", MODULE, iconList[i].szName);
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index 9f9918aa60..498239053b 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -74,7 +74,16 @@ DWORD_PTR __cdecl CSkypeProto:: GetCaps(int type, HANDLE hContact)
}
}
-HICON __cdecl CSkypeProto::GetIcon( int iconIndex ) { return 0; }
+HICON __cdecl CSkypeProto::GetIcon( int iconIndex )
+{
+ if (LOWORD(iconIndex) == PLI_PROTOCOL)
+ {
+ HICON ico = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"Skype_main");
+ return CopyIcon(ico);
+ } else
+ return 0;
+}
+
int __cdecl CSkypeProto::GetInfo( HANDLE hContact, int infoType ) { return 0; }
HANDLE __cdecl CSkypeProto::SearchBasic( const TCHAR* id ) { return 0; }