From 703361194e059f3f69b083251e8e54bf569afa9e Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 16 Feb 2015 18:30:32 +0300 Subject: [PATCH] version 0.7.15.dev prepared --- Telegram/PrepareWin.bat | 6 +- Telegram/Resources/lang.strings | 12 ++- Telegram/SourceFiles/application.cpp | 8 +- Telegram/SourceFiles/config.h | 4 +- Telegram/SourceFiles/lang.cpp | 10 ++- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | Bin 5540 -> 5540 bytes Telegram/Telegram.xcodeproj/project.pbxproj | 12 +-- Telegram/Version.sh | 2 +- Telegram/_qt_5_4_0_patch.diff | 82 ++++++++------------ 10 files changed, 66 insertions(+), 72 deletions(-) diff --git a/Telegram/PrepareWin.bat b/Telegram/PrepareWin.bat index 306570805..53acbb3aa 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 8476efef9..7a24798d9 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 03adc0074..be5f8cc57 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 009cd683c..521abbb0d 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 830135c52..38a90b07f 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 7ffa5883c..815827c35 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 15ba7829990df39e3b56716c71195b888cbf21f3..94deb6fb52420bd95c452cd03953ea25db5569fb 100644 GIT binary patch delta 53 zcmZ3Yy+nIM5ig_Z(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