Commit Graph

3178 Commits

Author SHA1 Message Date
leha-bot 6bb875727c history_location_manager: fix all warnings by Qt's Clang Code Model
The Code Model options were:
Clang: -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-unused-macros
-Wno-newline-eof -Wno-exit-time-destructors -Wno-global-constructors
-Wno-gnu-zero-variadic-macro-arguments -Wno-documentation -Wno-shadow
-Wno-switch-enum -Wno-missing-prototypes -Wno-used-but-marked-unused;

Clang-tidy: bugprone, clang-analyzer, clang-diagnostics, misc, modernize,
performance, readability;

Clazy: level 0.
2019-04-23 23:26:39 +03:00
leha-bot b2e70e63a2 history_location_manager: use new interface for tile info
Please note that there are some static objects in raw pointers with unclear
lifetime semantics. They are will be eliminated soon.
2019-04-23 23:26:39 +03:00
leha-bot d18ff9ec8d history_location_manager: Introduce new classes for getting location tiles info
This commit adds the helper interface ILocationMapTileHelper for getting
info about current location (e.g. location URL or map tile image URL).
This commit adds the following classes:
1. The interface ILocationMapTileHelper;
2. YandexMapsLocationTileHelper - uses Yandex.Maps Static API as backend for
   getting tile info;
3. GoogleMapsLocationTileHelper - uses Google Maps Statis API as backend;
Please note that these classes aren't used yet, it will be used in next commit.
Also please note that all virtual functions has been extracted from classes definitions
to avoid the -WWeak-tables warning. (See Clang manual about this warning).
2019-04-23 23:26:39 +03:00
leha-bot 0152b24f13 Add optional support for Yandex.Maps static API
You could enable it via CMake option KEPKA_OPTION_USE_YANDEX_MAPS:
cmake -DKEPKA_OPTION_USE_YANDEX_MAPS=ON ..

