From 3859b10f9a5eaca7df8f85394756375af0b17a1c Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Thu, 15 Sep 2011 04:13:10 +0000 Subject: New namespaces and change in default colors. See ChangeLog. --- muse2/muse/app.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'muse2/muse/app.cpp') diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 773e550f..3d52e4f2 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -925,7 +925,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow() connect(windowsCascadeAction, SIGNAL(activated()), mdiArea, SLOT(cascadeSubWindows())); - arrangerView = new ArrangerView(this); + arrangerView = new MusEArranger::ArrangerView(this); arrangerView->shareToolsAndMenu(true); connect(arrangerView, SIGNAL(closed()), SLOT(arrangerClosed())); toplevels.push_back(arrangerView); @@ -2943,7 +2943,7 @@ void MusE::bigtimeClosed() void MusE::showMixer1(bool on) { if (on && mixer1 == 0) { - mixer1 = new AudioMixerApp(this, &(MusEConfig::config.mixer1)); + mixer1 = new MusEMixer::AudioMixerApp(this, &(MusEConfig::config.mixer1)); connect(mixer1, SIGNAL(closed()), SLOT(mixer1Closed())); mixer1->resize(MusEConfig::config.mixer1.geometry.size()); mixer1->move(MusEConfig::config.mixer1.geometry.topLeft()); @@ -2960,7 +2960,7 @@ void MusE::showMixer1(bool on) void MusE::showMixer2(bool on) { if (on && mixer2 == 0) { - mixer2 = new AudioMixerApp(this, &(MusEConfig::config.mixer2)); + mixer2 = new MusEMixer::AudioMixerApp(this, &(MusEConfig::config.mixer2)); connect(mixer2, SIGNAL(closed()), SLOT(mixer2Closed())); mixer2->resize(MusEConfig::config.mixer2.geometry.size()); mixer2->move(MusEConfig::config.mixer2.geometry.topLeft()); -- cgit v1.2.3 From 663b022ab88acc47a5df898aa8df10d2e6422ba1 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Fri, 16 Sep 2011 14:50:34 +0000 Subject: fixed wrong usages of tr() like: QString::toNumber(num) + ( num > 1 ? tr("parts") : tr("part")) or tr("file ")+ filename +tr(" could not be loaded") and commited scripts to find such errors --- muse2/find_manual_plural.sh | 20 ++++++++++++++++++++ muse2/find_translation_concatenation.sh | 16 ++++++++++++++++ muse2/muse/app.cpp | 8 ++++---- muse2/muse/arranger/pcanvas.cpp | 7 +++---- muse2/muse/importmidi.cpp | 5 ++--- muse2/muse/instruments/editinstrument.cpp | 14 +++++++------- muse2/muse/song.cpp | 3 +-- muse2/muse/widgets/filedialog.cpp | 8 +++----- muse2/muse/widgets/pastedialog.cpp | 4 ++-- muse2/muse/widgets/pasteeventsdialog.cpp | 4 ++-- muse2/muse/widgets/routepopup.cpp | 2 +- muse2/muse/widgets/shortcutcapturedialog.cpp | 2 +- 12 files changed, 62 insertions(+), 31 deletions(-) create mode 100755 muse2/find_manual_plural.sh create mode 100755 muse2/find_translation_concatenation.sh (limited to 'muse2/muse/app.cpp') diff --git a/muse2/find_manual_plural.sh b/muse2/find_manual_plural.sh new file mode 100755 index 00000000..3e77f304 --- /dev/null +++ b/muse2/find_manual_plural.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# this script tries to find all "bad" code like +# (number > 1 ? tr ("tracks") : tr("track")) +# that is, all manual plural diversifications +# you should replace them by: +# tr("processed %n track(s)", "", number) +# the "" is a translator comment. you may write what you want +# +# you have to create appropriate translations for this (even for +# english!). linguist will ask you for the singular, plural, +# and in some language even paucal form then. +# +# this script is not perfect. it misses some "bad" things, and +# finds some "good" things. + +{ +find . -iname '*.cpp' -print0 | xargs -0 grep -E '[^:]: *tr *\("[^"]*".*\)' +find . -iname '*.cpp' -print0 | xargs -0 grep -E '\? *tr *\("[^"]*".*\)' +} | sort | uniq diff --git a/muse2/find_translation_concatenation.sh b/muse2/find_translation_concatenation.sh new file mode 100755 index 00000000..644944f1 --- /dev/null +++ b/muse2/find_translation_concatenation.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# this script tries to find all "bad" code like +# tr("the file ") + your_file + tr(" could not be loaded!") +# you should replace it by: +# tr("the file %1 could not be loaded!").arg(your_file) +# +# this script is not perfect. it misses some "bad" things, and +# finds some "good" things. + +{ +find . -iname '*.cpp' -print0 | xargs -0 grep -E 'tr *\("[^"]*" *\) *\+'; +find . -iname '*.cpp' -print0 | xargs -0 grep -E '\+ *tr *\("[^"]*" *\)'; +} | sort | uniq + + diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 3d52e4f2..7c716464 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -1218,7 +1218,7 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool loadAll } else { QMessageBox::critical(this, QString("MusE"), - tr("Unknown File Format: ") + ex); + tr("Unknown File Format: %1").arg(ex)); setUntitledProject(); } if (!songTemplate) { @@ -1348,7 +1348,7 @@ void MusE::setUntitledProject() QString name("untitled"); MusEGlobal::museProject = "./"; //QFileInfo(name).absolutePath(); project.setFile(name); - setWindowTitle(tr("MusE: Song: ") + project.completeBaseName()); + setWindowTitle(tr("MusE: Song: %1").arg(project.completeBaseName())); } //--------------------------------------------------------- @@ -1756,7 +1756,7 @@ bool MusE::saveAs() ok = save(name, true); if (ok) { project.setFile(name); - setWindowTitle(tr("MusE: Song: ") + project.completeBaseName()); + setWindowTitle(tr("MusE: Song: %1").arg(project.completeBaseName())); addProject(name); } else @@ -2651,7 +2651,7 @@ MusE::lash_idle_cb () int ok = save (ss.toAscii(), false); if (ok) { project.setFile(ss.toAscii()); - setWindowTitle(tr("MusE: Song: ") + project.completeBaseName()); + setWindowTitle(tr("MusE: Song: %1").arg(project.completeBaseName())); addProject(ss.toAscii()); MusEGlobal::museProject = QFileInfo(ss.toAscii()).absolutePath(); } diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index 10cd9735..9e27ca41 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -771,7 +771,7 @@ void PartCanvas::itemPopup(MusEWidget::CItem* item, int n, const QPoint& pt) { Part* p = item->part(); EventList* el = p->events(); - QString str = tr("Part name") + ": " + p->name() + "\n" + tr("Files") + ":"; + QString str = tr("Part name: %1\nFiles:").arg(p->name()); for (iEvent e = el->begin(); e != el->end(); ++e) { Event event = e->second; @@ -2861,9 +2861,8 @@ Undo PartCanvas::pasteAt(const QString& pt, Track* track, unsigned int pos, bool { int tot = notDone + done; QMessageBox::critical(this, QString("MusE"), - QString().setNum(notDone) + (tot > 1 ? (tr(" out of ") + QString().setNum(tot)) : QString("")) + - (tot > 1 ? tr(" parts") : tr(" part")) + - tr(" could not be pasted.\nLikely the selected track is the wrong type.")); + (tot > 1 ? tr("%n part(s) out of %1 could not be pasted.\nLikely the selected track is the wrong type.","",notDone).arg(tot) + : tr("%n part(s) could not be pasted.\nLikely the selected track is the wrong type.","",notDone))); } if (finalPosPtr) *finalPosPtr=finalPos; diff --git a/muse2/muse/importmidi.cpp b/muse2/muse/importmidi.cpp index fd690671..558ffb69 100644 --- a/muse2/muse/importmidi.cpp +++ b/muse2/muse/importmidi.cpp @@ -618,9 +618,8 @@ void MusE::importPartToTrack(QString& filename, unsigned tick, Track* track) { int tot = notDone + done; QMessageBox::critical(this, QString("MusE"), - QString().setNum(notDone) + (tot > 1 ? (tr(" out of ") + QString().setNum(tot)) : QString("")) + - (tot > 1 ? tr(" parts") : tr(" part")) + - tr(" could not be imported.\nLikely the track is the wrong type.")); + (tot > 1 ? tr("%n part(s) out of %1 could not be imported.\nLikely the selected track is the wrong type.","",notDone).arg(tot) + : tr("%n part(s) could not be imported.\nLikely the selected track is the wrong type.","",notDone))); } return; diff --git a/muse2/muse/instruments/editinstrument.cpp b/muse2/muse/instruments/editinstrument.cpp index 49bdd6c2..e1639d04 100644 --- a/muse2/muse/instruments/editinstrument.cpp +++ b/muse2/muse/instruments/editinstrument.cpp @@ -408,7 +408,7 @@ void EditInstrument::saveAs() { if(QMessageBox::question(this, tr("MusE:"), - tr("The user instrument directory\n") + MusEGlobal::museUserInstruments + tr("\ndoes not exist yet. Create it now?\n") + + tr("The user instrument directory\n%1\ndoes not exist yet. Create it now?\n").arg(MusEGlobal::museUserInstruments) + tr("(You can change the user instruments directory at Settings->Global Settings->Midi)"), QMessageBox::Ok | QMessageBox::Default, QMessageBox::Cancel | QMessageBox::Escape, @@ -419,7 +419,7 @@ void EditInstrument::saveAs() else { printf("Unable to create user instrument directory: %s\n", MusEGlobal::museUserInstruments.toLatin1().constData()); - QMessageBox::critical(this, tr("MusE:"), tr("Unable to create user instrument directory\n") + MusEGlobal::museUserInstruments); + QMessageBox::critical(this, tr("MusE:"), tr("Unable to create user instrument directory '%1'").arg(MusEGlobal::museUserInstruments)); //return; path = MusEGlobal::museUser; } @@ -610,7 +610,7 @@ void EditInstrument::fileSaveAs() // Can not have two user files containing the same instrument name. if(QMessageBox::question(this, tr("MusE: Save instrument as"), - tr("The user instrument:\n") + s + tr("\nalready exists. This will overwrite its .idf instrument file.\nAre you sure?"), + tr("The user instrument '%1' already exists. This will overwrite its .idf instrument file.\nAre you sure?").arg(s), QMessageBox::Ok | QMessageBox::Default, QMessageBox::Cancel | QMessageBox::Escape, Qt::NoButton) == QMessageBox::Ok) @@ -700,7 +700,7 @@ void EditInstrument::fileSaveAs() { if(QMessageBox::question(this, tr("MusE:"), - tr("The user instrument directory\n") + MusEGlobal::museUserInstruments + tr("\ndoes not exist yet. Create it now?\n") + + tr("The user instrument directory\n%1\ndoes not exist yet. Create it now?\n").arg(MusEGlobal::museUserInstruments) + tr("(You can change the user instruments directory at Settings->Global Settings->Midi)"), QMessageBox::Ok | QMessageBox::Default, QMessageBox::Cancel | QMessageBox::Escape, @@ -711,7 +711,7 @@ void EditInstrument::fileSaveAs() else { printf("Unable to create user instrument directory: %s\n", MusEGlobal::museUserInstruments.toLatin1().constData()); - QMessageBox::critical(this, tr("MusE:"), tr("Unable to create user instrument directory\n") + MusEGlobal::museUserInstruments); + QMessageBox::critical(this, tr("MusE:"), tr("Unable to create user instrument directory '%1'").arg(MusEGlobal::museUserInstruments)); //return; path = MusEGlobal::museUser; } @@ -3111,7 +3111,7 @@ void EditInstrument::addControllerClicked() { QMessageBox::critical(this, tr("MusE: Cannot add common controller"), - tr("A controller named ") + name + tr(" already exists."), + tr("A controller named '%1' already exists.").arg(name), QMessageBox::Ok, Qt::NoButton, Qt::NoButton); @@ -3123,7 +3123,7 @@ void EditInstrument::addControllerClicked() { QMessageBox::critical(this, tr("MusE: Cannot add common controller"), - tr("A controller number ") + QString().setNum(num) + tr(" already exists."), + tr("A controller number %1 already exists.").arg(num), QMessageBox::Ok, Qt::NoButton, Qt::NoButton); diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp index 7adc37f3..29ed7023 100644 --- a/muse2/muse/song.cpp +++ b/muse2/muse/song.cpp @@ -3804,8 +3804,7 @@ void Song::executeScript(const char* scriptfile, PartList* parts, int quant, boo if (myProcess->exitCode()) { QMessageBox::warning(MusEGlobal::muse, tr("MusE - external script failed"), - tr("MusE was unable to launch the script, error message:\n ")+ QString(errStr) - ); + tr("MusE was unable to launch the script, error message:\n%1").arg(QString(errStr))); endUndo(SC_EVENT_REMOVED); return; } diff --git a/muse2/muse/widgets/filedialog.cpp b/muse2/muse/widgets/filedialog.cpp index 0df0fa7f..4e3c1fb2 100644 --- a/muse2/muse/widgets/filedialog.cpp +++ b/muse2/muse/widgets/filedialog.cpp @@ -78,8 +78,7 @@ static bool testDirCreate(QWidget* parent, const QString& path) { if(QMessageBox::information(parent, QWidget::tr("MusE: get file name"), - QWidget::tr("The directory\n") + path - + QWidget::tr("\ndoes not exist.\nCreate it?"), + QWidget::tr("The directory\n%1\ndoes not exist.\nCreate it?").arg(path), QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok) != QMessageBox::Ok) return true; @@ -483,7 +482,7 @@ FILE* fileOpen(QWidget* parent, QString name, const QString& ext, } if (strcmp(mode,"w") == 0 && overwriteWarning && info.exists()) { - QString s(QWidget::tr("File\n") + name + QWidget::tr("\nexists. Overwrite?")); + QString s(QWidget::tr("File\n%1\nexists. Overwrite?").arg(name)); /* int rv = QMessageBox::warning(parent, QWidget::tr("MusE: write"), @@ -516,8 +515,7 @@ FILE* fileOpen(QWidget* parent, QString name, const QString& ext, fp = fopen(name.toAscii().data(), mode); } if (fp == 0 && !noError) { - QString s(QWidget::tr("Open File\n") + name + QWidget::tr("\nfailed: ") - + QString(strerror(errno))); + QString s(QWidget::tr("Open File\n%1\nfailed: %2").arg(name).arg(strerror(errno))); QMessageBox::critical(parent, QWidget::tr("MusE: Open File"), s); return 0; } diff --git a/muse2/muse/widgets/pastedialog.cpp b/muse2/muse/widgets/pastedialog.cpp index 7c9c2248..bc031b30 100644 --- a/muse2/muse/widgets/pastedialog.cpp +++ b/muse2/muse/widgets/pastedialog.cpp @@ -85,9 +85,9 @@ QString PasteDialog::ticks_to_quarter_string(int ticks) double quarters = (double) ticks/config.division; bool one = ( quarters > 0.995 && quarters < 1.005 ); if (one) - return QString::number(quarters, 'f', 2) + " " + tr("quarter"); + return tr("%1 quarter", "for floating-point arguments like 1.5").arg(quarters, 0, 'f', 2); else - return QString::number(quarters, 'f', 2) + " " + tr("quarters"); + return tr("%1 quarters", "for floating-point arguments like 1.5").arg(quarters, 0, 'f', 2); } } diff --git a/muse2/muse/widgets/pasteeventsdialog.cpp b/muse2/muse/widgets/pasteeventsdialog.cpp index 04b7cbd7..e8436711 100644 --- a/muse2/muse/widgets/pasteeventsdialog.cpp +++ b/muse2/muse/widgets/pasteeventsdialog.cpp @@ -99,9 +99,9 @@ QString PasteEventsDialog::ticks_to_quarter_string(int ticks) double quarters = (double) ticks/config.division; bool one = ( quarters > 0.995 && quarters < 1.005 ); if (one) - return QString::number(quarters, 'f', 2) + " " + tr("quarter"); + return tr("%1 quarter", "for floating-point arguments like 1.5").arg(quarters, 0, 'f', 2); else - return QString::number(quarters, 'f', 2) + " " + tr("quarters"); + return tr("%1 quarters", "for floating-point arguments like 1.5").arg(quarters, 0, 'f', 2); } } diff --git a/muse2/muse/widgets/routepopup.cpp b/muse2/muse/widgets/routepopup.cpp index ec3f3ea0..0336f8ed 100644 --- a/muse2/muse/widgets/routepopup.cpp +++ b/muse2/muse/widgets/routepopup.cpp @@ -1152,7 +1152,7 @@ void RoutePopupMenu::prepare() continue; PopupMenu* subp = new PopupMenu(morep, true); - subp->setTitle(QString("%1:").arg(i) + tr("")); + subp->setTitle(QString("%1:%2").arg(i).arg(tr(""))); // MusE-2: Check this - needed with QMenu? Help says no. No - verified, it actually causes double triggers! //connect(subp, SIGNAL(triggered(QAction*)), pup, SIGNAL(triggered(QAction*))); diff --git a/muse2/muse/widgets/shortcutcapturedialog.cpp b/muse2/muse/widgets/shortcutcapturedialog.cpp index a470d698..26526f1e 100644 --- a/muse2/muse/widgets/shortcutcapturedialog.cpp +++ b/muse2/muse/widgets/shortcutcapturedialog.cpp @@ -105,7 +105,7 @@ void ShortcutCaptureDialog::keyPressEvent(QKeyEvent* e) (( shortcuts[i].type & (shortcuts[shortcutindex].type | INVIS_SHRT)) || shortcuts[i].type & GLOBAL_SHRT || shortcuts[shortcutindex].type & GLOBAL_SHRT)) { // affect the same scope - msgString = tr("Shortcut conflicts with ") + QString(shortcuts[i].descr); + msgString = tr("Shortcut conflicts with %1").arg(shortcuts[i].descr); conflict = true; break; } -- cgit v1.2.3 From 8b21a48e89198c37a9cbc7f8bba1871f275b6809 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sun, 18 Sep 2011 16:16:02 +0000 Subject: hopefully fixed invalid read bug --- muse2/muse/app.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'muse2/muse/app.cpp') diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 7c716464..b09e7191 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -2089,6 +2089,9 @@ void MusE::toplevelDeleted(TopWin* tl) for (iToplevel i = toplevels.begin(); i != toplevels.end(); ++i) { if (*i == tl) { + if (tl == activeTopWin) + activeTopWinChangedSlot(NULL); + if (tl == currentMenuSharingTopwin) setCurrentMenuSharingTopwin(NULL); -- cgit v1.2.3 From ca0f44f30727fc0e335579835868bfd5f86bb306 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Mon, 19 Sep 2011 13:16:19 +0000 Subject: hopefully finally fixed the invalid reads (and segfaulting) bug when closing toplevels. --- muse2/muse/app.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'muse2/muse/app.cpp') diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index b09e7191..84b5121c 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -2090,7 +2090,10 @@ void MusE::toplevelDeleted(TopWin* tl) if (*i == tl) { if (tl == activeTopWin) - activeTopWinChangedSlot(NULL); + { + activeTopWin=NULL; + emit activeTopWinChanged(NULL); + } if (tl == currentMenuSharingTopwin) setCurrentMenuSharingTopwin(NULL); @@ -3289,7 +3292,8 @@ void MusE::bringToFront(QWidget* widget) win->raise(); } - activeTopWinChangedSlot(win); + activeTopWin=win; + emit activeTopWinChanged(win); } void MusE::setFullscreen(bool val) -- cgit v1.2.3 From 7ade50ecbd7dd851684f4e3e5bb5cb92fa1d9a15 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Fri, 23 Sep 2011 13:01:57 +0000 Subject: made the "have to sometimes focus menu bar"-problem less annoying. the menu bar is ONLY selected now when we switch to a non-MDI-subwin which shares tool- and menubar (because this is the only case where it's necessary) tiny indentation fix in dcanvas.cpp --- muse2/muse/app.cpp | 10 ++++++++-- muse2/muse/midiedit/dcanvas.cpp | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'muse2/muse/app.cpp') diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 84b5121c..1fcfef56 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -3102,9 +3102,15 @@ void MusE::activeTopWinChangedSlot(TopWin* win) { if (MusEGlobal::debugMsg) printf("ACTIVE TOPWIN CHANGED to '%s' (%p)\n", win ? win->windowTitle().toAscii().data() : "", win); - if ((win==NULL) || (win->isMdiWin()==false)) + if (win && (win->isMdiWin()==false) && win->sharesToolsAndMenu()) { - if (MusEGlobal::debugMsg) printf(" that's out of the MDI area\n"); + if (MusEGlobal::debugMsg) printf(" that's a menu sharing muse window which isn't inside the MDI area.\n"); + // if a window gets active which a) is a muse window, b) is not a mdi subwin and c) shares menu- and toolbar, + // then unfocus the MDI area and/or the currently active MDI subwin. otherwise you'll be unable to use win's + // tools or menu entries, as whenever you click at them, they're replaced by the currently active MDI subwin's + // menus and toolbars. + // as unfocusing the MDI area and/or the subwin does not work for some reason, we must do this workaround: + // simply focus anything in the main window except the mdi area. menuBar()->setFocus(Qt::MenuBarFocusReason); } diff --git a/muse2/muse/midiedit/dcanvas.cpp b/muse2/muse/midiedit/dcanvas.cpp index 783a72f5..3f80133a 100644 --- a/muse2/muse/midiedit/dcanvas.cpp +++ b/muse2/muse/midiedit/dcanvas.cpp @@ -183,7 +183,7 @@ Undo DrumCanvas::moveCanvasItems(MusEWidget::CItemList& items, int dp, int dx, D if (!forbidden) { - std::vector< MusEWidget::CItem* > doneList; + std::vector< MusEWidget::CItem* > doneList; typedef std::vector< MusEWidget::CItem* >::iterator iDoneList; for(MusEWidget::iCItem ici = items.begin(); ici != items.end(); ++ici) -- cgit v1.2.3 From d52fac00567bb85944188f3c946b86b2a420819c Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Fri, 23 Sep 2011 13:11:34 +0000 Subject: improved the "menu bar focus"-fix even more --- muse2/muse/app.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'muse2/muse/app.cpp') diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 1fcfef56..9f858bc3 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -3102,7 +3102,8 @@ void MusE::activeTopWinChangedSlot(TopWin* win) { if (MusEGlobal::debugMsg) printf("ACTIVE TOPWIN CHANGED to '%s' (%p)\n", win ? win->windowTitle().toAscii().data() : "", win); - if (win && (win->isMdiWin()==false) && win->sharesToolsAndMenu()) + if ( (win && (win->isMdiWin()==false) && win->sharesToolsAndMenu()) && + ( (mdiArea->currentSubWindow() != NULL) && (mdiArea->currentSubWindow()->isVisible()==true) ) ) { if (MusEGlobal::debugMsg) printf(" that's a menu sharing muse window which isn't inside the MDI area.\n"); // if a window gets active which a) is a muse window, b) is not a mdi subwin and c) shares menu- and toolbar, -- cgit v1.2.3