merged with master

This commit is contained in:
John Preston 2016-02-21 20:01:37 +03:00
commit 978c7c858b
27 changed files with 147 additions and 57 deletions

View File

@ -101,6 +101,17 @@ then go to **/home/user/TBuild/Libraries/openal-soft/build** and run
make make
sudo make install sudo make install
####OpenSSL
In Terminal go to **/home/user/TBuild/Libraries** and run
git clone https://github.com/openssl/openssl
cd openssl
git checkout OpenSSL_1_0_1-stable
./config
make
sudo make install
####libxkbcommon (required for Fcitx Qt plugin) ####libxkbcommon (required for Fcitx Qt plugin)
In Terminal go to **/home/user/TBuild/Libraries** and run In Terminal go to **/home/user/TBuild/Libraries** and run
@ -136,7 +147,7 @@ Install some packages for Qt (see **/home/user/TBuild/Libraries/QtStatic/qtbase/
In Terminal go to **/home/user/TBuild/Libraries/QtStatic** and there run In Terminal go to **/home/user/TBuild/Libraries/QtStatic** and there run
./configure -release -opensource -confirm-license -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb -qt-xkbcommon-x11 -no-opengl -static -nomake examples -nomake tests OPENSSL_LIBS='/usr/local/ssl/lib/libssl.a /usr/local/ssl/lib/libcrypto.a' ./configure -release -opensource -confirm-license -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb -qt-xkbcommon-x11 -no-opengl -static -openssl-linked -nomake examples -nomake tests
make -j4 make -j4
sudo make -j4 install sudo make -j4 install

View File

@ -111,14 +111,14 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
mkdir -p "$WorkPath/ReleaseIntermediateUpdater" mkdir -p "$WorkPath/ReleaseIntermediateUpdater"
cd "$WorkPath/ReleaseIntermediateUpdater" cd "$WorkPath/ReleaseIntermediateUpdater"
/usr/local/Qt-5.5.1/bin/qmake "$HomePath/Updater.pro" /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Updater.pro" -r -spec linux-g++
make make
echo "Updater build complete!" echo "Updater build complete!"
cd "$HomePath" cd "$HomePath"
mkdir -p "$WorkPath/ReleaseIntermediate" mkdir -p "$WorkPath/ReleaseIntermediate"
cd "$WorkPath/ReleaseIntermediate" cd "$WorkPath/ReleaseIntermediate"
/usr/local/Qt-5.5.1/bin/qmake "$HomePath/Telegram.pro" /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Telegram.pro" -r -spec linux-g++
eval "$FixScript" eval "$FixScript"
make make
echo "Telegram build complete!" echo "Telegram build complete!"

View File

@ -11,10 +11,7 @@ Replace () {
} }
Replace '\-llzma' '\/usr\/lib\/x86_64\-linux\-gnu\/liblzma\.a' Replace '\-llzma' '\/usr\/lib\/x86_64\-linux\-gnu\/liblzma\.a'
Replace '\-lssl' '\/usr\/lib\/x86_64\-linux\-gnu\/libssl\.a' Replace '\-lXi' '\/usr\/lib\/x86_64\-linux\-gnu\/libXi\.a \/usr\/lib\/x86_64\-linux\-gnu\/libXext\.a'
Replace '\-lcrypto' '\/usr\/lib\/x86_64\-linux\-gnu\/libcrypto\.a'
Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a'
Replace '\-lXi' '\/usr\/lib\/x86_64\-linux\-gnu\/libXi\.a'
Replace '\-lSM' '\/usr\/lib\/x86_64\-linux\-gnu\/libSM\.a' Replace '\-lSM' '\/usr\/lib\/x86_64\-linux\-gnu\/libSM\.a'
Replace '\-lICE' '\/usr\/lib\/x86_64\-linux\-gnu\/libICE\.a' Replace '\-lICE' '\/usr\/lib\/x86_64\-linux\-gnu\/libICE\.a'
Replace '\-lfontconfig' '\/usr\/lib\/x86_64\-linux\-gnu\/libfontconfig\.a \/usr\/lib\/x86_64\-linux\-gnu\/libexpat\.a' Replace '\-lfontconfig' '\/usr\/lib\/x86_64\-linux\-gnu\/libfontconfig\.a \/usr\/lib\/x86_64\-linux\-gnu\/libexpat\.a'
@ -28,3 +25,4 @@ Replace '\-lswresample' '\/usr\/local\/lib\/libswresample\.a'
Replace '\-lswscale' '\/usr\/local\/lib\/libswscale\.a' Replace '\-lswscale' '\/usr\/local\/lib\/libswscale\.a'
Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a' Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a'
Replace '\-lva' '\/usr\/local\/lib\/libva\.a' Replace '\-lva' '\/usr\/local\/lib\/libva\.a'
Replace '\-lQt5Network' '\/usr\/local\/Qt-5.5.1\/lib\/libQt5Network.a \/usr\/local\/ssl\/lib\/libssl.a \/usr\/local\/ssl\/lib\/libcrypto.a'