It is used instead of Google Maps API for locations and on location click.
Sometimes Google Maps return no maps data. It is related with recent free
API usages count decrease from 750k requests to 28k (according to
https://habr.com/post/417715/).

The code on this commit will be cleaned up and rewritten using Maps API
string builders in next commit.
2019-04-23 23:26:39 +03:00
leha-bot f09f8075fb Add logo copyright info to README 2019-04-23 23:26:39 +03:00
leha-bot 9c1b501123 Happy new Copyright Year! (in winrc) 2019-04-23 23:26:39 +03:00
leha-bot 03a3e5ceee Replace stock copyright-protected logo by ours
These logo variants are available under Creative Commons
Attribution Share-Alike License 4.0. See
https://creativecommons.org/licenses/by-sa/4.0/
(c) 2018 leha-bot.

The short guide about branding and logo usages
(from /Telegram/Resources/art) in Kepka:
1. logo_256.png/logo_256_no_margin.png -
 used in /Telegram/SourceFiles/window/main_window.cpp for loading logo
 (nowrap logo is used on Mac), in /Telegram/SourceFiles/messenger.[cpp|h],
 in /Telegram/SourceFiles/platform/linux/specific_linux.cpp and in qrc.
 Required for branding;
2. icon64.png - Doxyfile and MacOS image assets (they are duplicated in
 /Telegram/Telegram/Images.xcassets/[Icon.iconset|AppIcon.appiconset);
3. icon[<resolution>[@x2]].png - MacOS image assets. We will update
 these icons in next commit;
4. favicon.ico - seems unused;
5. icon256.ico - Windows Resource for EXE;

There is also a dangling reference inside
/Telegram/Resources/uwp/AppX/AppxManifest.xml. It shoud be fixed in some
of next commits.
2019-04-23 23:26:39 +03:00
crackedmind 12185c3062 Remove unused code 2019-04-23 23:26:39 +03:00
leha-bot 62abfe6f63 Use {appname} for splash screen string
Also update usage in intro widget. Please note that the language strings
with placeholders must be created using {lang_id}(lt_{placeholder},
lang({placeholder}), where you should replace {lang_id} with your actual
language string identifier and {placeholder} with your actual string
data.
2019-04-23 23:26:39 +03:00
Vitaly Zaitsev f792920622 Allow user to enable or disable interpocedural optimizations.
IPO optimizations will be disabled by default. To enable you need to
forward cmake build flag -DENABLE_IPO:BOOL=ON.

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
2019-04-02 18:35:07 +02:00
Vitaly Zaitsev 9fc007889b Removed AL_LIBTYPE_STATIC build definition.
Kepka is built against packaged version of OpenAL, so we don't need this.

Closes #227.

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
2019-03-16 19:29:59 +05:00
Vitaly Zaitsev 6ebbe5a2a9 Enabled LTO optimizations.
Closes #226.

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
2019-03-16 16:52:33 +05:00
Alexander Akulich 792a88d064 Refactor DC configuration 2019-03-02 23:30:24 +00:00
Berkus Decker 4fd2f16142 Clang-format 2018-11-01 00:12:21 +02:00
Berkus Decker ee47a1c904 Update .style files 2018-11-01 00:12:21 +02:00
Berkus Decker d3c5e4458e Fix codegenerated license headers 2018-11-01 00:12:21 +02:00
Berkus Decker 8e50d9637f Convert manually what couldn't be converted automatically 2018-11-01 00:12:21 +02:00
Berkus Decker 8fcbf45bba Convert license headers automatically 2018-11-01 00:12:21 +02:00
Berkus Decker 97011cd84a Convert last mentions of offical in strings 2018-11-01 00:12:21 +02:00
Stanislav Ershov 6c2d2613ad Use FindPython3 cmake module to launch codegen_scheme 2018-10-28 23:03:07 +03:00
Evgenii Zheltonozhskii 2a341d77b1 Fix broken lambda (MSVC bug?) 2018-10-27 12:40:27 +00:00
Evgenii Zheltonozhskii 25fbc2f7e1 Minor refactoring 2018-10-27 12:40:27 +00:00
Evgenii Zheltonozhskii 4b78d52194 Fix more warnings 2018-10-27 12:40:27 +00:00
Evgenii Zheltonozhskii 16318f93fc Remove now unused Generator::writeSetSearch 2018-10-27 12:40:27 +00:00
Evgenii Zheltonozhskii f1b4a86cfe Fix unused variables, lambda captures. 2018-10-27 12:40:27 +00:00
Evgenii Zheltonozhskii f526586bfb Delete Instance constructor, since its member constructor is deleted 2018-10-27 12:40:27 +00:00
Evgenii Zheltonozhskii e4478fd0fd Reformat 2018-10-27 12:28:53 +00:00
Evgenii Zheltonozhskii 0e7d653b32 Replace switch with map 2018-10-27 12:28:53 +00:00
Evgenii Zheltonozhskii 6bed3132ae Replace switch with map 2018-10-27 12:28:53 +00:00
Evgenii Zheltonozhskii af4cfd8a41 Fix generator 2018-10-27 12:28:53 +00:00
Evgenii Zheltonozhskii 0c4399431a Replace strings with raw strings in style 2018-10-27 12:28:53 +00:00
Stanislav Ershov ed2cceec57 Update config.h.in 2018-10-27 11:19:19 +03:00
Stanislav Ershov f85e740494 Rename Telegram.rc -> Kepka.rc.in
Configure Kepka.rc.in -> Kepka.rc
2018-10-27 11:19:19 +03:00
Stanislav Ershov ac62bc1469 Improve cmake 2018-10-27 11:19:19 +03:00
Stanislav Ershov 9cf55590c0 Fix some warnings 2018-10-24 02:34:15 +03:00
Stanislav Ershov e2e9b8aefc Fix compilation errors in conformance mode 2018-10-20 20:27:10 +03:00
Stanislav Ershov 5d336eb54f Enable conformance mode for MSVC >= 15.5 2018-10-20 20:27:10 +03:00
Evgenii Zheltonozhskii f4ae3d5e0d Replace mess with maps in lang_auto ( https://github.com/procxx/kepka/issues/196 ). Also fixes https://github.com/procxx/kepka/issues/59 2018-10-19 18:01:27 +00:00
Vladislav Isenbaev 56b40c4e31 OS X build fixes (#193)
The AppleClang 9.1 doesn't support std::is_invocable (introduced in f488d5f), so we have to use backported version from Facebook's Folly library which provides "batteries" for C++ and Standard Library's backports from C++14/17. Folly library is licensed under Apache 2.0 License which is compatible with GNU GPL v3.
Also set CMAKE_BUNDLE_DIR to CMAKE_INSTALL_DIR to avoid the CMake error "install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable" (seems it introduced in CMake 3.12.x).
2018-10-19 12:37:41 +03:00
leha-bot 8b5f81a218 Fix channel message pinning for channel moderators
The way of fixing this is weird and is a natural clutch. But we have to
live with it. And I hate it.

Note: all another function members movings from header file to source
are postponed to another commit.

This commit based on
75d8d01b17 (diff-efcc341e70654031bd8fee83d8b7105bR999)

Fixes #189.
2018-10-18 14:48:11 +03:00
leha-bot 04882ed746 Allow edit messages older than 2 days in sgroups
This feature is cherry-picked from
75d8d01b17 (diff-c0b32cc8ed01e3b1cdbfd5427184a41dL874)
2018-10-18 14:48:11 +03:00
leha-bot 4a63c69d7f Enable messages unpinning for channels
Also make History Widget react on pinning Channel message event and show
it in UI.

This commit is based on upstream commit
75d8d01b17

Related to #114.
Closes #8.
2018-09-22 01:03:29 +03:00
leha-bot ae75810cd5 HistoryItem: enable pins for channel messages
Now we can pin and unpin channel messages.

This commit is based on upstream commit
75d8d01b17

Related to #8, #114.
2018-09-22 01:03:29 +03:00
leha-bot dd003ffb7d PinMessageBox: show notify checkbox only for group
Prepare for pinning messages in Channels, in which we are could not
disable the pin notification.

Based on upstream commit
75d8d01b17

Related to #8, #114.
2018-09-22 01:03:29 +03:00
leha-bot 265cd836ef Enable pins for channels
Based on upstream commit 75d8d01b17

Related to #114, #8.
2018-09-22 01:03:29 +03:00
leha-bot 04112679b5 Rudimentary support for Live Locations
Cherry picked from upstream commit 6ca105a290

Related to #114
2018-09-22 01:03:29 +03:00
leha-bot 2aaf08bd71 Minimal layer 72 support
Compile fixes.

Based on upstream commit 6ca105a290
Closes #114.
2018-09-22 01:03:29 +03:00
leha-bot 6717ea2cd5 API scheme updated to layer 72.
Shortlog:
1. InputMediaUploadedDocument now has the new flag nosound_video;
2. InputMediaVenue now has the new string venue_type (it seems to be
   related to FourSquare Venue Types like "food/icecream" or another.
   See core.telegram.org/bot/api#Venue for details);
3. Add live locations (InputMediaGeoLive);
4. channelFull object now has a flag hidden_prehistory (see issue #113
   for details);
5. messageMediaVenue now has the same string venue_type;
6. messageMediaGeoLive now has the same fields as InputMediaGeoLive;
7. Add mysterious messageActionCustomAction;
8. Add messages.messagesNotModified (seems it's related to seamless
   message counter decrement as in Telegram for Android since v 4.8);
9. Remove inputMessagesFilterPhotoVideoDocuments;
10. Add filters inputMessagesFilterGeo and inputMessagesFilterContact;
11. Add updateChannelAvailableMessages (seems it's a new kind of Update
    related to listening of channel only updates);
12. Add channels.channelParticipantsNotModified;
13. inputBotInlineMessageMediaGeo now has the period field (like new
    live locations);
14. botInlineMessageMediaGeo now has the same period field;
15. BotResults now has a users vector field;
16. messages.botCallbackAnswer now has a new native_ui flag (seems it's
    related to some new kind of notification. Right now bots could send you
    either the message box or the modeless notification which is appeared
    from top of chat viewport);
17. Add inputPaymentCredentials[Android|Apple]Pay for (possible) Android
    Pay / Apple Pay support;
18. Add channelAdminLogEventActionTogglePreHistoryHidden for toggling
    history for chat newcomers (see issue #113);
19. Add strange recentMeUrl[Unknown|User|Chat|ChatInvite|StickerSet].
    Seems it's related to "Saved Messages" functionality.
20. Add help.recentMeUrl method;
21. messages.getHistory now has an argument hash;
22. messages.editMessage now has the new flag stop_geo_live related to
    Live Locations;
23. messages.editInlineBotMesages now has the same new flag;
24. Add new method messages.readMentions(peer:InputPeer);
25. Add new method help.getRecentMeUrls(referer:string);
26. channels.getParticipants now has a new parameter hash;
27. Add new method chanels.deleteHistory (seems it's related to issue
    #112);
28. Add new method channels.togglePreHistoryHidden (see #113).

This commit is based on upstream commit bccd801874 and related to #114.
2018-09-22 01:03:29 +03:00
leha-bot 0a1a0162e4 Fix Windows build
There was a regression after PCH cleanup with headers order in
/file_utilities_win.cpp. Seems that the CI and local MSVS used some kind
of cache.
2018-09-22 01:03:29 +03:00
fox.cpp d405a2a60a Fix tg.protocol installation directory
Closes #171.
2018-08-15 12:28:19 +03:00