also remove the not working menu bar
authormirabilos <tg@debian.org>
Wed, 10 Jul 2019 01:21:30 +0000 (03:21 +0200)
committermirabilos <mirabilos@evolvis.org>
Wed, 10 Jul 2019 01:21:30 +0000 (03:21 +0200)
debian/patches/experiments/fix-pluginless-build.diff

index ff039b3..86ce7f8 100644 (file)
@@ -1,10 +1,57 @@
 Description: Fix build with disabled plugins
+ and remove the (not functional) Plugins menu from the menu bar
 Author: mirabilos <tg@debian.org>
 Forwarded: https://github.com/musescore/MuseScore/pull/5216
 
 --- a/mscore/musescore.cpp
 +++ b/mscore/musescore.cpp
-@@ -2067,7 +2067,9 @@ void MuseScore::updateMenus()
+@@ -1691,6 +1691,7 @@ MuseScore::MuseScore()
+       //    Menu Plugins
+       //---------------------
++#ifdef SCRIPT_INTERFACE
+       menuPlugins = mb->addMenu("");
+       menuPlugins->setObjectName("Plugins");
+@@ -1701,6 +1702,7 @@ MuseScore::MuseScore()
+       menuPlugins->addAction(a);
+       menuPlugins->addSeparator();
++#endif
+       //---------------------
+       //    Menu Debug
+@@ -1849,7 +1851,9 @@ MuseScore::MuseScore()
+       Workspace::addMenuAndString(menuTools, "menu-tools");
+       Workspace::addMenuAndString(menuVoices, "menu-voices");
+       Workspace::addMenuAndString(menuMeasure, "menu-measure");
++#ifdef SCRIPT_INTERFACE
+       Workspace::addMenuAndString(menuPlugins, "menu-plugins");
++#endif
+       Workspace::addMenuAndString(menuHelp, "menu-help");
+       Workspace::addMenuAndString(menuTours, "menu-tours");
+@@ -2004,7 +2008,9 @@ void MuseScore::setMenuTitles()
+             { menuTools,            tr("&Tools")            },
+             { menuVoices,           tr("&Voices")           },
+             { menuMeasure,          tr("&Measure")          },
++#ifdef SCRIPT_INTERFACE
+             { menuPlugins,          tr("&Plugins")          },
++#endif
+ #ifndef NDEBUG
+             { menuDebug,            "Debug"                 }, // not translated
+ #endif
+@@ -2057,7 +2063,9 @@ void MuseScore::updateMenus()
+       updateMenu(menuTools,       "menu-tools",        "Tools");
+       updateMenu(menuVoices,      "menu-voices",       "");
+       updateMenu(menuMeasure,     "menu-measure",      "");
++#ifdef SCRIPT_INTERFACE
+       updateMenu(menuPlugins,     "menu-plugins",      "Plugins");
++#endif
+       updateMenu(menuHelp,        "menu-help",         "Help");
+       updateMenu(menuTours,       "menu-tours",        "");
+ #ifndef NDEBUG
+@@ -2067,7 +2075,9 @@ void MuseScore::updateMenus()
        connect(openRecent,     SIGNAL(triggered(QAction*)), SLOT(selectScore(QAction*)));
        connect(menuWorkspaces, SIGNAL(aboutToShow()),       SLOT(showWorkspaceMenu()));
        setMenuTitles();