apply some of the backports from master here
authormirabilos <tg@debian.org>
Thu, 30 Jul 2020 18:10:36 +0000 (20:10 +0200)
committermirabilos <mirabilos@evolvis.org>
Thu, 30 Jul 2020 18:10:36 +0000 (20:10 +0200)
(needs checking whether it builds/works)

debian/changelog
debian/copyright
debian/patches/series
debian/patches/upstream/ottava-size.diff [new file with mode: 0644]
debian/patches/upstream/pitch-Cb-B#.diff [new file with mode: 0644]
debian/patches/upstream/prefs-radio.diff [new file with mode: 0644]
debian/patches/upstream/save-no-redundant.diff [new file with mode: 0644]
debian/patches/upstream/synth-glitches.diff [new file with mode: 0644]
debian/patches/upstream/wmclass.diff [new file with mode: 0644]

index dbe9129..af72fdb 100644 (file)
@@ -1,9 +1,16 @@
-musescore2 (2.3.2+dfsg3-9) UNRELEASED; urgency=medium
+musescore2 (2.3.2+dfsg3-10) UNRELEASED; urgency=medium
 
   * Quieten another G++ warning that upstream should fix
   * Fix SMuFL typo
-
- -- Thorsten Glaser <tg@mirbsd.de>  Thu, 30 Jul 2020 19:44:43 +0200
+  * Apply some upstream/backported patches:
+    - Synthesiser: char vs signed char mismatch
+    - Pianoroll: don’t store redundant/default values in XML
+    - ottava font too big
+    - Preferences: radio buttons for sound in dialogue
+    - bad octave for B♯ and C♭
+    - Desktop file: StartupWMClass to allow icon grouping
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Thu, 30 Jul 2020 20:07:56 +0200
 
 musescore2 (2.3.2+dfsg3-8) wtf; urgency=low
 
index 0023e8e..15a884b 100644 (file)
@@ -21,6 +21,20 @@ Files: *
 Copyright: 2002-2018, Werner Schweer and others
 License: GPL-2
 