View File

@ -11,10 +11,7 @@ Replace () {
} }
Replace '\-llzma' '\/usr\/lib\/i386\-linux\-gnu\/liblzma\.a' Replace '\-llzma' '\/usr\/lib\/i386\-linux\-gnu\/liblzma\.a'
Replace '\-lssl' '\/usr\/lib\/i386\-linux\-gnu\/libssl\.a' Replace '\-lXi' '\/usr\/lib\/i386\-linux\-gnu\/libXi\.a \/usr\/lib\/i386\-linux\-gnu\/libXext\.a'
Replace '\-lcrypto' '\/usr\/lib\/i386\-linux\-gnu\/libcrypto\.a'
Replace '\-lgobject\-2\.0' '\/usr\/lib\/i386\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/i386\-linux\-gnu\/libffi\.a'
Replace '\-lXi' '\/usr\/lib\/i386\-linux\-gnu\/libXi\.a'
Replace '\-lSM' '\/usr\/lib\/i386\-linux\-gnu\/libSM\.a' Replace '\-lSM' '\/usr\/lib\/i386\-linux\-gnu\/libSM\.a'
Replace '\-lICE' '\/usr\/lib\/i386\-linux\-gnu\/libICE\.a' Replace '\-lICE' '\/usr\/lib\/i386\-linux\-gnu\/libICE\.a'
Replace '\-lfontconfig' '\/usr\/lib\/i386\-linux\-gnu\/libfontconfig\.a \/usr\/lib\/i386\-linux\-gnu\/libexpat\.a' Replace '\-lfontconfig' '\/usr\/lib\/i386\-linux\-gnu\/libfontconfig\.a \/usr\/lib\/i386\-linux\-gnu\/libexpat\.a'
@ -28,3 +25,4 @@ Replace '\-lswresample' '\/usr\/local\/lib\/libswresample\.a'
Replace '\-lswscale' '\/usr\/local\/lib\/libswscale\.a' Replace '\-lswscale' '\/usr\/local\/lib\/libswscale\.a'
Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a' Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a'
Replace '\-lva' '\/usr\/local\/lib\/libva\.a' Replace '\-lva' '\/usr\/local\/lib\/libva\.a'
Replace '\-lQt5Network' '\/usr\/local\/Qt-5.5.1\/lib\/libQt5Network.a \/usr\/local\/ssl\/lib\/libssl.a \/usr\/local\/ssl\/lib\/libcrypto.a'

View File

