From c4bf81c2a9f82ec063bc023c55497d5f5f0f7dbd Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Fri, 27 Oct 2023 12:55:57 +0300 Subject: [PATCH 1/7] [win-nix] added command to change portal's tab color --- win-linux/src/ccefeventstransformer.cpp | 3 +++ win-linux/src/components/asctabwidget.cpp | 14 ++++++------- win-linux/src/components/asctabwidget.h | 2 +- win-linux/src/windows/cmainwindow.cpp | 24 +++++++++++++++++++---- win-linux/src/windows/cmainwindow.h | 1 + 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/win-linux/src/ccefeventstransformer.cpp b/win-linux/src/ccefeventstransformer.cpp index 59c33a11f..ae662429e 100644 --- a/win-linux/src/ccefeventstransformer.cpp +++ b/win-linux/src/ccefeventstransformer.cpp @@ -210,6 +210,9 @@ void CCefEventsTransformer::OnEvent(QObject * target, NSEditorApi::CAscCefMenuEv // if ( !(cmd.find(L"files:check") == std::wstring::npos) ) { // QMetaObject::invokeMethod( target, "onLocalFilesCheck", Qt::QueuedConnection, // Q_ARG(QString, QString::fromStdWString(pData->get_Param())) ); + if ( cmd.compare(L"portal:uitheme") == 0 ) { + QMetaObject::invokeMethod(target, "onPortalUITheme", Qt::QueuedConnection, Q_ARG(std::wstring, pData->get_Param())); + } else if ( !(cmd.find(L"files:explore") == std::wstring::npos) ) { QMetaObject::invokeMethod( target, "onLocalFileLocation", Qt::QueuedConnection, Q_ARG(QString, QString::fromStdWString(pData->get_Param())) ); diff --git a/win-linux/src/components/asctabwidget.cpp b/win-linux/src/components/asctabwidget.cpp index ca9a21346..e4207de5e 100644 --- a/win-linux/src/components/asctabwidget.cpp +++ b/win-linux/src/components/asctabwidget.cpp @@ -513,15 +513,15 @@ void CAscTabWidget::setTabActiveColor(int index, const std::wstring& color) { } -void CAscTabWidget::setTabThemeType(int index, const QString& type) +void CAscTabWidget::setTabTheme(int index, const QString& type, const QString& color) { if ( !(index < 0) && index < count() ) { - if ( type == "dark" ) { - m_pBar->setActiveTabColor(index, "#333"); - m_pBar->setTabThemeType(index, CTabBar::DarkTab); - } else { - m_pBar->setActiveTabColor(index, "#fff"); - m_pBar->setTabThemeType(index, CTabBar::LightTab); + if ( !type.isEmpty() ) { + m_pBar->setTabThemeType(index, type == "dark" ? CTabBar::DarkTab : CTabBar::LightTab); + } + + if ( !color.isEmpty() ) { + m_pBar->setActiveTabColor(index, color); } } } diff --git a/win-linux/src/components/asctabwidget.h b/win-linux/src/components/asctabwidget.h index bdaa57da1..50a8cdd44 100644 --- a/win-linux/src/components/asctabwidget.h +++ b/win-linux/src/components/asctabwidget.h @@ -184,7 +184,7 @@ class CAscTabWidget : public QStackedWidget, public CScalingWrapper void setTabIcons(CTabIconSet&); void reloadTabIcons(); void setTabActiveColor(int index, const std::wstring& color); - void setTabThemeType(int index, const QString& type); + void setTabTheme(int index, const QString& type, const QString& color); void setFocusedView(int index = -1); void setFullScreen(bool, int id = -1); QWidget * fullScreenWidget(); diff --git a/win-linux/src/windows/cmainwindow.cpp b/win-linux/src/windows/cmainwindow.cpp index 9daf52c7d..9e22d95c4 100644 --- a/win-linux/src/windows/cmainwindow.cpp +++ b/win-linux/src/windows/cmainwindow.cpp @@ -697,11 +697,27 @@ void CMainWindow::onPortalLogin(int viewid, const std::wstring &json) if( jerror.error == QJsonParseError::NoError ) { QJsonObject objRoot = jdoc.object(); QString _ui_theme = objRoot["uiTheme"].toString(); - if ( !_ui_theme.isEmpty() ) { -// onFileLocation(vid, _url); - if ( _ui_theme == "default-dark" ) - m_pTabs->setTabThemeType(m_pTabs->tabIndexByView(viewid), "dark"); + if ( !_ui_theme.isEmpty() ) + onPortalUITheme(viewid, _ui_theme.toStdWString()); + } + } +} + +void CMainWindow::onPortalUITheme(int viewid, const std::wstring& json) +{ + if ( !json.empty() ) { + if ( json.rfind(L"default-", 0) == 0 ) { + if ( json.compare(L"default-dark") == 0 ) + m_pTabs->setTabTheme(m_pTabs->tabIndexByView(viewid), "dark", "#333"); + else m_pTabs->setTabTheme(m_pTabs->tabIndexByView(viewid), "light", "#fff"); + } else { + QJsonParseError jerror; + QJsonDocument jdoc = QJsonDocument::fromJson(QString::fromStdWString(json).toLatin1(), &jerror); + + if( jerror.error == QJsonParseError::NoError ) { + QJsonObject objRoot = jdoc.object(); + m_pTabs->setTabTheme(m_pTabs->tabIndexByView(viewid), objRoot["type"].toString(), objRoot["color"].toString()); } } } diff --git a/win-linux/src/windows/cmainwindow.h b/win-linux/src/windows/cmainwindow.h index 0f826a69b..77e04e2c7 100644 --- a/win-linux/src/windows/cmainwindow.h +++ b/win-linux/src/windows/cmainwindow.h @@ -137,6 +137,7 @@ public slots: void onPortalOpen(QString); void onPortalLogout(std::wstring portal); void onPortalLogin(int viewid, const std::wstring& json); + void onPortalUITheme(int viewid, const std::wstring& json); void onPortalNew(QString); void onPortalCreate(); void onOutsideAuth(QString); From d8aba6ac88fd13baae0c7deeb0219dba348171e1 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Tue, 31 Oct 2023 10:32:27 +0300 Subject: [PATCH 2/7] fixed changelog for ver 7.5.1 --- common/changes/7.5.1/changes.html | 45 +++++++------------ common/changes/7.5.1/changes_ru.html | 45 +++++++------------ .../ONLYOFFICE/changes/7.5.1/changes.html | 2 +- .../windows/update/changes/7.5.1/changes.html | 5 ++- .../update/changes/7.5.1/changes_ru.html | 13 +++--- 5 files changed, 43 insertions(+), 67 deletions(-) diff --git a/common/changes/7.5.1/changes.html b/common/changes/7.5.1/changes.html index 62400401d..95bad7d06 100644 --- a/common/changes/7.5.1/changes.html +++ b/common/changes/7.5.1/changes.html @@ -1,47 +1,34 @@

