diff options
author | George Hazan <ghazan@miranda.im> | 2022-12-05 20:20:50 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-12-05 20:20:50 +0300 |
commit | 3484d2d1aafb294f387ef5b3e42f04e5129ab55a (patch) | |
tree | 8b0b01d0c03b031b65c708b5c1ee4feeed0288e1 /protocols | |
parent | 1c7167406020c45856358a95c1ade1aa217dccd3 (diff) |
Telegram: protocol icons
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Telegram/Telegram.vcxproj | 4 | ||||
-rw-r--r-- | protocols/Telegram/Telegram.vcxproj.filters | 8 | ||||
-rw-r--r-- | protocols/Telegram/proto_telegram/CMakeLists.txt | 2 | ||||
-rw-r--r-- | protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj | 34 | ||||
-rw-r--r-- | protocols/Telegram/proto_telegram/Proto_Tox.vcxproj.filters | 14 | ||||
-rw-r--r-- | protocols/Telegram/proto_telegram/res/Offline.ico | bin | 0 -> 3638 bytes | |||
-rw-r--r-- | protocols/Telegram/proto_telegram/res/Online.ico | bin | 0 -> 3638 bytes | |||
-rw-r--r-- | protocols/Telegram/proto_telegram/res/Proto_Telegram.rc | 71 | ||||
-rw-r--r-- | protocols/Telegram/proto_telegram/src/resource.h | 19 | ||||
-rw-r--r-- | protocols/Telegram/src/main.cpp | 2 | ||||
-rw-r--r-- | protocols/Telegram/src/mt_proto.cpp | 12 |
11 files changed, 164 insertions, 2 deletions
diff --git a/protocols/Telegram/Telegram.vcxproj b/protocols/Telegram/Telegram.vcxproj index 9a2b9c5540..b0f02c7588 100644 --- a/protocols/Telegram/Telegram.vcxproj +++ b/protocols/Telegram/Telegram.vcxproj @@ -59,4 +59,8 @@ <Project>{e2a369cd-eda3-414f-8ad0-e732cd7ee68c}</Project> </ProjectReference> </ItemGroup> + <ItemGroup> + <ResourceCompile Include="res\resource.rc" /> + <ResourceCompile Include="res\version.rc" /> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/protocols/Telegram/Telegram.vcxproj.filters b/protocols/Telegram/Telegram.vcxproj.filters index d3789956d9..397701677d 100644 --- a/protocols/Telegram/Telegram.vcxproj.filters +++ b/protocols/Telegram/Telegram.vcxproj.filters @@ -39,4 +39,12 @@ <Filter>Header Files</Filter> </ClInclude> </ItemGroup> + <ItemGroup> + <ResourceCompile Include="res\version.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + <ResourceCompile Include="res\resource.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/protocols/Telegram/proto_telegram/CMakeLists.txt b/protocols/Telegram/proto_telegram/CMakeLists.txt new file mode 100644 index 0000000000..223ee6af39 --- /dev/null +++ b/protocols/Telegram/proto_telegram/CMakeLists.txt @@ -0,0 +1,2 @@ +set(TARGET Proto_Telegram) +include(${CMAKE_SOURCE_DIR}/cmake/icons.cmake)
\ No newline at end of file diff --git a/protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj b/protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj new file mode 100644 index 0000000000..3eb5b57a48 --- /dev/null +++ b/protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>Proto_Telegram</ProjectName> + <ProjectGuid>{129A4E61-45E8-E476-BD50-5E03BA80E9AD}</ProjectGuid> + </PropertyGroup> + <ImportGroup Label="PropertySheets"> + <Import Project="$(ProjectDir)..\..\..\build\vc.common\icons.props" /> + </ImportGroup> + <ItemGroup> + <ClInclude Include="src\resource.h" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="res\Proto_Telegram.rc" /> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/protocols/Telegram/proto_telegram/Proto_Tox.vcxproj.filters b/protocols/Telegram/proto_telegram/Proto_Tox.vcxproj.filters new file mode 100644 index 0000000000..19bac99d33 --- /dev/null +++ b/protocols/Telegram/proto_telegram/Proto_Tox.vcxproj.filters @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(ProjectDir)..\..\..\build\vc.common\common.filters" /> + <ItemGroup> + <ClInclude Include="src\resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="res\Proto_Telegram.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/protocols/Telegram/proto_telegram/res/Offline.ico b/protocols/Telegram/proto_telegram/res/Offline.ico Binary files differnew file mode 100644 index 0000000000..dd8dbdb7ad --- /dev/null +++ b/protocols/Telegram/proto_telegram/res/Offline.ico diff --git a/protocols/Telegram/proto_telegram/res/Online.ico b/protocols/Telegram/proto_telegram/res/Online.ico Binary files differnew file mode 100644 index 0000000000..dd8dbdb7ad --- /dev/null +++ b/protocols/Telegram/proto_telegram/res/Online.ico diff --git a/protocols/Telegram/proto_telegram/res/Proto_Telegram.rc b/protocols/Telegram/proto_telegram/res/Proto_Telegram.rc new file mode 100644 index 0000000000..c72b18eb8c --- /dev/null +++ b/protocols/Telegram/proto_telegram/res/Proto_Telegram.rc @@ -0,0 +1,71 @@ +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian (Russia) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "Offline.ico" +IDI_ICON2 ICON "Online.ico" + +#endif // Russian (Russia) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/protocols/Telegram/proto_telegram/src/resource.h b/protocols/Telegram/proto_telegram/src/resource.h new file mode 100644 index 0000000000..bed700edf5 --- /dev/null +++ b/protocols/Telegram/proto_telegram/src/resource.h @@ -0,0 +1,19 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Proto_Tox.rc +// +#define IDI_ICON1 105 +#define IDI_ICON2 104 +#define IDI_ICON3 128 +#define IDI_ICON4 159 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 106 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/protocols/Telegram/src/main.cpp b/protocols/Telegram/src/main.cpp index 07a551794b..5e03db9f29 100644 --- a/protocols/Telegram/src/main.cpp +++ b/protocols/Telegram/src/main.cpp @@ -12,7 +12,7 @@ CMPlugin g_plugin; ///////////////////////////////////////////////////////////////////////////////////////// -static PLUGININFOEX pluginInfo = +PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), __PLUGIN_NAME, diff --git a/protocols/Telegram/src/mt_proto.cpp b/protocols/Telegram/src/mt_proto.cpp index 83cf3b82cf..b767d79475 100644 --- a/protocols/Telegram/src/mt_proto.cpp +++ b/protocols/Telegram/src/mt_proto.cpp @@ -15,8 +15,18 @@ CMTProto::~CMTProto() INT_PTR CMTProto::GetCaps(int type, MCONTACT) { switch (type) { + case PFLAGNUM_1: + return PF1_IM | PF1_FILE | PF1_CHAT | PF1_BASICSEARCH | PF1_ADDSEARCHRES | PF1_MODEMSGRECV; + case PFLAGNUM_2: + return PF2_ONLINE; + case PFLAGNUM_3: + return 0; + case PFLAGNUM_4: + return PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_IMSENDOFFLINE | PF4_OFFLINEFILES | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SERVERMSGID; + case PFLAGNUM_5: + return 0; case PFLAG_UNIQUEIDTEXT: - return (INT_PTR)"Phone"; + return (INT_PTR)L"Phone"; } return 0; } |