@ -263,6 +263,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_settings_bg_from_gallery" = "Choose from gallery"; "lng_settings_bg_from_gallery" = "Choose from gallery";
"lng_settings_bg_from_file" = "Choose from file"; "lng_settings_bg_from_file" = "Choose from file";
"lng_settings_bg_tile" = "Tile background"; "lng_settings_bg_tile" = "Tile background";
"lng_settings_adaptive_wide" = "Adaptive layout for wide screens";
"lng_backgrounds_header" = "Choose your new chat background"; "lng_backgrounds_header" = "Choose your new chat background";
@ -843,7 +844,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_new_version_wrap" = "Telegram Desktop was updated to version {version}\n\n{changes}\n\nFull version history is available here:\n{link}"; "lng_new_version_wrap" = "Telegram Desktop was updated to version {version}\n\n{changes}\n\nFull version history is available here:\n{link}";
"lng_new_version_minor" = "— Bug fixes and other minor improvements"; "lng_new_version_minor" = "— Bug fixes and other minor improvements";
"lng_new_version_text" = "— New waveform visualizations for voice messages\n— Sticker suggestions when you type an emoji"; "lng_new_version_text" = "— Adaptive layout for wide screens switch added to Settings\n— Linux version crash fix";
"lng_menu_insert_unicode" = "Insert Unicode control character"; "lng_menu_insert_unicode" = "Insert Unicode control character";

View File

