Skip to content

Commit

Permalink
fix #291992 and fix #291991: “Play Panel” and "Mixer" is untranslated
Browse files Browse the repository at this point in the history
and setting the title of docked plugins to their name in the menu rather
than to "Plugin"
  • Loading branch information
Jojo-Schmitz committed Jul 10, 2019
1 parent 822c7e6 commit 2030719
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mscore/mixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ char userRangeToReverb(double v) { return (char)qBound(0, (int)(v / 100.0 * 128.
//---------------------------------------------------------

Mixer::Mixer(QWidget* parent)
: QDockWidget("Mixer", parent),
: QDockWidget(qApp->translate("Mixer", "Mixer"), parent),
showDetails(true),
trackHolder(nullptr)
{
Expand Down Expand Up @@ -221,7 +221,7 @@ void Mixer::on_partOnlyCheckBox_toggled(bool checked)

void Mixer::retranslate(bool firstTime)
{
setWindowTitle(tr("Mixer"));
setWindowTitle(qApp->translate("Mixer", "Mixer"));
if (!firstTime) {
for (int i = 0; i < trackAreaLayout->count(); i++) {
PartEdit* p = getPartAtIndex(i);
Expand Down
2 changes: 1 addition & 1 deletion mscore/playpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace Ms {
//---------------------------------------------------------

PlayPanel::PlayPanel(QWidget* parent)
: QDockWidget("Play Panel", parent)
: QDockWidget(qApp->translate("PlayPanelBase", "Play Panel"), parent)
{
cachedTickPosition = -1;
cachedTimePosition = -1;
Expand Down
2 changes: 1 addition & 1 deletion mscore/plugin/mscorePlugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ void MuseScore::pluginTriggered(QString pp)
//view->setHeight(p->height());
view->setResizeMode(QQuickView::SizeRootObjectToView);
if (p->pluginType() == "dock") {
QDockWidget* dock = new QDockWidget("Plugin", 0);
QDockWidget* dock = new QDockWidget(view->title(), 0);
dock->setAttribute(Qt::WA_DeleteOnClose);
Qt::DockWidgetArea area = Qt::RightDockWidgetArea;
if (p->dockArea() == "left")
Expand Down
2 changes: 1 addition & 1 deletion mscore/plugin/pluginCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ void PluginCreator::runClicked()
item->setParentItem(view->contentItem());

if (item->pluginType() == "dock") {
dock = new QDockWidget("Plugin", 0);
dock = new QDockWidget(view->title(), 0);
dock->setAttribute(Qt::WA_DeleteOnClose);
dock->setWidget(QWidget::createWindowContainer(view));
dock->widget()->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
Expand Down

0 comments on commit 2030719

Please sign in to comment.