From 3484d2d1aafb294f387ef5b3e42f04e5129ab55a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 5 Dec 2022 20:20:50 +0300 Subject: Telegram: protocol icons --- bin15/mir_icons.sln | 10 +++ bin16/mir_icons.sln | 10 +++ bin17/mir_icons.sln | 10 +++ protocols/Telegram/Telegram.vcxproj | 4 ++ protocols/Telegram/Telegram.vcxproj.filters | 8 +++ protocols/Telegram/proto_telegram/CMakeLists.txt | 2 + .../Telegram/proto_telegram/Proto_Telegram.vcxproj | 34 ++++++++++ .../proto_telegram/Proto_Tox.vcxproj.filters | 14 ++++ protocols/Telegram/proto_telegram/res/Offline.ico | Bin 0 -> 3638 bytes protocols/Telegram/proto_telegram/res/Online.ico | Bin 0 -> 3638 bytes .../Telegram/proto_telegram/res/Proto_Telegram.rc | 71 +++++++++++++++++++++ protocols/Telegram/proto_telegram/src/resource.h | 19 ++++++ protocols/Telegram/src/main.cpp | 2 +- protocols/Telegram/src/mt_proto.cpp | 12 +++- 14 files changed, 194 insertions(+), 2 deletions(-) create mode 100644 protocols/Telegram/proto_telegram/CMakeLists.txt create mode 100644 protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj create mode 100644 protocols/Telegram/proto_telegram/Proto_Tox.vcxproj.filters create mode 100644 protocols/Telegram/proto_telegram/res/Offline.ico create mode 100644 protocols/Telegram/proto_telegram/res/Online.ico create mode 100644 protocols/Telegram/proto_telegram/res/Proto_Telegram.rc create mode 100644 protocols/Telegram/proto_telegram/src/resource.h diff --git a/bin15/mir_icons.sln b/bin15/mir_icons.sln index b35c646d90..59d7581c7e 100644 --- a/bin15/mir_icons.sln +++ b/bin15/mir_icons.sln @@ -62,6 +62,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Facebook", "..\protoc EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_WhatsApp", "..\protocols\WhatsApp\proto_whatsapp\Proto_WhatsApp.vcxproj", "{64A2B403-90AF-4CF8-BC69-4E8D33872D64}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Telegram", "..\protocols\Telegram\proto_telegram\Proto_Telegram.vcxproj", "{129A4E61-45E8-E476-BD50-5E03BA80E9AD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -310,6 +312,14 @@ Global {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.Build.0 = Release|Win32 {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.ActiveCfg = Release|x64 {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.Build.0 = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/bin16/mir_icons.sln b/bin16/mir_icons.sln index 4badb33778..d9dd51bd23 100644 --- a/bin16/mir_icons.sln +++ b/bin16/mir_icons.sln @@ -62,6 +62,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Facebook", "..\protoc EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_WhatsApp", "..\protocols\WhatsApp\proto_whatsapp\Proto_WhatsApp.vcxproj", "{64A2B403-90AF-4CF8-BC69-4E8D33872D64}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Telegram", "..\protocols\Telegram\proto_telegram\Proto_Telegram.vcxproj", "{129A4E61-45E8-E476-BD50-5E03BA80E9AD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -310,6 +312,14 @@ Global {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.Build.0 = Release|Win32 {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.ActiveCfg = Release|x64 {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.Build.0 = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/bin17/mir_icons.sln b/bin17/mir_icons.sln index 2bf1ecf27d..66d130a913 100644 --- a/bin17/mir_icons.sln +++ b/bin17/mir_icons.sln @@ -62,6 +62,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Facebook", "..\protoc EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_WhatsApp", "..\protocols\WhatsApp\proto_whatsapp\Proto_WhatsApp.vcxproj", "{64A2B403-90AF-4CF8-BC69-4E8D33872D64}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Telegram", "..\protocols\Telegram\proto_telegram\Proto_Telegram.vcxproj", "{129A4E61-45E8-E476-BD50-5E03BA80E9AD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -310,6 +312,14 @@ Global {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.Build.0 = Release|Win32 {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.ActiveCfg = Release|x64 {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.Build.0 = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE 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 @@ {e2a369cd-eda3-414f-8ad0-e732cd7ee68c} + + + + \ 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 @@ Header Files + + + Resource Files + + + Resource Files + + \ 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 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + Proto_Telegram + {129A4E61-45E8-E476-BD50-5E03BA80E9AD} + + + + + + + + + + + \ 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 @@ + + + + + + Header Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/protocols/Telegram/proto_telegram/res/Offline.ico b/protocols/Telegram/proto_telegram/res/Offline.ico new file mode 100644 index 0000000000..dd8dbdb7ad Binary files /dev/null and b/protocols/Telegram/proto_telegram/res/Offline.ico differ diff --git a/protocols/Telegram/proto_telegram/res/Online.ico b/protocols/Telegram/proto_telegram/res/Online.ico new file mode 100644 index 0000000000..dd8dbdb7ad Binary files /dev/null and b/protocols/Telegram/proto_telegram/res/Online.ico differ 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; } -- cgit v1.2.3