+Files: debian/*
+Copyright:
+ 2002-2019, Werner Schweer and others
+ 2019-2020, MuseScore BVBA and others
+ 2015, Tiago Bortoletto Vaz <tiago@debian.org>
+ 2015, Toby Smithe <git@tsmithe.net>
+ 2016, James Cowgill <james410@cowgill.org.uk>
+ 2016, Peter Jonas <pjonas56@gmail.com>
+ 2018, Dr. Tobias Quathamer <toddy@debian.org>
+ 2017, 2018, 2019, 2020, mirabilos <tg@debian.org>
+License: GPL-2 with Font exception (MuseScore)
+Comment: This includes packaging (mostly trivial) and patches
+ (including backports from upstream and submissions under CLA).
+
 License: GPL-2 with Font exception (MuseScore)
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License version 2 as published
index df587b5..12ee61c 100644 (file)
@@ -14,6 +14,12 @@ upstream/mtest-fix-freetype-includes.diff
 upstream/note-accessibleInfo-const.diff
 upstream/file-dialogues.diff
 upstream/update-AppData.diff
+upstream/synth-glitches.diff
+upstream/save-no-redundant.diff
+upstream/ottava-size.diff
+upstream/prefs-radio.diff
+upstream/pitch-Cb-B#.diff
+upstream/wmclass.diff
 debian-specific/fixup-AppData.diff
 experiments/upstream-backend-fixes.diff
 experiments/lyrics-hyphen-max-8sp.diff
diff --git a/debian/patches/upstream/ottava-size.diff b/debian/patches/upstream/ottava-size.diff
new file mode 100644 (file)
index 0000000..e8e05c2
--- /dev/null
@@ -0,0 +1,15 @@
+Origin: backport, commit:5301009829215619953d33f03932b09c3ead5e7b
+Author: Joachim Schmitz <jojo@schmitz-digital.de>
+Description: fix #300738: Ottava (8va/8vb) number is too big
+
+--- a/libmscore/style.cpp
++++ b/libmscore/style.cpp
+@@ -355,7 +355,7 @@ void initStyle(MStyle* s)
+       s->addTextStyle(TextStyle(QT_TRANSLATE_NOOP ("TextStyle", "Glissando"), ff, 8, false, true, false,
+          AlignmentFlags::HCENTER | AlignmentFlags::BASELINE, QPointF(), OffsetType::SPATIUM, true));
+-      s->addTextStyle(TextStyle(QT_TRANSLATE_NOOP ("TextStyle", "Ottava"),            ff, 12, false, true, false,
++      s->addTextStyle(TextStyle(QT_TRANSLATE_NOOP ("TextStyle", "Ottava"),            ff, 10, false, true, false,
+          AlignmentFlags::LEFT | AlignmentFlags::VCENTER, QPointF(), OffsetType::SPATIUM, true));
+       s->addTextStyle(TextStyle(QT_TRANSLATE_NOOP ("TextStyle", "Pedal"),             ff, 12, false, false, false,
+          AlignmentFlags::LEFT | AlignmentFlags::BASELINE, QPointF(0.0, 0.15), OffsetType::SPATIUM, true));
diff --git a/debian/patches/upstream/pitch-Cb-B#.diff b/debian/patches/upstream/pitch-Cb-B#.diff
new file mode 100644 (file)
index 0000000..cf8d9d6
--- /dev/null
@@ -0,0 +1,21 @@
+Origin: upstream, commit:58d603b499ba6d89455a98af382f4150fc4efd5b
+Author: Matt McClinch <mattmcclinch@gmail.com>
+Description: fix #290987: B# and Cb octave change
+ Resolves: https://musescore.org/en/node/290987.
+ .
+ Make sure that B#, B##, Cb, and Cbb describe themselves as being in the
+ correct octave. This is accomplished by calculating the octave based on
+ what the pitch would be if there were no accidental. Thus, there is no
+ need to special-case certain tpcs.
+
+--- a/libmscore/note.cpp
++++ b/libmscore/note.cpp
+@@ -415,7 +415,7 @@ int Note::tpc() const
+ QString Note::tpcUserName(bool explicitAccidental) const
+       {
+       QString pitchName = tpc2name(tpc(), NoteSpellingType::STANDARD, NoteCaseType::AUTO, explicitAccidental);
+-      QString octaveName = QString::number((epitch() / 12) - 1);
++      QString octaveName = QString::number(((epitch() - int(tpc2alter(tpc()))) / 12) - 1);
+       return pitchName + (explicitAccidental ? " " : "") + octaveName;
+       }
diff --git a/debian/patches/upstream/prefs-radio.diff b/debian/patches/upstream/prefs-radio.diff
new file mode 100644 (file)
index 0000000..911c7b5
--- /dev/null
@@ -0,0 +1,174 @@
+Origin: upstream, commit:406b7b6bf23de8248f77015b8c38ec6d876c04cd
+Author: J. Edward Sanchez <Spire42@users.noreply.github.com>
+Description: Fix #304466: The “I/O” tab of the “Preferences” dialog should use radio buttons instead of checkboxes
+ Fixed a UI problem with the “I/O” tab of the “Preferences” dialog that
+ caused mutually exclusive options to be presented to the user as
+ checkboxes instead of radio buttons.
+ .
+ The underlying technical reason for this was that the Qt framework does
+ not allow group boxes to have radio buttons. This has been worked
+ around by subclassing the QGroupBox class and rendering the checkboxes
+ to look like radio buttons. This is sufficient for our purposes because
+ the application already overrides the checkboxes' behavior to work like
+ radio buttons.
+
+--- a/mscore/CMakeLists.txt
++++ b/mscore/CMakeLists.txt
+@@ -221,6 +221,7 @@ add_executable ( ${ExecutableName}
+       ${resource_file}
+       ${INCS}
++      radiobuttongroupbox.h
+       recordbutton.h greendotbutton prefsdialog.h
+       stringutils.h stringutils.cpp
+       scoreview.cpp editinstrument.cpp editstyle.cpp
+@@ -233,6 +234,7 @@ add_executable ( ${ExecutableName}
+       mixer.cpp playpanel.cpp selectionwindow.cpp preferences.cpp measureproperties.cpp
+       seq.cpp textpalette.cpp
+       timedialog.cpp symboldialog.cpp shortcutcapturedialog.cpp
++      radiobuttongroupbox.cpp
+       simplebutton.cpp musedata.cpp
+       editdrumset.cpp editstaff.cpp voltaproperties.cpp
+       timesigproperties.cpp newwizard.cpp transposedialog.cpp
+--- a/mscore/prefsdialog.ui
++++ b/mscore/prefsdialog.ui
+@@ -2711,7 +2711,7 @@
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_8">
+        <item>
+-        <widget class="QGroupBox" name="pulseaudioDriver">
++        <widget class="Ms::RadioButtonGroupBox" name="pulseaudioDriver">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+            <horstretch>0</horstretch>
+@@ -2736,7 +2736,7 @@
+         </widget>
+        </item>
+        <item>
+-        <widget class="QGroupBox" name="portaudioDriver">
++        <widget class="Ms::RadioButtonGroupBox" name="portaudioDriver">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+            <horstretch>0</horstretch>
+@@ -2922,7 +2922,7 @@ Adjusting latency can help synchronize y
+         </widget>
+        </item>
+        <item>
+-        <widget class="QGroupBox" name="alsaDriver">
++        <widget class="Ms::RadioButtonGroupBox" name="alsaDriver">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+            <horstretch>0</horstretch>
+@@ -3144,7 +3144,7 @@ Adjusting latency can help synchronize y
+         </widget>
+        </item>
+        <item>
+-        <widget class="QGroupBox" name="jackDriver">
++        <widget class="Ms::RadioButtonGroupBox" name="jackDriver">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+            <horstretch>0</horstretch>
+@@ -4232,6 +4232,11 @@ Adjusting latency can help synchronize y
+    <extends>QToolButton</extends>
+    <header>recordbutton.h</header>
+   </customwidget>
++  <customwidget>
++   <class>Ms::RadioButtonGroupBox</class>
++   <extends>QGroupBox</extends>
++   <header>radiobuttongroupbox.h</header>
++  </customwidget>
+  </customwidgets>
+  <tabstops>
+   <tabstop>General</tabstop>
+--- /dev/null
++++ b/mscore/radiobuttongroupbox.cpp
+@@ -0,0 +1,49 @@
++//=============================================================================
++//  MuseScore
++//  Music Composition & Notation
++//
++//  Copyright (C) 2020 MuseScore BVBA and others
++//
++//  This program is free software; you can redistribute it and/or modify
++//  it under the terms of the GNU General Public License version 2.
++//
++//  This program is distributed in the hope that it will be useful,
++//  but WITHOUT ANY WARRANTY; without even the implied warranty of
++//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++//  GNU General Public License for more details.
++//
++//  You should have received a copy of the GNU General Public License
++//  along with this program; if not, write to the Free Software
++//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++//=============================================================================
++
++#include "radiobuttongroupbox.h"
++
++namespace Ms {
++
++void RadioButtonGroupBox::paintEvent(QPaintEvent*)
++      {
++      QStylePainter painter(this);
++      QStyleOptionGroupBox styleOption;
++      initStyleOption(&styleOption);
++
++      // Paint the default QGroupBox-style control, which includes an unwanted checkbox that we'll cover up afterwards.
++      painter.drawComplexControl(QStyle::CC_GroupBox, styleOption);
++
++      // Calculate the background color the same way Qt does in QFusionStylePrivate::tabFrameColor().
++      const QColor& buttonColor = styleOption.palette.button().color();
++      QColor bgColor = buttonColor.lighter(100 + std::max(1, (180 - qGray(buttonColor.rgb())) / 6));
++      bgColor.setHsv(bgColor.hue(), 3 * bgColor.saturation() / 4, bgColor.value());
++      bgColor = bgColor.lighter(104);
++
++      // Adjust the style options to use the checkbox's rectangle.
++      styleOption.rect = style()->subControlRect(QStyle::CC_GroupBox, &styleOption, QStyle::SC_GroupBoxCheckBox, this);
++
++      // Cover up the checkbox, making sure to enlarge the rectangle a bit to cover up any anti-aliasing around the edges.
++      painter.fillRect(styleOption.rect.adjusted(-2, -2, 2, 2), bgColor);
++
++      // Paint the radio button.
++      painter.drawPrimitive(QStyle::PE_IndicatorRadioButton, styleOption);
++      }
++
++}
+--- /dev/null
++++ b/mscore/radiobuttongroupbox.h
+@@ -0,0 +1,37 @@
++//=============================================================================
++//  MuseScore
++//  Music Composition & Notation
++//
++//  Copyright (C) 2020 MuseScore BVBA and others
++//
++//  This program is free software; you can redistribute it and/or modify
++//  it under the terms of the GNU General Public License version 2.
++//
++//  This program is distributed in the hope that it will be useful,
++//  but WITHOUT ANY WARRANTY; without even the implied warranty of
++//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++//  GNU General Public License for more details.
++//
++//  You should have received a copy of the GNU General Public License
++//  along with this program; if not, write to the Free Software
++//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++//=============================================================================
++
++#ifndef RADIOBUTTONGROUPBOX_H
++#define RADIOBUTTONGROUPBOX_H
++
++namespace Ms {
++
++class RadioButtonGroupBox : public QGroupBox {
++      Q_OBJECT
++
++      void paintEvent(QPaintEvent* event) override;
++
++   public:
++      explicit RadioButtonGroupBox(QWidget* parent = nullptr) : QGroupBox(parent) { }
++      explicit RadioButtonGroupBox(const QString& title, QWidget* parent = nullptr) : QGroupBox(title, parent) { }
++      };
++
++}
++
++#endif
diff --git a/debian/patches/upstream/save-no-redundant.diff b/debian/patches/upstream/save-no-redundant.diff
new file mode 100644 (file)
index 0000000..d38bd38
--- /dev/null
@@ -0,0 +1,19 @@
+Origin: backport, commit:d83b768f87a9d05a8b33a5b80e7043922ab7c337
+Author: Howard-C <howardc@pku.edu.cn>
+Description: fix #301116: don't write default note event values along with non-default ones
+
+--- a/libmscore/noteevent.cpp
++++ b/libmscore/noteevent.cpp
+@@ -41,9 +41,9 @@ void NoteEvent::read(XmlReader& e)
+ void NoteEvent::write(Xml& xml) const
+       {
+       xml.stag("Event");
+-      xml.tag("pitch", _pitch);
+-      xml.tag("ontime", _ontime);
+-      xml.tag("len", _len);
++      xml.tag("pitch", _pitch, 0);
++      xml.tag("ontime", _ontime, 0);
++      xml.tag("len", _len, 1000);
+       xml.etag();
+       }
diff --git a/debian/patches/upstream/synth-glitches.diff b/debian/patches/upstream/synth-glitches.diff
new file mode 100644 (file)
index 0000000..bbd799e
--- /dev/null
@@ -0,0 +1,38 @@
+Origin: upstream, commit:4253d779cf46b9a72e5b170b6f14dcc332c7d0d7
+Author: Eric Fontaine <eric@ericfontainejazz.com>
+Description: fix #291756 explicitly-signed char fluid pitchadj
+ C standards say that "char" may either be a "signed char" or "unsigned
+ char" but that it is up to the compilers implementation or the platform
+ which is followed. Some non x86 platforms, including PowerPC and ARM,
+ treat unspecified chars as unsigned chars, so it is necessary to
+ explicitly declare them as "signed char" (or to compile with
+ "--signed_chars").
+ .
+ This fix ensures that fluid synth's sample's pitchadj value are
+ correctly read as signed.
+
+--- a/fluid/sfont.cpp
++++ b/fluid/sfont.cpp
+@@ -811,9 +811,9 @@ unsigned char SFont::READB()
+ //   READC
+ //---------------------------------------------------------
+-char SFont::READC()
++signed char SFont::READC()
+       {
+-      char var;
++      signed char var;
+       safe_fread(&var, 1);
+       return var;
+       }
+--- a/fluid/sfont.h
++++ b/fluid/sfont.h
+@@ -92,7 +92,7 @@ class SFont {
+       void FSKIP(int size)    {  return safe_fseek(size); }
+       void FSKIPW();
+       unsigned char READB();
+-      char READC();
++      signed char READC();
+       void READSTR(char*);
+       void safe_fread(void *buf, int count);
diff --git a/debian/patches/upstream/wmclass.diff b/debian/patches/upstream/wmclass.diff
new file mode 100644 (file)
index 0000000..3cfe332
--- /dev/null
@@ -0,0 +1,14 @@
+Origin: upstream, commit:0c1e286c8dd6ab0a55b031c886de1a2d394b29d2
+Author: Joachim Schmitz <jojo@schmitz-digital.de>
+Description: fix #307593: prevent duplicated icon on Ubuntu
+
+--- a/build/Linux+BSD/mscore.desktop.in
++++ b/build/Linux+BSD/mscore.desktop.in
+@@ -10,6 +10,7 @@ Comment[fr]=Gravure de partitions musica
+ Exec=mscore@MSCORE_INSTALL_SUFFIX@ %F
+ Icon=mscore@MSCORE_INSTALL_SUFFIX@
+ StartupNotify=true
++StartupWMClass=mscore@MSCORE_INSTALL_SUFFIX@
+ Terminal=false
+ Type=Application
+ Categories=Qt;Audio;Sequencer;Midi;AudioVideoEditing;Music;AudioVideo;