ONLYOFFICE Desktop Editors 7.5.1 - {{DATE}}

-

New Features

- -

All Editors

- -

Document Editor

- -

Spreadsheet Editor

- -

Presentation Editor

- -

Forms

- -

Fixes

All Editors

Document Editor

Spreadsheet Editor

Presentation Editor

-

Forms

+

PDF Editor

diff --git a/common/changes/7.5.1/changes_ru.html b/common/changes/7.5.1/changes_ru.html index ede98fc8d..7a6895560 100644 --- a/common/changes/7.5.1/changes_ru.html +++ b/common/changes/7.5.1/changes_ru.html @@ -1,47 +1,34 @@

ONLYOFFICE Desktop Editors 7.5.1 - {{DATE}}

-

Новые функции

- -

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

- -

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

- -

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

- -

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

- -

Формы

- -

Исправления

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

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

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

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

-

Формы

+

Редактор PDF

diff --git a/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/7.5.1/changes.html b/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/7.5.1/changes.html index fa25b4616..fddc47ced 100644 --- a/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/7.5.1/changes.html +++ b/macos/ONLYOFFICE/update/updates/ONLYOFFICE/changes/7.5.1/changes.html @@ -95,7 +95,7 @@

All Editors

  • Fixed some security issues
  • Fixed opening files with size more than 100MB
  • Fixed some issues with composite input
  • -
  • Fixed issues preventing launch app on MacOS version < 12.0
  • +
  • Fixed issues preventing launch application on MacOS version < 12.0
  • Document Editor

    Document Editor

    diff --git a/win-linux/package/windows/update/changes/7.5.1/changes_ru.html b/win-linux/package/windows/update/changes/7.5.1/changes_ru.html index e9beb6f7b..8af4b9744 100644 --- a/win-linux/package/windows/update/changes/7.5.1/changes_ru.html +++ b/win-linux/package/windows/update/changes/7.5.1/changes_ru.html @@ -52,10 +52,11 @@

    Исправления

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

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