@ -1051,9 +1051,8 @@ void AppClass::checkMapVersion() {
if (Local::oldMapVersion() < AppVersion) { if (Local::oldMapVersion() < AppVersion) {
if (Local::oldMapVersion()) { if (Local::oldMapVersion()) {
QString versionFeatures; QString versionFeatures;
if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9024) { if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9025) {
// versionFeatures = QString::fromUtf8("\xe2\x80\x94 Voice messages waveform visualizations\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); versionFeatures = QString::fromUtf8("\xe2\x80\x94 Adaptive layout for wide screens switch added to Settings\n\xe2\x80\x94 Linux version crash fix");// .replace('@', qsl("@") + QChar(0x200D));
versionFeatures = lang(lng_new_version_minor).trimmed();
} else if (Local::oldMapVersion() < 9024) { } else if (Local::oldMapVersion() < 9024) {
versionFeatures = lang(lng_new_version_text).trimmed(); versionFeatures = lang(lng_new_version_text).trimmed();
} else { } else {

View File

@ -20,9 +20,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
static const int32 AppVersion = 9024; static const int32 AppVersion = 9025;
static const wchar_t *AppVersionStr = L"0.9.24"; static const wchar_t *AppVersionStr = L"0.9.25";
static const bool DevVersion = false; static const bool DevVersion = true;
//#define BETA_VERSION (9019002ULL) // just comment this line to build public version //#define BETA_VERSION (9019002ULL) // just comment this line to build public version
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";

View File

@ -351,7 +351,9 @@ namespace Sandbox {
struct GlobalDataStruct { struct GlobalDataStruct {
uint64 LaunchId = 0; uint64 LaunchId = 0;
Adaptive::Layout AdaptiveLayout = Adaptive::NormalLayout; Adaptive::Layout AdaptiveLayout = Adaptive::NormalLayout;
bool AdaptiveForWide = true;
// config // config
int32 ChatSizeMax = 200; int32 ChatSizeMax = 200;
@ -390,7 +392,9 @@ namespace Global {
} }
DefineReadOnlyVar(Global, uint64, LaunchId); DefineReadOnlyVar(Global, uint64, LaunchId);
DefineVar(Global, Adaptive::Layout, AdaptiveLayout); DefineVar(Global, Adaptive::Layout, AdaptiveLayout);
DefineVar(Global, bool, AdaptiveForWide);
// config // config
DefineVar(Global, int32, ChatSizeMax); DefineVar(Global, int32, ChatSizeMax);

View File

@ -138,7 +138,9 @@ namespace Global {
void finish(); void finish();
DeclareReadOnlyVar(uint64, LaunchId); DeclareReadOnlyVar(uint64, LaunchId);
DeclareVar(Adaptive::Layout, AdaptiveLayout); DeclareVar(Adaptive::Layout, AdaptiveLayout);
DeclareVar(bool, AdaptiveForWide);
// config // config
DeclareVar(int32, ChatSizeMax); DeclareVar(int32, ChatSizeMax);
@ -167,6 +169,6 @@ namespace Adaptive {
return Global::AdaptiveLayout() == NormalLayout; return Global::AdaptiveLayout() == NormalLayout;
} }
inline bool Wide() { inline bool Wide() {
return Global::AdaptiveLayout() == WideLayout; return Global::AdaptiveForWide() && (Global::AdaptiveLayout() == WideLayout);
} }
} }

View File

@ -4715,6 +4715,7 @@ void HistoryWidget::doneShow() {
void HistoryWidget::updateAdaptiveLayout() { void HistoryWidget::updateAdaptiveLayout() {
_sideShadow.setVisible(!Adaptive::OneColumn()); _sideShadow.setVisible(!Adaptive::OneColumn());
update();
} }
void HistoryWidget::animStop() { void HistoryWidget::animStop() {

View File

@ -525,7 +525,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_profile_migrate_reached" = "Limit von {count:_not_used_|# Mitglied|# Mitgliedern} erreicht"; "lng_profile_migrate_reached" = "Limit von {count:_not_used_|# Mitglied|# Mitgliedern} erreicht";
"lng_profile_migrate_about" = "Für weitere Funktionen und um das Limit aufzuheben in Supergruppe ändern:"; "lng_profile_migrate_about" = "Für weitere Funktionen und um das Limit aufzuheben in Supergruppe ändern:";
"lng_profile_migrate_feature1" = "— Bis zu {count:_not_used_|# Mitglied|# ;Mitglieder} sind nun möglich"; "lng_profile_migrate_feature1" = "— Bis zu {count:_not_used_|# Mitglied|# Mitglieder} sind nun möglich";
"lng_profile_migrate_feature2" = "— Neue Mitglieder sehen gesamten Verlauf"; "lng_profile_migrate_feature2" = "— Neue Mitglieder sehen gesamten Verlauf";
"lng_profile_migrate_feature3" = "— Admins können alle Nachrichten löschen"; "lng_profile_migrate_feature3" = "— Admins können alle Nachrichten löschen";
"lng_profile_migrate_feature4" = "— Mitteilungen sind standardmäßig stumm"; "lng_profile_migrate_feature4" = "— Mitteilungen sind standardmäßig stumm";

View File

@ -33,7 +33,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_open_from_tray" = "Apri Telegram"; "lng_open_from_tray" = "Apri Telegram";
"lng_minimize_to_tray" = "Riduci a icona"; "lng_minimize_to_tray" = "Riduci a icona";
"lng_quit_from_tray" = "Chiudi Telegram"; "lng_quit_from_tray" = "Chiudi Telegram";
"lng_tray_icon_text" = "Telegram è ancora attivo qui,\npuoi cambiarlo nelle impostazioni.\nSe l'icona scompare dall'area di notifica,\npuoi ripristinarla dalle icone nascoste."; "lng_tray_icon_text" = "Telegram è ancora attivo qui,\npuoi cambiarlo nelle impostazioni.\nSe l'icona scompare dall'area di notifica,\npuoi trascinarla qui dalle icone nascoste.";
"lng_month1" = "Gennaio"; "lng_month1" = "Gennaio";
"lng_month2" = "Febbraio"; "lng_month2" = "Febbraio";
@ -276,7 +276,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_download_path_dir_radio" = "Cartella personalizzata, pulita a mano"; "lng_download_path_dir_radio" = "Cartella personalizzata, pulita a mano";
"lng_download_path_choose" = "Scegli il percorso di download"; "lng_download_path_choose" = "Scegli il percorso di download";
"lng_sure_clear_downloads" = "Vuoi eliminare tutti i file scaricati nella cartella temporanea? Sarà fatto automaticamente alla disconnessione o alla disinstallazione del programma"; "lng_sure_clear_downloads" = "Vuoi eliminare tutti i file scaricati nella cartella temporanea? Sarà fatto automaticamente alla disconnessione o alla disinstallazione del programma";
"lng_download_path_failed" = "Il download del file non può iniziare. Potrebbe accadere a causa di un'errata posizione di download.\n\nPuoi cambiare il percorso di download nelle Impostazioni."; "lng_download_path_failed" = "Il download del file non può iniziare. La causa potrebbe essere una posizione sbagliata per i download.\n\nPuoi cambiare il percorso di download nelle Impostazioni.";
"lng_download_path_settings" = "Impostazioni"; "lng_download_path_settings" = "Impostazioni";
"lng_download_finish_failed" = "Il download del file non può essere concluso.\n\nVuoi riprovare?"; "lng_download_finish_failed" = "Il download del file non può essere concluso.\n\nVuoi riprovare?";
"lng_download_path_clearing" = "Eliminazione.."; "lng_download_path_clearing" = "Eliminazione..";

View File

@ -1121,6 +1121,14 @@ namespace {
} }
} break; } break;
case dbiAdaptiveForWide: {
qint32 v;
stream >> v;
if (!_checkStreamStatus(stream)) return false;
Global::SetAdaptiveForWide(v == 1);
} break;
case dbiAutoLock: { case dbiAutoLock: {
qint32 v; qint32 v;
stream >> v; stream >> v;
@ -1506,6 +1514,7 @@ namespace {
EncryptedDescriptor data(size); EncryptedDescriptor data(size);
data.stream << quint32(dbiSendKey) << qint32(cCtrlEnter() ? dbiskCtrlEnter : dbiskEnter); data.stream << quint32(dbiSendKey) << qint32(cCtrlEnter() ? dbiskCtrlEnter : dbiskEnter);
data.stream << quint32(dbiTileBackground) << qint32(cTileBackground() ? 1 : 0); data.stream << quint32(dbiTileBackground) << qint32(cTileBackground() ? 1 : 0);
data.stream << quint32(dbiAdaptiveForWide) << qint32(Global::AdaptiveForWide() ? 1 : 0);
data.stream << quint32(dbiAutoLock) << qint32(cAutoLock()); data.stream << quint32(dbiAutoLock) << qint32(cAutoLock());
data.stream << quint32(dbiReplaceEmojis) << qint32(cReplaceEmojis() ? 1 : 0); data.stream << quint32(dbiReplaceEmojis) << qint32(cReplaceEmojis() ? 1 : 0);
data.stream << quint32(dbiDefaultAttach) << qint32(cDefaultAttach()); data.stream << quint32(dbiDefaultAttach) << qint32(cDefaultAttach());

View File

@ -560,8 +560,9 @@ void OverviewInner::dragActionFinish(const QPoint &screenPos, Qt::MouseButton bu
} }
} }
if (needClick) { if (needClick) {
needClick->onClick(button); DEBUG_LOG(("Will click link: %1 (%2) %3").arg(needClick->text()).arg(needClick->readable()).arg(needClick->encoded()));
dragActionCancel(); dragActionCancel();
App::activateTextLink(needClick, button);
return; return;
} }
if (_dragAction == PrepareSelect && !needClick && !_dragWasInactive && !_selected.isEmpty() && _selected.cbegin().value() == FullSelection) { if (_dragAction == PrepareSelect && !needClick && !_dragWasInactive && !_selected.isEmpty() && _selected.cbegin().value() == FullSelection) {

View File

@ -43,4 +43,9 @@ namespace PlatformSpecific {
~Initializer(); ~Initializer();
}; };
namespace ThirdParty {
void start();
void finish();
}
} }

View File

@ -752,9 +752,6 @@ void PsMainWindow::psUpdatedPosition() {
void PsMainWindow::psCreateTrayIcon() { void PsMainWindow::psCreateTrayIcon() {
if (!noQtTrayIcon) { if (!noQtTrayIcon) {
cSetSupportTray(QSystemTrayIcon::isSystemTrayAvailable()); cSetSupportTray(QSystemTrayIcon::isSystemTrayAvailable());
if (!noTryUnity) {
useUnityCount = false;
}
return; return;
} }
@ -1241,16 +1238,6 @@ void psShowInFolder(const QString &name) {
namespace PlatformSpecific { namespace PlatformSpecific {
Initializer::Initializer() { Initializer::Initializer() {
QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower();
noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome"));
tryAppIndicator = (cdesktop == qstr("xfce"));
noTryUnity = (cdesktop != qstr("unity"));
if (noQtTrayIcon) cSetSupportTray(false);
DEBUG_LOG(("Loading libraries"));
setupGtk();
setupUnity();
} }
Initializer::~Initializer() { Initializer::~Initializer() {
@ -1258,6 +1245,24 @@ namespace PlatformSpecific {
_psEventFilter = 0; _psEventFilter = 0;
} }
namespace ThirdParty {
void start() {
QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower();
noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome"));
tryAppIndicator = (cdesktop == qstr("xfce"));
noTryUnity = (cdesktop != qstr("unity"));
if (noQtTrayIcon) cSetSupportTray(false);
DEBUG_LOG(("Loading libraries"));
setupGtk();
setupUnity();
}
void finish() {
}
}
} }
namespace { namespace {

View File

@ -861,6 +861,14 @@ namespace PlatformSpecific {
objc_finish(); objc_finish();
} }
namespace ThirdParty {
void start() {
}
void finish() {
}
}
} }
void psNewVersion() { void psNewVersion() {

View File

@ -2170,6 +2170,14 @@ namespace PlatformSpecific {
} }
} }
namespace ThirdParty {
void start() {
}
void finish() {
}
}
} }
namespace { namespace {

View File

@ -187,6 +187,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent)
, _backFromGallery(this, lang(lng_settings_bg_from_gallery)) , _backFromGallery(this, lang(lng_settings_bg_from_gallery))
, _backFromFile(this, lang(lng_settings_bg_from_file)) , _backFromFile(this, lang(lng_settings_bg_from_file))
, _tileBackground(this, lang(lng_settings_bg_tile), cTileBackground()) , _tileBackground(this, lang(lng_settings_bg_tile), cTileBackground())
, _adaptiveForWide(this, lang(lng_settings_adaptive_wide), Global::AdaptiveForWide())
, _needBackgroundUpdate(false) , _needBackgroundUpdate(false)
// advanced // advanced
@ -310,6 +311,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent)
connect(&_backFromGallery, SIGNAL(clicked()), this, SLOT(onBackFromGallery())); connect(&_backFromGallery, SIGNAL(clicked()), this, SLOT(onBackFromGallery()));
connect(&_backFromFile, SIGNAL(clicked()), this, SLOT(onBackFromFile())); connect(&_backFromFile, SIGNAL(clicked()), this, SLOT(onBackFromFile()));
connect(&_tileBackground, SIGNAL(changed()), this, SLOT(onTileBackground())); connect(&_tileBackground, SIGNAL(changed()), this, SLOT(onTileBackground()));
connect(&_adaptiveForWide, SIGNAL(changed()), this, SLOT(onAdaptiveForWide()));
// advanced // advanced
connect(&_passcodeEdit, SIGNAL(clicked()), this, SLOT(onPasscode())); connect(&_passcodeEdit, SIGNAL(clicked()), this, SLOT(onPasscode()));
@ -635,6 +637,10 @@ void SettingsInner::paintEvent(QPaintEvent *e) {
top += st::setBackgroundSize; top += st::setBackgroundSize;
top += st::setLittleSkip; top += st::setLittleSkip;
top += _tileBackground.height(); top += _tileBackground.height();
if (Global::AdaptiveLayout() == Adaptive::WideLayout) {
top += st::setLittleSkip;
top += _adaptiveForWide.height();
}
} }
// advanced // advanced
@ -753,6 +759,10 @@ void SettingsInner::resizeEvent(QResizeEvent *e) {
top += st::setLittleSkip; top += st::setLittleSkip;
_tileBackground.move(_left, top); top += _tileBackground.height(); _tileBackground.move(_left, top); top += _tileBackground.height();
if (Global::AdaptiveLayout() == Adaptive::WideLayout) {
top += st::setLittleSkip;
_adaptiveForWide.move(_left, top); top += _adaptiveForWide.height();
}
} }
// advanced // advanced
@ -855,6 +865,11 @@ void SettingsInner::mousePressEvent(QMouseEvent *e) {
void SettingsInner::contextMenuEvent(QContextMenuEvent *e) { void SettingsInner::contextMenuEvent(QContextMenuEvent *e) {
} }
void SettingsInner::updateAdaptiveLayout() {
showAll();
resizeEvent(0);
}
void SettingsInner::step_photo(float64 ms, bool timer) { void SettingsInner::step_photo(float64 ms, bool timer) {
float64 dt = ms / st::setPhotoDuration; float64 dt = ms / st::setPhotoDuration;
if (dt >= 1) { if (dt >= 1) {
@ -1093,10 +1108,16 @@ void SettingsInner::showAll() {
_backFromGallery.show(); _backFromGallery.show();
_backFromFile.show(); _backFromFile.show();
_tileBackground.show(); _tileBackground.show();
if (Global::AdaptiveLayout() == Adaptive::WideLayout) {
_adaptiveForWide.show();
} else {
_adaptiveForWide.hide();
}
} else { } else {
_backFromGallery.hide(); _backFromGallery.hide();
_backFromFile.hide(); _backFromFile.hide();
_tileBackground.hide(); _tileBackground.hide();
_adaptiveForWide.hide();
} }
// advanced // advanced
@ -1628,6 +1649,16 @@ void SettingsInner::onTileBackground() {
} }
} }
void SettingsInner::onAdaptiveForWide() {
if (Global::AdaptiveForWide() != _adaptiveForWide.checked()) {
Global::SetAdaptiveForWide(_adaptiveForWide.checked());
if (App::wnd()) {
App::wnd()->updateAdaptiveLayout();
}
Local::writeUserSettings();
}
}
void SettingsInner::onDontAskDownloadPath() { void SettingsInner::onDontAskDownloadPath() {
cSetAskDownloadPath(!_dontAskDownloadPath.checked()); cSetAskDownloadPath(!_dontAskDownloadPath.checked());
Local::writeUserSettings(); Local::writeUserSettings();
@ -1898,10 +1929,11 @@ void SettingsWidget::updateAdaptiveLayout() {
} else { } else {
_close.show(); _close.show();
} }
_inner.updateAdaptiveLayout();
resizeEvent(0);
} }
void SettingsWidget::updateDisplayNotify() void SettingsWidget::updateDisplayNotify() {
{
_inner.enableDisplayNotify(cDesktopNotify()); _inner.enableDisplayNotify(cDesktopNotify());
} }

View File

@ -71,6 +71,8 @@ public:
void mousePressEvent(QMouseEvent *e); void mousePressEvent(QMouseEvent *e);
void contextMenuEvent(QContextMenuEvent *e); void contextMenuEvent(QContextMenuEvent *e);
void updateAdaptiveLayout();
void step_photo(float64 ms, bool timer); void step_photo(float64 ms, bool timer);
void updateSize(int32 newWidth); void updateSize(int32 newWidth);
@ -156,6 +158,7 @@ public slots:
void onBackFromGallery(); void onBackFromGallery();
void onBackFromFile(); void onBackFromFile();
void onTileBackground(); void onTileBackground();
void onAdaptiveForWide();
void onLocalStorageClear(); void onLocalStorageClear();
@ -273,7 +276,7 @@ private:
// chat background // chat background
QPixmap _background; QPixmap _background;
LinkButton _backFromGallery, _backFromFile; LinkButton _backFromGallery, _backFromFile;
FlatCheckbox _tileBackground; FlatCheckbox _tileBackground, _adaptiveForWide;
bool _needBackgroundUpdate; bool _needBackgroundUpdate;
// advanced // advanced

View File

@ -267,6 +267,8 @@ namespace {
namespace ThirdParty { namespace ThirdParty {
void start() { void start() {
PlatformSpecific::ThirdParty::start();
if (!RAND_status()) { // should be always inited in all modern OS if (!RAND_status()) { // should be always inited in all modern OS
char buf[16]; char buf[16];
memcpy(buf, &_msStart, 8); memcpy(buf, &_msStart, 8);
@ -303,6 +305,8 @@ namespace ThirdParty {
delete[] _sslLocks; delete[] _sslLocks;
_sslLocks = 0; _sslLocks = 0;
PlatformSpecific::ThirdParty::finish();
} }
} }

View File

@ -352,6 +352,7 @@ enum DataBlockId {
dbiSavedGifsLimit = 0x35, dbiSavedGifsLimit = 0x35,
dbiShowingSavedGifs = 0x36, dbiShowingSavedGifs = 0x36,
dbiAutoPlay = 0x37, dbiAutoPlay = 0x37,
dbiAdaptiveForWide = 0x38,
dbiEncryptedWithSalt = 333, dbiEncryptedWithSalt = 333,
dbiEncrypted = 444, dbiEncrypted = 444,

View File

@ -11,7 +11,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.9.24</string> <string>0.9.25</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>

View File

@ -288,10 +288,10 @@ CONFIG(release, debug|release) {
QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE += -Ofast -flto -fno-strict-aliasing -g QMAKE_CXXFLAGS_RELEASE += -Ofast -flto -fno-strict-aliasing -g
QMAKE_LFLAGS_RELEASE -= -O1 QMAKE_LFLAGS_RELEASE -= -O1
QMAKE_LFLAGS_RELEASE += -Ofast -flto -g QMAKE_LFLAGS_RELEASE += -Ofast -flto -g -rdynamic
} }
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
QMAKE_LFLAGS_DEBUG += -g QMAKE_LFLAGS_DEBUG += -g -rdynamic
} }
INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\ INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\
@ -319,7 +319,7 @@ INCLUDEPATH += "/usr/include/atk-1.0"
INCLUDEPATH += "/usr/include/dee-1.0" INCLUDEPATH += "/usr/include/dee-1.0"
INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4" INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4"
LIBS += -lcrypto -lssl -ldl -llzma -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva LIBS += -ldl -llzma -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva
LIBS += ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \ LIBS += ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \
./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \ ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \
./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a

View File

@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,9,24,0 FILEVERSION 0,9,25,0
PRODUCTVERSION 0,9,24,0 PRODUCTVERSION 0,9,25,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -51,10 +51,10 @@ BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "CompanyName", "Telegram Messenger LLP" VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileVersion", "0.9.24.0" VALUE "FileVersion", "0.9.25.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "LegalCopyright", "Copyright (C) 2014-2016"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.9.24.0" VALUE "ProductVersion", "0.9.25.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -1720,7 +1720,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.9.24; CURRENT_PROJECT_VERSION = 0.9.25;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
@ -1739,7 +1739,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = YES; COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 0.9.24; CURRENT_PROJECT_VERSION = 0.9.25;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = fast; GCC_OPTIMIZATION_LEVEL = fast;
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
@ -1768,10 +1768,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = ""; CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.9.24; CURRENT_PROJECT_VERSION = 0.9.25;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 0.9; DYLIB_COMPATIBILITY_VERSION = 0.9;
DYLIB_CURRENT_VERSION = 0.9.24; DYLIB_CURRENT_VERSION = 0.9.25;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = ""; FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
@ -1909,10 +1909,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = ""; CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.9.24; CURRENT_PROJECT_VERSION = 0.9.25;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.9; DYLIB_COMPATIBILITY_VERSION = 0.9;
DYLIB_CURRENT_VERSION = 0.9.24; DYLIB_CURRENT_VERSION = 0.9.25;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = ""; FRAMEWORK_SEARCH_PATHS = "";

View File

@ -1,6 +1,6 @@
AppVersion 9024 AppVersion 9025
AppVersionStrMajor 0.9 AppVersionStrMajor 0.9
AppVersionStrSmall 0.9.24 AppVersionStrSmall 0.9.25
AppVersionStr 0.9.24 AppVersionStr 0.9.25
DevChannel 0 DevChannel 1
BetaVersion 0 9019002 BetaVersion 0 9019002