Skip to content

Commit

Permalink
feat: support new tdt
Browse files Browse the repository at this point in the history
  • Loading branch information
yinshuxun committed Dec 25, 2023
1 parent 21ccaca commit 656f509
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions share/locale/musescore_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9889,12 +9889,12 @@ This action will not delete any of your scores.</source>
<message>
<location filename="../../src/appshell/view/internal/maintoolbarmodel.cpp" line="92"/>
<source>Publish</source>
<translation>发布</translation>
<translation>播放器</translation>
</message>
<message>
<location filename="../../src/appshell/view/internal/maintoolbarmodel.cpp" line="95"/>
<source>DevTools</source>
<translation>开发工具</translation>
<translation>开发的工具</translation>
</message>
<message>
<location filename="../../src/appshell/qml/Main.wasm.qml" line="36"/>
Expand Down
11 changes: 6 additions & 5 deletions src/project/internal/projectactionscontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 656f509

Please sign in to comment.