diff --git a/common/loginpage/locale/hy.js b/common/loginpage/locale/hy.js index 30609a55f..d0f387c49 100644 --- a/common/loginpage/locale/hy.js +++ b/common/loginpage/locale/hy.js @@ -56,6 +56,7 @@ l10n.hy = { actActivate: 'Ակտիվացնել', actAbout: 'Մասին', actSettings: 'Կարգավորումներ', + actTemplates: 'Կաղապարներ', licKeyHolder: 'մուտքի ակտիվացման ծածկագիր', btnActivate: 'Ակտիվացնել', licGetLicense: 'Ստանալ լիցենզիան հիմա', @@ -81,7 +82,7 @@ l10n.hy = { settOptCheckDay: 'Ամեն օր', settOptCheckWeek: 'Ամեն շաբաթ', settScaling: 'Ինտերֆեյսի մասշտաբավորում', - settOptScalingAuto: 'Ավտոմատ', + settOptScalingAuto: 'Ավտո', aboutProFeaturesAvailable: 'Պրոֆեսիոնալ գործառույթների հասանելիությամբ', settUITheme: 'Ինտերֆեյսի թեմա', settOptThemeLight: 'Բաց', @@ -92,9 +93,19 @@ l10n.hy = { settOptLaunchInWindow: 'Պատուհանում', settSpellcheckDetection: 'Ուղղագրական լեզվի հայտնաբերում', settOptDisabled: 'Անջատված է', + settOptEnabled: 'Միացված է', aboutChangelog: 'Փոփոխությունների օրագիր', updateNoUpdates: 'Հավելվածը թարմացված է', updateAvialable: '$1 տարբերակը հասանելի է։Սեղմեք՝ ներբեռնելու համար։', settOptThemeSystem: 'Նույնը, ինչ համակարգը', settOptThemeContrastDark: 'Մութ հակադրություն', + settAUpdateMode: 'Ավտոթարմացման ռեժիմ', + settOptAUpdateSilent: 'Լուռ ռեժիմ', + settOptAUpdateAsk: 'Խնդրել ներբեռնել', + updateDownloadFinished: 'Ներբեռնումն ավարտված է։ Սեղմեք՝ տեղադրելու համար', + updateDownloadCanceled: 'Ներբեռնումը չեղարկվել է', + updateDownloadProgress: 'Ներբեռնվում է $1%: Սեղմեք դադարեցնելու համար', + settOptDescDisabled: "Ավտոմատ ստուգման թարմացումները կանջատվեն", + settOptDescAUpdateSilent: "Ներբեռնեք թարմացումները և հարցրեք նախքան տեղադրելը", + settOptDescAUpdateAsk: "Դուք կտեղեկացվեք թարմացումների բոլոր քայլերի մասին", } diff --git a/common/loginpage/src/panelconnect.js b/common/loginpage/src/panelconnect.js index aabe06776..72c604629 100644 --- a/common/loginpage/src/panelconnect.js +++ b/common/loginpage/src/panelconnect.js @@ -654,13 +654,14 @@ $('.btn-quick.logout',this.$panelPortalList).attr('tooltip',utils.Lang.menuLogout); }; - function _on_theme_changed(name) { - $('.carousel__slide__img > use').each((i, el) => { - const src = el.getAttribute('data-src'); - if ( name == 'theme-dark' ) - el.setAttribute('xlink:href', `#${src}-dark`); - else el.setAttribute('xlink:href', `#${src}-light`); - }); + function _on_theme_changed(name, type) { + if ( !!type ) + $('.carousel__slide__img > use').each((i, el) => { + const src = el.getAttribute('data-src'); + if ( type == 'dark' ) + el.setAttribute('xlink:href', `#${src}-dark`); + else el.setAttribute('xlink:href', `#${src}-light`); + }); } return { diff --git a/common/loginpage/src/panelsettings.js b/common/loginpage/src/panelsettings.js index 3598f06db..360d5828f 100644 --- a/common/loginpage/src/panelsettings.js +++ b/common/loginpage/src/panelsettings.js @@ -427,7 +427,7 @@ if ( nativevars.theme && nativevars.theme.system == 'disabled' ) _themes.shift(); - const _combo = $('#opts-ui-theme select', $panel); + const _combo = $('#opts-ui-theme select', $panel).empty(); _themes.forEach(item => { const entries = Object.entries(item)[0]; _combo.append(``); diff --git a/macos/ONLYOFFICE/Code/TouchBar/Controllers/ASCTouchBarController.m b/macos/ONLYOFFICE/Code/TouchBar/Controllers/ASCTouchBarController.m index e3eca6dbb..2714fbb26 100644 --- a/macos/ONLYOFFICE/Code/TouchBar/Controllers/ASCTouchBarController.m +++ b/macos/ONLYOFFICE/Code/TouchBar/Controllers/ASCTouchBarController.m @@ -389,7 +389,10 @@ - (void)tabs:(ASCTabsControl *)control didRemovedTab:(ASCTabView *)tab { if (self.tabs.count < 1) { [self invalidateTouchBar]; } else { - [self.tabsScrubber removeItemsAtIndexes:[NSIndexSet indexSetWithIndex:index]]; + __weak __typeof__(self) weakSelf = self; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.001 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [weakSelf.tabsScrubber removeItemsAtIndexes:[NSIndexSet indexSetWithIndex:index]]; + }); } } } diff --git a/macos/ONLYOFFICE/Code/Utils/ASCConstants.h b/macos/ONLYOFFICE/Code/Utils/ASCConstants.h index f1aea0a34..964893a51 100644 --- a/macos/ONLYOFFICE/Code/Utils/ASCConstants.h +++ b/macos/ONLYOFFICE/Code/Utils/ASCConstants.h @@ -93,6 +93,7 @@ static NSString * const ASCUserLastSavePath = @"asc_save_path"; static NSString * const ASCUserNameApp = @"asc_user_name_app"; static NSString * const ASCUserUILanguage = @"asc_user_ui_lang"; static NSString * const ASCUserUITheme = @"asc_user_ui_theme"; +static NSString * const ASCUserWebappsHelpUrl = @"user_webapps_help_url"; // Application event names static NSString * const ASCEventNameMainWindowSetFrame = @"UI_mainWindowSetFrame"; diff --git a/macos/ONLYOFFICE/Code/Utils/ASCEditorJSVariables.mm b/macos/ONLYOFFICE/Code/Utils/ASCEditorJSVariables.mm index 3144f260f..4f8d99996 100644 --- a/macos/ONLYOFFICE/Code/Utils/ASCEditorJSVariables.mm +++ b/macos/ONLYOFFICE/Code/Utils/ASCEditorJSVariables.mm @@ -44,6 +44,7 @@ #import "NSDictionary+Extensions.h" #import "NSString+Extensions.h" #import "ASCLinguist.h" +#import "ASCConstants.h" @interface ASCEditorJSVariables() @@ -69,12 +70,16 @@ - (id)init { _jsVariables = [NSMutableDictionary dictionary]; _urlParams = [NSMutableDictionary dictionary]; -#ifdef URL_WEBAPPS_HELP - NSString * url = URL_WEBAPPS_HELP; - NSLog(@"set web-apps help url %@", URL_WEBAPPS_HELP); - if (url && [url length]) - [_jsVariables setValue:URL_WEBAPPS_HELP forKey:@"helpUrl"]; -#endif + NSString * url = [[NSUserDefaults standardUserDefaults] valueForKey:ASCUserWebappsHelpUrl]; + if ( url == nil || url.length == 0 ) { + url = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"ASCWebappsHelpUrl"]; + } + + if (url && [url length]) { + [_jsVariables setValue:url forKey:@"helpUrl"]; + NSLog(@"set web-apps help url %@", url); + } + [self setParameter:@"lang" withString:[ASCLinguist appLanguageCode]]; } diff --git a/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/7.4.1/changes.html b/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/7.4.1/changes.html new file mode 100644 index 000000000..d688994ec --- /dev/null +++ b/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/7.4.1/changes.html @@ -0,0 +1,123 @@ + + + + + ONLYOFFICE Release Notes + + + +
+

ONLYOFFICE 7.4.1 - {{DATE}}

+ +

Fixes

+ +

All Editors

+ +

Document Editor

+ +

Spreadsheet Editor

+ +

Presentation Editor

+ +
+ + diff --git a/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/7.4.1/changes.ru.html b/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/7.4.1/changes.ru.html new file mode 100644 index 000000000..c1bc1c565 --- /dev/null +++ b/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/7.4.1/changes.ru.html @@ -0,0 +1,123 @@ + + + + + История изменений ONLYOFFICE + + + +
+

ONLYOFFICE 7.4.1 - {{DATE}}

+ +

Исправления

+ +

Все редакторы

+ +

Редактор документов

+ +

Редактор таблиц

+ +

Редактор презентаций

+ +
+ + diff --git a/win-linux/extras/projicons/res/cell.ico b/win-linux/extras/projicons/res/cell.ico index 567b16128..736cdffc9 100644 Binary files a/win-linux/extras/projicons/res/cell.ico and b/win-linux/extras/projicons/res/cell.ico differ diff --git a/win-linux/extras/projicons/res/form.ico b/win-linux/extras/projicons/res/form.ico index 1cafd44b8..ce5f95347 100644 Binary files a/win-linux/extras/projicons/res/form.ico and b/win-linux/extras/projicons/res/form.ico differ diff --git a/win-linux/extras/projicons/res/slide.ico b/win-linux/extras/projicons/res/slide.ico index 679223b46..fd02990eb 100644 Binary files a/win-linux/extras/projicons/res/slide.ico and b/win-linux/extras/projicons/res/slide.ico differ diff --git a/win-linux/extras/projicons/res/word.ico b/win-linux/extras/projicons/res/word.ico index cf1dfe1b5..51e0c7fb3 100644 Binary files a/win-linux/extras/projicons/res/word.ico and b/win-linux/extras/projicons/res/word.ico differ diff --git a/win-linux/package/windows/DesktopEditors.aip b/win-linux/package/windows/DesktopEditors.aip index 826459ecb..0af2b8a40 100644 --- a/win-linux/package/windows/DesktopEditors.aip +++ b/win-linux/package/windows/DesktopEditors.aip @@ -6,16 +6,18 @@ - - + + + + - + @@ -43,16 +45,17 @@ - - - + + + + - + - + @@ -92,16 +95,18 @@ - - - - - - - - - - + + + + + + + + + + + + @@ -109,7 +114,6 @@ - @@ -142,28 +146,27 @@ - - - - + + + + - - + - - - - + + + + @@ -199,9 +202,13 @@ + + + + - - + + @@ -245,10 +252,6 @@ - - - - @@ -258,7 +261,6 @@ - @@ -786,7 +788,6 @@ - @@ -817,12 +818,10 @@ - - - - - + + + @@ -871,10 +870,10 @@ - - - - + + + + @@ -882,7 +881,6 @@ - @@ -942,16 +940,17 @@ - - + + - + + @@ -960,7 +959,7 @@ - + @@ -973,11 +972,11 @@ - - - - - + + + + + @@ -1078,10 +1077,10 @@ - - - - + + + + @@ -1226,10 +1225,10 @@ - + - + @@ -1299,30 +1298,24 @@ - - - - - + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/win-linux/package/windows/common.iss b/win-linux/package/windows/common.iss index 6f61f7a16..df15f6ba5 100644 --- a/win-linux/package/windows/common.iss +++ b/win-linux/package/windows/common.iss @@ -529,7 +529,26 @@ gl.WarningClearAppData =Quere borrar a configuración do usuario e os datos da c ;si.AssociateDescription =%1 සමඟ කාර්යාල ලේඛන ගොනු වර්ග සම්බන්ධ කරන්න ;zh_HK.AssociateDescription =與文書處理檔案類型聯結 %1 ;====================================================================================================== -en.UpdateService =Service for update {#sAppName} +en.UpdateService =Update service for {#sAppName} +cs.UpdateService =Služba aktualizace {#sAppName} +fi.UpdateService =Palvelu päivitystä varten {#sAppName} +el.UpdateService =Υπηρεσία για ενημέρωση {#sAppName} +nl.UpdateService =Dienst voor update {#sAppName} +ru.UpdateService =Сервис обновлений {#sAppName} +fr.UpdateService =Service de mise à jour {#sAppName} +it_IT.UpdateService =Servizio per l'aggiornamento {#sAppName} +pt_BR.UpdateService =Serviço para atualização {#sAppName} +;pt_PT.UpdateService =Serviço para atualizar {#sAppName} +pl.UpdateService =Usługa do aktualizacji {#sAppName} +ro.UpdateService =Serviciu de actualizare {#sAppName} +sk.UpdateService =Služba aktualizácie {#sAppName} +sl.UpdateService =Storitev za posodobitev {#sAppName} +tr.UpdateService ={#sAppName} için hizmet güncellemesi +vi.UpdateService =Dịch vụ cập nhật {#sAppName} +ja.UpdateService =アップデートサービス{#sAppName} +ko.UpdateService ={#sAppName} 업데이트 서비스 +lv.UpdateService =Pakalpojums atjauninājumam {#sAppName} +uk.UpdateService =Сервіс для оновлення {#sAppName} [Code] const @@ -980,13 +999,9 @@ Source: {#DEPLOY_PATH}\*; DestDir: {app}; Flags: r Source: {#DEPLOY_PATH}\*; DestDir: {app}; Excludes: "editors\web-apps\apps\*\main\resources\help"; Flags: recursesubdirs; #endif Source: {#DEPLOY_PATH}\*.exe; DestDir: {app}; Flags: signonce; -Source: {#DEPLOY_PATH}\ascdocumentscore.dll; DestDir: {app}; Flags: signonce; -Source: {#DEPLOY_PATH}\hunspell.dll; DestDir: {app}; Flags: signonce; -Source: {#DEPLOY_PATH}\ooxmlsignature.dll; DestDir: {app}; Flags: signonce; -Source: {#DEPLOY_PATH}\qtascdocumentscore.dll; DestDir: {app}; Flags: signonce; -Source: {#DEPLOY_PATH}\videoplayer.dll; DestDir: {app}; Flags: signonce; -Source: {#DEPLOY_PATH}\converter\*.dll; DestDir: {app}\converter; Flags: signonce; +Source: {#DEPLOY_PATH}\*.dll; DestDir: {app}; Flags: signonce; Source: {#DEPLOY_PATH}\converter\*.exe; DestDir: {app}\converter; Flags: signonce; +Source: {#DEPLOY_PATH}\converter\*.dll; DestDir: {app}\converter; Flags: signonce; Source: ..\..\..\common\converter\package.config; DestDir: {app}\converter; [InstallDelete] diff --git a/win-linux/package/windows/dictionary.ail b/win-linux/package/windows/dictionary.ail index f8ac6f985..80a501d98 100644 --- a/win-linux/package/windows/dictionary.ail +++ b/win-linux/package/windows/dictionary.ail @@ -49,11 +49,37 @@ + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + @@ -76,17 +102,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - + @@ -210,13 +267,37 @@ - + + + + + + + + + - + + + + + + + + + - + + + + + + + + + @@ -229,6 +310,17 @@ + + + + + + + + + + + diff --git a/win-linux/package/windows/make_zip.ps1 b/win-linux/package/windows/make_zip.ps1 index cfbcaa589..93642490f 100644 --- a/win-linux/package/windows/make_zip.ps1 +++ b/win-linux/package/windows/make_zip.ps1 @@ -1,5 +1,7 @@ param ( - [string]$DesktopPath = "build\DesktopEditors", + [string]$BuildDir = "build", + [string]$DesktopDir = "DesktopEditors", + [string]$MultimediaDir, [Parameter(Mandatory)][string]$OutFile, [switch]$ExcludeHelp, [switch]$Sign, @@ -11,35 +13,51 @@ $ErrorActionPreference = "Stop" Set-Location $PSScriptRoot # Check directory -if ( -Not (Test-Path -Path $DesktopPath) ) { - Write-Error "Path $DesktopPath does not exist" +if ( -Not (Test-Path -Path $BuildDir) ) { + Write-Error "Path $BuildDir does not exist" } if ( $Sign ) { - Set-Location $DesktopPath - - $SignFiles = Get-ChildItem *.exe, converter\*.exe, converter\*.dll, ` - ascdocumentscore.dll, hunspell.dll, ooxmlsignature.dll, ` - qtascdocumentscore.dll, videoplayer.dll | - Resolve-Path -Relative - # Sign - Write-Host "signtool sign /a /n $CertName /t $TimestampServer /v $SignFiles" -ForegroundColor Yellow - & signtool sign /a /n $CertName /t $TimestampServer /v $SignFiles - if ( $LastExitCode -ne 0 ) { throw } - # Verify - Write-Host "signtool verify /pa /all /v $SignFiles" -ForegroundColor Yellow - & signtool verify /pa /all /v $SignFiles - if ( $LastExitCode -ne 0 ) { throw } - - Set-Location $PSScriptRoot + if ( $DesktopDir ) { + Set-Location "$BuildDir\$DesktopDir" + + $SignFiles = Get-ChildItem *.exe, *.dll, converter\*.exe, converter\*.dll ` + | Resolve-Path -Relative + # Sign + Write-Host "signtool sign /a /n $CertName /t $TimestampServer /v $SignFiles" -ForegroundColor Yellow + & signtool sign /a /n $CertName /t $TimestampServer /v $SignFiles + if ( $LastExitCode -ne 0 ) { throw } + # Verify + Write-Host "signtool verify /pa /all /v $SignFiles" -ForegroundColor Yellow + & signtool verify /pa /all /v $SignFiles + if ( $LastExitCode -ne 0 ) { throw } + + Set-Location $PSScriptRoot + } + + if ( $MultimediaDir ) { + Set-Location "$BuildDir\$MultimediaDir" + + $SignFiles = Get-ChildItem *.exe, *.dll | Resolve-Path -Relative + # Sign + Write-Host "signtool sign /a /n $CertName /t $TimestampServer /v $SignFiles" -ForegroundColor Yellow + & signtool sign /a /n $CertName /t $TimestampServer /v $SignFiles + if ( $LastExitCode -ne 0 ) { throw } + # Verify + Write-Host "signtool verify /pa /all /v $SignFiles" -ForegroundColor Yellow + & signtool verify /pa /all /v $SignFiles + if ( $LastExitCode -ne 0 ) { throw } + + Set-Location $PSScriptRoot + } } # Create archive if ( !$ExcludeHelp ) { - Write-Host "7z a -y $OutFile .\$DesktopPath\*" -ForegroundColor Yellow - & 7z a -y $OutFile .\$DesktopPath\* + Write-Host "7z a -y $OutFile .\$BuildDir\*" -ForegroundColor Yellow + & 7z a -y $OutFile .\$BuildDir\* } else { - Write-Host "7z a -y $OutFile .\$DesktopPath\* -xr!editors\web-apps\apps\*\main\resources\help" -ForegroundColor Yellow - & 7z a -y $OutFile .\$DesktopPath\* -xr!editors\web-apps\apps\*\main\resources\help + Write-Host "7z a -y $OutFile .\$BuildDir\* -xr!$DesktopDir\editors\web-apps\apps\*\main\resources\help" -ForegroundColor Yellow + & 7z a -y $OutFile .\$BuildDir\* -xr!$DesktopDir\editors\web-apps\apps\*\main\resources\help } if ( $LastExitCode -ne 0 ) { throw } diff --git a/win-linux/package/windows/update/changes/7.4.1/changes.html b/win-linux/package/windows/update/changes/7.4.1/changes.html new file mode 100644 index 000000000..cdbf4c114 --- /dev/null +++ b/win-linux/package/windows/update/changes/7.4.1/changes.html @@ -0,0 +1,86 @@ + + + + + ONLYOFFICE Desktop Editors Release Notes + + + +
+

ONLYOFFICE Desktop Editors 7.4.1 - {{DATE}}

+ +

Fixes

+ +

All Editors

+
    +
  • Fixed vulnerabilities with checking the integrity of a digital signature, after manipulations with the document structure
  • +
  • Editors now display the correct error when trying to write a file, opened in another application
  • +
  • Fixed an error that occurs when opening multiple files using drag'n'drop
  • +
  • Fixed an issue when opening templates which contain slashes in their names
  • +
  • Fixed incorrect name for the next tab after closing and saving the document in front of it
  • +
  • The latest changes in the file are now included when sending via the Send plugin, if they have not been saved
  • +
  • Fixed the processing of the link, that ends with default.aspx, when connecting to the Workspace portal
  • +
  • The Open file location button for a document opened from the portal in a separate window without the main one now works
  • +
  • Fixed working with tabs when documents are opened from the portal and the user logs out on the Connect to cloud page
  • +
  • Fixed online help for macOS systems
  • +
  • Updated sets of application icons for Jump List (Tasks) on Windows systems
  • +
  • All components in Windows installation packages are now digitally signed
  • +
  • A large number of fixes and improvements to the MSI installation package
  • +
+

Document Editor

+
    +
  • Fixed displaying of nonprinting characters after calling the print preview window
  • +
+

Spreadsheet Editor

+
    +
  • Fixed displaying of a document when printing to PDF if the width/height of columns/rows were changed
  • +
  • Fixed the scrollbar display in the filtering window for legacy systems
  • +
+

Presentation Editor

+
    +
  • Fixed an error during slideshow autorun and with system scale >200% when opening multiple files using drag'n'drop
  • +
+ + +
+ + diff --git a/win-linux/package/windows/update/changes/7.4.1/changes_ru.html b/win-linux/package/windows/update/changes/7.4.1/changes_ru.html new file mode 100644 index 000000000..9f8e2e684 --- /dev/null +++ b/win-linux/package/windows/update/changes/7.4.1/changes_ru.html @@ -0,0 +1,86 @@ + + + + + История изменений ONLYOFFICE Desktop Editors + + + +
+

ONLYOFFICE Desktop Editors 7.4.1 - {{DATE}}

+ +

Исправления

+ +

Все редакторы

+
    +
  • Исправлены уязвимости с проверкой целостности цифровой подписи, после манипуляций со структурой документа
  • +
  • Редакторы теперь отображают корректную ошибку при попытке записать файл, открытый в другом приложении
  • +
  • Исправлена ошибка, возникающая при открытии нескольких файлов с помощью drag'n'drop
  • +
  • Исправлена проблема при открытии шаблонов, в имени которых присутствуют слэши
  • +
  • Исправлено некорректное имя для следующей вкладки после закрытия и сохранения документа перед ней
  • +
  • Последние изменения в файле теперь включаются при отправке через плагин Отправить, если не были сохранены
  • +
  • Исправлена обработка ссылки, которая заканчивается default.aspx, при подключении к Workspace порталу
  • +
  • Кнопка Открыть расположение файла для документа, открытого с портала в отдельном окне без главного, теперь работает
  • +
  • Исправлена работа с вкладками, когда документы открыты с портала и пользователь выходит из системы на странице Подключиться к облаку
  • +
  • Исправлена работа онлайн справки для macOS систем
  • +
  • Обновлены наборы иконок приложения для Списка Переходов (Задач) на системах Windows
  • +
  • Все компоненты в пакетах установки под Windows теперь имеют цифровую подпись
  • +
  • Большое количество исправлений и доработок пакета установки MSI
  • +
+

Редактор документов

+
    +
  • Исправлено отображение непечатаемых символов после вызова окна предварительного просмотра печати
  • +
+

Редактор таблиц

+
    +
  • Исправлено отображение документа при печати в PDF, если ширина/высота столбцов/строк были изменены
  • +
  • Исправлено отображение полосы прокрутки в окне фильтрации для устаревших систем
  • +
+

Редактор презентаций

+
    +
  • Исправлена ошибка во время автозапуска слайдшоу и с системным масштабом >200%, при открытии нескольких файлов с помощью drag'n'drop
  • +
+ + +
+ + diff --git a/win-linux/src/cascapplicationmanagerwrapper.cpp b/win-linux/src/cascapplicationmanagerwrapper.cpp index ad13e7d2f..69ff711e5 100644 --- a/win-linux/src/cascapplicationmanagerwrapper.cpp +++ b/win-linux/src/cascapplicationmanagerwrapper.cpp @@ -354,6 +354,9 @@ bool CAscApplicationManagerWrapper::processCommonEvent(NSEditorApi::CAscCefMenuE if ( !(cmd.find(L"go:folder") == std::wstring::npos) ) { if ( pData->get_Param() == L"offline" ) {} else { + if ( !m_pMainWindow || !m_pMainWindow->isVisible() ) + gotoMainWindow(); + mainWindow()->onFileLocation(-1, QString::fromStdWString(pData->get_Param())); #ifdef Q_OS_LINUX mainWindow()->bringToTop(); diff --git a/win-linux/src/components/asctabwidget.cpp b/win-linux/src/components/asctabwidget.cpp index e5e0683d7..2f25ec0a4 100644 --- a/win-linux/src/components/asctabwidget.cpp +++ b/win-linux/src/components/asctabwidget.cpp @@ -291,7 +291,6 @@ void CAscTabWidget::closeEditor(int i, bool m, bool r) CAscTabData * doc = view->data(); if (doc && (!m || !doc->hasChanges())) { - m_pBar->removeTab(i); doc->close(); AscAppManager::getInstance().DestroyCefView(view->cef()->GetId()); diff --git a/win-linux/src/cupdatemanager.cpp b/win-linux/src/cupdatemanager.cpp index ec03392d9..88a179ee4 100644 --- a/win-linux/src/cupdatemanager.cpp +++ b/win-linux/src/cupdatemanager.cpp @@ -491,9 +491,13 @@ void CUpdateManager::handleAppClose() { if ( m_restartForUpdate ) { if (m_packageData->fileType != "archive") { - GET_REGISTRY_SYSTEM(reg_system) - QString prev_inst_lang = " /LANG=" + reg_system.value("locale", "en").toString(); - if (!runProcess(m_packageData->fileName.toStdWString(), m_packageData->packageArgs + prev_inst_lang.toStdWString())) { + wstring args = m_packageData->packageArgs; + if (m_packageData->fileType == "iss") { + GET_REGISTRY_SYSTEM(reg_system) + QString prev_inst_lang = " /LANG=" + reg_system.value("locale", "en").toString(); + args += prev_inst_lang.toStdWString(); + } + if (!runProcess(m_packageData->fileName.toStdWString(), args)) { criticalMsg(nullptr, QObject::tr("An error occurred while start install updates!")); } } else { diff --git a/win-linux/src/windows/ceditorwindow.cpp b/win-linux/src/windows/ceditorwindow.cpp index 2bb6bf7ca..4205d9436 100644 --- a/win-linux/src/windows/ceditorwindow.cpp +++ b/win-linux/src/windows/ceditorwindow.cpp @@ -454,9 +454,9 @@ bool CEditorWindow::event(QEvent * event) return CWindowPlatform::event(event); } -void CEditorWindow::setScreenScalingFactor(double factor) +void CEditorWindow::setScreenScalingFactor(double factor, bool resize) { - CWindowPlatform::setScreenScalingFactor(factor); + CWindowPlatform::setScreenScalingFactor(factor, resize); if (isCustomWindowStyle()) { m_boxTitleBtns->setFixedHeight(int(TOOLBTN_HEIGHT * factor)); if (m_pSpacer && !d_ptr->usedOldEditorVersion) { diff --git a/win-linux/src/windows/ceditorwindow.h b/win-linux/src/windows/ceditorwindow.h index ddc0b6e0c..f1b7d93a9 100644 --- a/win-linux/src/windows/ceditorwindow.h +++ b/win-linux/src/windows/ceditorwindow.h @@ -83,7 +83,7 @@ class CEditorWindow : public CWindowPlatform virtual void onMinimizeEvent() final; virtual void onMaximizeEvent() final; virtual bool event(QEvent *) final; - virtual void setScreenScalingFactor(double) final; + virtual void setScreenScalingFactor(double, bool resize = true) final; QMetaObject::Connection m_modalSlotConnection; QString m_css; diff --git a/win-linux/src/windows/cmainwindow.cpp b/win-linux/src/windows/cmainwindow.cpp index bb68cf2b6..b6653f7d1 100644 --- a/win-linux/src/windows/cmainwindow.cpp +++ b/win-linux/src/windows/cmainwindow.cpp @@ -548,6 +548,7 @@ void CMainWindow::onEditorAllowedClose(int uid) QWidget * _view = m_pTabs->widget(_index); _view->deleteLater(); + m_pTabs->tabBar()->removeTab(_index); m_pTabs->removeTab(_index); //m_pTabs->adjustTabsSize(); @@ -685,7 +686,7 @@ void CMainWindow::onPortalLogout(std::wstring wjson) if( jerror.error == QJsonParseError::NoError ) { QJsonObject objRoot = jdoc.object(); - QString _portal = objRoot["portal"].toString(), + QString _portal = objRoot["domain"].toString(), _action; if ( objRoot.contains("onsuccess") ) @@ -1386,9 +1387,9 @@ void CMainWindow::updateScalingFactor(double dpiratio) m_pButtonMain->setIconSize(MAIN_ICON_SIZE * dpiratio); } -void CMainWindow::setScreenScalingFactor(double factor) +void CMainWindow::setScreenScalingFactor(double factor, bool resize) { - CWindowPlatform::setScreenScalingFactor(factor); + CWindowPlatform::setScreenScalingFactor(factor, resize); QString css(AscAppManager::getWindowStylesheets(factor)); if (!css.isEmpty()) { m_pMainPanel->setStyleSheet(css); diff --git a/win-linux/src/windows/cmainwindow.h b/win-linux/src/windows/cmainwindow.h index aae4c9f84..b55ca7fc3 100644 --- a/win-linux/src/windows/cmainwindow.h +++ b/win-linux/src/windows/cmainwindow.h @@ -100,7 +100,7 @@ class CMainWindow : public CWindowPlatform, public CScalingWrapper void setMouseTracking(bool); #endif void doOpenLocalFile(COpenOptions&); - virtual void setScreenScalingFactor(double) final; + virtual void setScreenScalingFactor(double, bool resize = true) final; virtual void updateScalingFactor(double) final; protected: diff --git a/win-linux/src/windows/cpresenterwindow.cpp b/win-linux/src/windows/cpresenterwindow.cpp index 056cfa94f..54f39d17e 100644 --- a/win-linux/src/windows/cpresenterwindow.cpp +++ b/win-linux/src/windows/cpresenterwindow.cpp @@ -168,9 +168,9 @@ QWidget * CPresenterWindow::createMainPanel(QWidget * parent, const QString& tit return mainPanel; } -void CPresenterWindow::setScreenScalingFactor(double factor) +void CPresenterWindow::setScreenScalingFactor(double factor, bool resize) { - CWindowPlatform::setScreenScalingFactor(factor); + CWindowPlatform::setScreenScalingFactor(factor, resize); QString css(AscAppManager::getWindowStylesheets(factor)); if (!css.isEmpty()) { m_pMainPanel->setStyleSheet(css); diff --git a/win-linux/src/windows/cpresenterwindow.h b/win-linux/src/windows/cpresenterwindow.h index 21cbea943..62254bff8 100644 --- a/win-linux/src/windows/cpresenterwindow.h +++ b/win-linux/src/windows/cpresenterwindow.h @@ -55,7 +55,7 @@ class CPresenterWindow : public CWindowPlatform private: QWidget * createMainPanel(QWidget *, const QString&, QWidget * view = nullptr); - virtual void setScreenScalingFactor(double) final; + virtual void setScreenScalingFactor(double, bool resize = true) final; virtual void onCloseEvent() final; virtual void focus() final; }; diff --git a/win-linux/src/windows/cwindowbase.cpp b/win-linux/src/windows/cwindowbase.cpp index 77162fcda..e17a43611 100644 --- a/win-linux/src/windows/cwindowbase.cpp +++ b/win-linux/src/windows/cwindowbase.cpp @@ -112,11 +112,11 @@ bool CWindowBase::isCustomWindowStyle() return pimpl->is_custom_window_; } -void CWindowBase::updateScaling() +void CWindowBase::updateScaling(bool resize) { double dpi_ratio = Utils::getScreenDpiRatioByWidget(this); if ( dpi_ratio != m_dpiRatio ) { - setScreenScalingFactor(dpi_ratio); + setScreenScalingFactor(dpi_ratio, resize); adjustGeometry(); } } @@ -241,10 +241,10 @@ bool CWindowBase::event(QEvent *event) return QMainWindow::event(event); } -void CWindowBase::setScreenScalingFactor(double factor) +void CWindowBase::setScreenScalingFactor(double factor, bool resize) { - setMinimumSize(0,0); - if (!isMaximized() && !QGuiApplication::queryKeyboardModifiers().testFlag(Qt::MetaModifier)) { + if (resize && !isMaximized()) { + setMinimumSize(0,0); double change_factor = factor / m_dpiRatio; QRect _src_rect = geometry(); double dest_width_change = _src_rect.width() * (1 - change_factor); diff --git a/win-linux/src/windows/cwindowbase.h b/win-linux/src/windows/cwindowbase.h index ead336efa..9da7d0c1b 100644 --- a/win-linux/src/windows/cwindowbase.h +++ b/win-linux/src/windows/cwindowbase.h @@ -68,7 +68,7 @@ class CWindowBase : public QMainWindow QWidget * handle() const; bool isCustomWindowStyle(); - void updateScaling(); + void updateScaling(bool resize = true); virtual void adjustGeometry() = 0; virtual void setWindowColors(const QColor&, const QColor& border = QColor()); virtual void applyTheme(const std::wstring&); @@ -84,7 +84,7 @@ class CWindowBase : public QMainWindow void moveToPrimaryScreen(); void setIsCustomWindowStyle(bool); virtual bool event(QEvent*); - virtual void setScreenScalingFactor(double); + virtual void setScreenScalingFactor(double, bool resize = true); virtual void applyWindowState(); virtual void setWindowTitle(const QString&); virtual void onMinimizeEvent(); diff --git a/win-linux/src/windows/platform_linux/cwindowplatform.cpp b/win-linux/src/windows/platform_linux/cwindowplatform.cpp index 003dc59ba..6ece7c642 100644 --- a/win-linux/src/windows/platform_linux/cwindowplatform.cpp +++ b/win-linux/src/windows/platform_linux/cwindowplatform.cpp @@ -131,10 +131,10 @@ bool CWindowPlatform::nativeEvent(const QByteArray &ev_type, void *msg, long *re return CWindowBase::nativeEvent(ev_type, msg, res); } -void CWindowPlatform::setScreenScalingFactor(double factor) +void CWindowPlatform::setScreenScalingFactor(double factor, bool resize) { CX11Decoration::onDpiChanged(factor); - CWindowBase::setScreenScalingFactor(factor); + CWindowBase::setScreenScalingFactor(factor, resize); } /** Private **/ diff --git a/win-linux/src/windows/platform_linux/cwindowplatform.h b/win-linux/src/windows/platform_linux/cwindowplatform.h index 6f64dffd5..e2874acd4 100644 --- a/win-linux/src/windows/platform_linux/cwindowplatform.h +++ b/win-linux/src/windows/platform_linux/cwindowplatform.h @@ -53,7 +53,7 @@ class CWindowPlatform : public CWindowBase, public CX11Decoration virtual void onMinimizeEvent() override; virtual bool event(QEvent *event) override; virtual bool nativeEvent(const QByteArray&, void*, long*) final; - virtual void setScreenScalingFactor(double) override; + virtual void setScreenScalingFactor(double, bool resize = true) override; private: virtual void mouseMoveEvent(QMouseEvent *) final; diff --git a/win-linux/src/windows/platform_win/cwindowplatform.cpp b/win-linux/src/windows/platform_win/cwindowplatform.cpp index cd0fee4b3..fb214b655 100644 --- a/win-linux/src/windows/platform_win/cwindowplatform.cpp +++ b/win-linux/src/windows/platform_win/cwindowplatform.cpp @@ -181,10 +181,26 @@ bool CWindowPlatform::nativeEvent(const QByteArray &eventType, void *message, lo switch (msg->message) { case WM_DPICHANGED: { - if (!WindowHelper::isLeftButtonPressed() || AscAppManager::IsUseSystemScaling()) { - updateScaling(); + setMinimumSize(0,0); + if (AscAppManager::IsUseSystemScaling()) { + if (WindowHelper::isLeftButtonPressed() || (m_scaleChanged && !isMaximized())) { + RECT *prefRect = (RECT*)msg->lParam; + setGeometry(prefRect->left, prefRect->top, prefRect->right - prefRect->left, prefRect->bottom - prefRect->top); + } + QTimer::singleShot(0, this, [=]() { + updateScaling(false); + }); + } else + if (m_scaleChanged && !isMaximized()) { + RECT *prefRect = (RECT*)msg->lParam; + setGeometry(prefRect->left, prefRect->top, prefRect->right - prefRect->left, prefRect->bottom - prefRect->top); } -// qDebug() << "WM_DPICHANGED: " << LOWORD(msg->wParam); + m_scaleChanged = false; + break; + } + + case WM_DISPLAYCHANGE: { + m_scaleChanged = true; break; } @@ -283,7 +299,9 @@ bool CWindowPlatform::nativeEvent(const QByteArray &eventType, void *message, lo case WM_SETFOCUS: { if (!m_closed && IsWindowEnabled(m_hWnd)) { - focus(); + QTimer::singleShot(0, this, [=]() { + focus(); + }); } m_propertyTimer->stop(); if (property("stabilized").toBool()) diff --git a/win-linux/src/windows/platform_win/cwindowplatform.h b/win-linux/src/windows/platform_win/cwindowplatform.h index e170bfb90..5ca8d2414 100644 --- a/win-linux/src/windows/platform_win/cwindowplatform.h +++ b/win-linux/src/windows/platform_win/cwindowplatform.h @@ -64,7 +64,8 @@ class CWindowPlatform : public CWindowBase bool m_borderless, m_closed, m_isResizeable, - m_allowMaximize; + m_allowMaximize, + m_scaleChanged = false; }; #endif // CWINDOWPLATFORM_H