diff --git a/Telegram/PrepareWin.bat b/Telegram/PrepareWin.bat
index 3065708051..53acbb3aa4 100644
--- a/Telegram/PrepareWin.bat
+++ b/Telegram/PrepareWin.bat
@@ -1,8 +1,8 @@
@echo OFF
-set "AppVersionStrSmall=0.7.14"
-set "AppVersionStr=0.7.14"
-set "AppVersionStrFull=0.7.14.0"
+set "AppVersionStrSmall=0.7.15"
+set "AppVersionStr=0.7.15"
+set "AppVersionStrFull=0.7.15.0"
set "DevChannel=1"
if %DevChannel% neq 0 goto preparedev
diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings
index 8476efef96..7a24798d92 100644
--- a/Telegram/Resources/lang.strings
+++ b/Telegram/Resources/lang.strings
@@ -459,13 +459,23 @@ Copyright (c) 2014 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_minor" = "— Bug fixes and other minor improvements";
-"lng_new_version7013" = "— You can now change the chat background";
+"lng_new_version7016" = "— Some translations improvements\n— Linux: tray icon should work better in non-Unity environments";
"lng_new_version7006_appstore" = "Telegram Desktop was updated to version {version}\n\n — Stickers support\n — Local caching for voice messages\n — Added new languages\n\nFull version history is available here:\n{link}";
+"lng_menu_insert_unicode" = "Insert Unicode control character";
+
// Wnd specific
"lng_wnd_choose_program_menu" = "Choose Default Program...";
+"lng_wnd_menu_undo" = "Undo";
+"lng_wnd_menu_redo" = "Redo";
+
+// Linux specific
+
+"lng_linux_menu_undo" = "Undo";
+"lng_linux_menu_redo" = "Redo";
+
// Mac specific
"lng_mac_choose_program_menu" = "Other...";
diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp
index 03adc00744..be5f8cc575 100644
--- a/Telegram/SourceFiles/application.cpp
+++ b/Telegram/SourceFiles/application.cpp
@@ -704,10 +704,10 @@ void Application::startApp() {
psRegisterCustomScheme();
if (Local::oldMapVersion()) {
QString versionFeatures;
- if (DevChannel && Local::oldMapVersion() < 7014) {
- versionFeatures = QString::fromUtf8("\xe2\x80\x94 Moved to Qt 5.4.0 version, please check everything\n\xe2\x80\x94 Time values should be displayed like in your system\n\xe2\x80\x94 Linux: fixed keyboard shortcuts when not english keyboard layout");
- } else if (!DevChannel && Local::oldMapVersion() < 7013) {
- versionFeatures = lang(lng_new_version7013).trimmed();
+ if (DevChannel && Local::oldMapVersion() < 7015) {
+ versionFeatures = QString::fromUtf8("\xe2\x80\x94 Some translation keys added\n\xe2\x80\x94 Linux: fixed semibold font\n\xe2\x80\x94 Linux: tray icon should work better in non-Unity environments");
+ } else if (!DevChannel && Local::oldMapVersion() < 7016) {
+ versionFeatures = lang(lng_new_version7016).trimmed();
}
if (!versionFeatures.isEmpty()) {
versionFeatures = lng_new_version_wrap(lt_version, QString::fromStdWString(AppVersionStr), lt_changes, versionFeatures, lt_link, qsl("https://desktop.telegram.org/#changelog"));
diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h
index 009cd683cc..521abbb0d0 100644
--- a/Telegram/SourceFiles/config.h
+++ b/Telegram/SourceFiles/config.h
@@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
*/
#pragma once
-static const int32 AppVersion = 7014;
-static const wchar_t *AppVersionStr = L"0.7.14";
+static const int32 AppVersion = 7015;
+static const wchar_t *AppVersionStr = L"0.7.15";
static const bool DevChannel = true;
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";
diff --git a/Telegram/SourceFiles/lang.cpp b/Telegram/SourceFiles/lang.cpp
index 830135c522..38a90b07f0 100644
--- a/Telegram/SourceFiles/lang.cpp
+++ b/Telegram/SourceFiles/lang.cpp
@@ -86,8 +86,8 @@ QString Translator::translate(const char *context, const char *sourceText, const
return QString();
}
if (QLatin1String("QWidgetTextControl") == context || QLatin1String("QLineEdit") == context) {
- if (QLatin1String("&Undo") == sourceText) return lang(lng_mac_menu_undo);
- if (QLatin1String("&Redo") == sourceText) return lang(lng_mac_menu_redo);
+ if (QLatin1String("&Undo") == sourceText) return lang((cPlatform() == dbipWindows) ? lng_wnd_menu_undo : ((cPlatform() == dbipMac) ? lng_mac_menu_undo : lng_linux_menu_undo));
+ if (QLatin1String("&Redo") == sourceText) return lang((cPlatform() == dbipWindows) ? lng_wnd_menu_redo : ((cPlatform() == dbipMac) ? lng_mac_menu_redo : lng_linux_menu_redo));
if (QLatin1String("Cu&t") == sourceText) return lang(lng_mac_menu_cut);
if (QLatin1String("&Copy") == sourceText) return lang(lng_mac_menu_copy);
if (QLatin1String("&Paste") == sourceText) return lang(lng_mac_menu_paste);
@@ -95,5 +95,9 @@ QString Translator::translate(const char *context, const char *sourceText, const
if (QLatin1String("Select All") == sourceText) return lang(lng_mac_menu_select_all);
return QString();
}
- return QString();//QString::fromUtf8(sourceText);
+ if (QLatin1String("QUnicodeControlCharacterMenu") == context) {
+ if (QLatin1String("Insert Unicode control character") == sourceText) return lang(lng_menu_insert_unicode);
+ return QString();
+ }
+ return QString();
}
diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist
index 7ffa5883c2..815827c352 100644
--- a/Telegram/Telegram.plist
+++ b/Telegram/Telegram.plist
@@ -11,7 +11,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.7.14
+ 0.7.15
CFBundleSignature
????
CFBundleURLTypes
diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc
index 15ba782999..94deb6fb52 100644
Binary files a/Telegram/Telegram.rc and b/Telegram/Telegram.rc differ
diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj
index 48d9ac495d..bbea6884db 100644
--- a/Telegram/Telegram.xcodeproj/project.pbxproj
+++ b/Telegram/Telegram.xcodeproj/project.pbxproj
@@ -1633,7 +1633,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 0.7.14;
+ CURRENT_PROJECT_VERSION = 0.7.15;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -1651,7 +1651,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = YES;
- CURRENT_PROJECT_VERSION = 0.7.14;
+ CURRENT_PROJECT_VERSION = 0.7.15;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = fast;
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
@@ -1677,10 +1677,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 0.7.14;
+ CURRENT_PROJECT_VERSION = 0.7.15;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 0.7;
- DYLIB_CURRENT_VERSION = 0.7.14;
+ DYLIB_CURRENT_VERSION = 0.7.15;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
@@ -1818,10 +1818,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 0.7.14;
+ CURRENT_PROJECT_VERSION = 0.7.15;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.7;
- DYLIB_CURRENT_VERSION = 0.7.14;
+ DYLIB_CURRENT_VERSION = 0.7.15;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
diff --git a/Telegram/Version.sh b/Telegram/Version.sh
index 090c1a357c..7eddff4960 100755
--- a/Telegram/Version.sh
+++ b/Telegram/Version.sh
@@ -1,2 +1,2 @@
-echo 7014 0.7.14 1
+echo 7015 0.7.15 1
# AppVersion AppVersionStr DevChannel
diff --git a/Telegram/_qt_5_4_0_patch.diff b/Telegram/_qt_5_4_0_patch.diff
index 205bd8aca0..3f09d4b518 100644
--- a/Telegram/_qt_5_4_0_patch.diff
+++ b/Telegram/_qt_5_4_0_patch.diff
@@ -263,61 +263,41 @@ index 43903ac..efa7014 100644
if (error != FT_Err_Ok) {
qDebug() << "FT_New_Face failed with index" << index << ":" << hex << error;
diff --git a/qtbase/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/qtbase/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
-index 5dec1d0..1b0dcfa 100644
+index 5dec1d0..f4d6fcd 100644
--- a/qtbase/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
+++ b/qtbase/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
-@@ -690,6 +690,42 @@ QStringList QFontconfigDatabase::fallbacksForFamily(const QString &family, QFont
- return fallbackFamilies;
- }
+@@ -341,6 +341,15 @@ static void populateFromPattern(FcPattern *pattern)
+ return;
-+// copied from freetype with some modifications
-+
-+#ifndef FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
-+#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG('i', 'g', 'p', 'f')
-+#endif
-+
-+#ifndef FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY
-+#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG('i', 'g', 'p', 's')
-+#endif
-+
-+/* documentation is in freetype.h */
-+
-+FT_Error ___ft_New_Memory_Face(FT_Library library, const FT_Byte* file_base, FT_Long file_size, FT_Long face_index, FT_Face *aface) {
-+ FT_Open_Args args;
-+
-+ /* test for valid `library' and `face' delayed to FT_Open_Face() */
-+ if (!file_base)
-+ return FT_Err_Invalid_Argument;
-+
-+ FT_Parameter params[2];
-+ params[0].tag = FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY;
-+ params[0].data = 0;
-+ params[1].tag = FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY;
-+ params[1].data = 0;
-+ args.flags = FT_OPEN_MEMORY | FT_OPEN_PARAMS;
-+ args.memory_base = file_base;
-+ args.memory_size = file_size;
-+ args.stream = NULL;
-+ args.num_params = 2;
-+ args.params = params;
-+
-+ return FT_Open_Face(library, &args, face_index, aface);
-+}
-+
-+// end
-+
- static FcPattern *queryFont(const FcChar8 *file, const QByteArray &data, int id, FcBlanks *blanks, int *count)
- {
- #if FC_VERSION < 20402
-@@ -704,7 +740,7 @@ static FcPattern *queryFont(const FcChar8 *file, const QByteArray &data, int id,
- FcPattern *pattern = 0;
+ familyName = QString::fromUtf8((const char *)value);
++ if (familyName == QLatin1String("Open Sans")) {
++ FcChar8 *styl = 0;
++ if (FcPatternGetString(pattern, FC_STYLE, 0, &styl) == FcResultMatch) {
++ QString style = QString::fromUtf8(reinterpret_cast(styl));
++ if (style == QLatin1String("Semibold")) {
++ familyName.append(QChar(QChar::Space)).append(style);
++ }
++ }
++ }
- FT_Face face;
-- if (!FT_New_Memory_Face(lib, (const FT_Byte *)data.constData(), data.size(), id, &face)) {
-+ if (!___ft_New_Memory_Face(lib, (const FT_Byte *)data.constData(), data.size(), id, &face)) {
- *count = face->num_faces;
-
- pattern = FcFreeTypeQueryFace(face, file, id, blanks);
+ slant_value = FC_SLANT_ROMAN;
+ weight_value = FC_WEIGHT_REGULAR;
+@@ -742,6 +751,15 @@ QStringList QFontconfigDatabase::addApplicationFont(const QByteArray &fontData,
+ FcChar8 *fam = 0;
+ if (FcPatternGetString(pattern, FC_FAMILY, 0, &fam) == FcResultMatch) {
+ QString family = QString::fromUtf8(reinterpret_cast(fam));
++ if (family == QLatin1String("Open Sans")) {
++ FcChar8 *styl = 0;
++ if (FcPatternGetString(pattern, FC_STYLE, 0, &styl) == FcResultMatch) {
++ QString style = QString::fromUtf8(reinterpret_cast(styl));
++ if (style == QLatin1String("Semibold")) {
++ family.append(QChar(QChar::Space)).append(style);
++ }
++ }
++ }
+ families << family;
+ }
+ populateFromPattern(pattern);
diff --git a/qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index 9f2ff10..fe87ca1 100644
--- a/qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm