From 656f5095693fe69e77ca106bf6d3dac5add10eb2 Mon Sep 17 00:00:00 2001 From: yinshuxun Date: Mon, 25 Dec 2023 22:57:58 +0800 Subject: [PATCH] feat: support new tdt --- share/locale/musescore_zh_CN.ts | 4 ++-- src/project/internal/projectactionscontroller.cpp | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/share/locale/musescore_zh_CN.ts b/share/locale/musescore_zh_CN.ts index ea6e0508a584c..51bc0874a319e 100644 --- a/share/locale/musescore_zh_CN.ts +++ b/share/locale/musescore_zh_CN.ts @@ -9889,12 +9889,12 @@ This action will not delete any of your scores. Publish - 发布 + 播放器 DevTools - 开发工具 + 开发的工具 diff --git a/src/project/internal/projectactionscontroller.cpp b/src/project/internal/projectactionscontroller.cpp index 2487e914e5141..b2a1200c5fbc8 100644 --- a/src/project/internal/projectactionscontroller.cpp +++ b/src/project/internal/projectactionscontroller.cpp @@ -47,6 +47,7 @@ using namespace mu::framework; using namespace mu::actions; static const mu::Uri NOTATION_PAGE_URI("musescore://notation"); +static const mu::Uri PUBLISH_PAGE_URI("musescore://publish"); static const mu::Uri HOME_PAGE_URI("musescore://home"); static const mu::Uri NEW_SCORE_URI("musescore://project/newscore"); static const mu::Uri PROJECT_PROPERTIES_URI("musescore://project/properties"); @@ -222,7 +223,7 @@ Ret ProjectActionsController::openProject(const io::path_t& givenPath, const QSt //! Step 2. If the project is already open in the current window, then just switch to showing the notation if (isProjectOpened(actualPath)) { - return openPageIfNeed(NOTATION_PAGE_URI); + return openPageIfNeed(PUBLISH_PAGE_URI); } //! Step 3. Check, if the project already opened in another window, then activate the window with the project @@ -318,7 +319,7 @@ Ret ProjectActionsController::doOpenProject(const io::path_t& filePath) globalContext()->setCurrentProject(project); - return openPageIfNeed(NOTATION_PAGE_URI); + return openPageIfNeed(PUBLISH_PAGE_URI); } Ret ProjectActionsController::doOpenCloudProject(const io::path_t& filePath, const CloudProjectInfo& info, bool isOwner) @@ -345,7 +346,7 @@ Ret ProjectActionsController::doOpenCloudProject(const io::path_t& filePath, con globalContext()->setCurrentProject(project); - return openPageIfNeed(NOTATION_PAGE_URI); + return openPageIfNeed(PUBLISH_PAGE_URI); } void ProjectActionsController::downloadAndOpenCloudProject(int scoreId, const QString& hash, const QString& secret, bool isOwner) @@ -478,7 +479,7 @@ Ret ProjectActionsController::openScoreFromMuseScoreCom(const QUrl& url) // either in this instance if (isProjectOpened(projectPath)) { - return openPageIfNeed(NOTATION_PAGE_URI); + return openPageIfNeed(PUBLISH_PAGE_URI); } // or in another one @@ -588,7 +589,7 @@ void ProjectActionsController::newProject() Ret ret = interactive()->open(NEW_SCORE_URI).ret; if (ret) { - ret = openPageIfNeed(NOTATION_PAGE_URI); + ret = openPageIfNeed(PUBLISH_PAGE_URI); } if (!ret) {