diff --git a/.gitignore b/.gitignore index 00d4c53..021fc58 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ frescobaldi-1.0.3.tar.gz /frescobaldi-3.1.2.tar.gz /frescobaldi-3.1.3.tar.gz /frescobaldi-3.2.tar.gz +/frescobaldi-3.3.0.tar.gz diff --git a/0001-Avoid-event-QKeySequence-member-comparisons-1480.patch b/0001-Avoid-event-QKeySequence-member-comparisons-1480.patch deleted file mode 100644 index efd536f..0000000 --- a/0001-Avoid-event-QKeySequence-member-comparisons-1480.patch +++ /dev/null @@ -1,174 +0,0 @@ -From 081cb217763f3d09e6f458bcdc639493eb8ecfde Mon Sep 17 00:00:00 2001 -From: Jean Abou-Samra -Date: Sun, 26 Feb 2023 10:41:00 +0100 -Subject: [PATCH] Avoid == comparisons (#1480) - -Under some versions of PyQt, these seem to "work", returning True if -the event is a key event and matches the key sequence, but with other -versions of PyQt, they cause crashes (#1453). - -Fixes #1453 ---- - frescobaldi_app/editinplace.py | 7 ++----- - frescobaldi_app/gadgets/cursorkeys.py | 18 ++++++++---------- - frescobaldi_app/search/__init__.py | 4 +--- - frescobaldi_app/view.py | 21 +++++++++++---------- - 4 files changed, 22 insertions(+), 28 deletions(-) - -diff --git a/frescobaldi_app/editinplace.py b/frescobaldi_app/editinplace.py -index 2dc1f60e..fce91e88 100644 ---- a/frescobaldi_app/editinplace.py -+++ b/frescobaldi_app/editinplace.py -@@ -25,7 +25,7 @@ A dialog where the user can edit a short fragment of a larger document. - """ - - --from PyQt5.QtCore import QSettings, QSize -+from PyQt5.QtCore import QEvent, QSettings, QSize - from PyQt5.QtGui import (QKeySequence, QTextCharFormat, QTextCursor, - QTextDocument) - from PyQt5.QtWidgets import QAction, QPlainTextDocumentLayout, QPlainTextEdit -@@ -188,7 +188,7 @@ class View(QPlainTextEdit): - - def event(self, ev): - """Reimplemented to avoid typing the line separator.""" -- if ev == QKeySequence.InsertLineSeparator: -+ if ev.type() == QEvent.KeyPress and ev.matches(QKeySequence.InsertLineSeparator): - return False - return super(View, self).event(ev) - -@@ -250,6 +250,3 @@ class Analyzer(autocomplete.analyzer.Analyzer): - def document_cursor(self): - """Reimplemented to return the cursor of the real document.""" - return self._document_cursor -- -- -- -diff --git a/frescobaldi_app/gadgets/cursorkeys.py b/frescobaldi_app/gadgets/cursorkeys.py -index 819ab807..3674f6f8 100644 ---- a/frescobaldi_app/gadgets/cursorkeys.py -+++ b/frescobaldi_app/gadgets/cursorkeys.py -@@ -87,8 +87,8 @@ class KeyPressHandler(QObject): - False when the event was not handled and should be handled normally. - - """ -- home = ev == QKeySequence.MoveToStartOfLine -- s_home = ev == QKeySequence.SelectStartOfLine -+ home = ev.matches(QKeySequence.MoveToStartOfLine) -+ s_home = ev.matches(QKeySequence.SelectStartOfLine) - if home or s_home: - # go to first non-space character if not already there - cursor = edit.textCursor() -@@ -109,9 +109,9 @@ class KeyPressHandler(QObject): - False when the event was not handled and should be handled normally. - - """ -- if ev == QKeySequence.MoveToNextChar or ev == QKeySequence.SelectNextChar: -+ if ev.matches(QKeySequence.MoveToNextChar) or ev.matches(QKeySequence.SelectNextChar): - return edit.textCursor().atBlockEnd() -- elif ev == QKeySequence.MoveToPreviousChar or ev == QKeySequence.SelectPreviousChar: -+ elif ev.matches(QKeySequence.MoveToPreviousChar) or ev.matches(QKeySequence.SelectPreviousChar): - return edit.textCursor().atBlockStart() - - def handleVertical(self, edit, ev): -@@ -124,33 +124,31 @@ class KeyPressHandler(QObject): - """ - cursor = edit.textCursor() - pos = cursor.position() -- if ev == QKeySequence.MoveToPreviousLine or ev == QKeySequence.MoveToPreviousPage: -+ if ev.matches(QKeySequence.MoveToPreviousLine) or ev.matches(QKeySequence.MoveToPreviousPage): - cursor.movePosition(QTextCursor.Up) - if cursor.position() == pos: # no move - cursor.movePosition(QTextCursor.Start) - edit.setTextCursor(cursor) - return True - return False -- elif ev == QKeySequence.SelectPreviousLine or ev == QKeySequence.SelectPreviousPage: -+ elif ev.matches(QKeySequence.SelectPreviousLine) or ev.matches(QKeySequence.SelectPreviousPage): - cursor.movePosition(QTextCursor.Up, QTextCursor.KeepAnchor) - if cursor.position() == pos: # no move - cursor.movePosition(QTextCursor.Start, QTextCursor.KeepAnchor) - edit.setTextCursor(cursor) - return True - return False -- elif ev == QKeySequence.MoveToNextLine or ev == QKeySequence.MoveToNextPage: -+ elif ev.matches(QKeySequence.MoveToNextLine) or ev.matches(QKeySequence.MoveToNextPage): - cursor.movePosition(QTextCursor.Down) - if cursor.position() == pos: # no move - cursor.movePosition(QTextCursor.End) - edit.setTextCursor(cursor) - return True - return False -- elif ev == QKeySequence.SelectNextLine or ev == QKeySequence.SelectNextPage: -+ elif ev.matches(QKeySequence.SelectNextLine) or ev.matches(QKeySequence.SelectNextPage): - cursor.movePosition(QTextCursor.Down, QTextCursor.KeepAnchor) - if cursor.position() == pos: # no move - cursor.movePosition(QTextCursor.End, QTextCursor.KeepAnchor) - edit.setTextCursor(cursor) - return True - return False -- -- -diff --git a/frescobaldi_app/search/__init__.py b/frescobaldi_app/search/__init__.py -index ea184506..bac71953 100644 ---- a/frescobaldi_app/search/__init__.py -+++ b/frescobaldi_app/search/__init__.py -@@ -357,7 +357,7 @@ class Search(plugin.MainWindowPlugin, QWidget): - - def event(self, ev): - """Reimplemented to catch F1 for help and Tab so it does not reach the View.""" -- if ev == QKeySequence.HelpContents: -+ if ev.type() == QEvent.ShortcutOverride and ev.matches(QKeySequence.HelpContents): - userguide.show("search_replace") - ev.accept() - return True -@@ -437,5 +437,3 @@ class Search(plugin.MainWindowPlugin, QWidget): - replaced = True - if replaced: - self.highlightingOn() -- -- -diff --git a/frescobaldi_app/view.py b/frescobaldi_app/view.py -index 245847b2..ea1aa5d1 100644 ---- a/frescobaldi_app/view.py -+++ b/frescobaldi_app/view.py -@@ -94,17 +94,18 @@ class View(QPlainTextEdit): - - handle Tab and Backtab to change the indent - - """ -- if ev in ( -- # avoid the line separator, makes no sense in plain text -- QKeySequence.InsertLineSeparator, -- # those can better be called via the menu actions, then they -- # work better -- QKeySequence.Undo, -- QKeySequence.Redo, -- ): -+ if (ev.type() == QEvent.ShortcutOverride -+ and (ev.matches(QKeySequence.Undo) or ev.matches(QKeySequence.Redo))): -+ # QPlainTextEdit accepts ShortcutOverride for Undo and Redo, which -+ # override the shortcut and causes a KeyPress to be broadcast -+ # instead of a Shortcut, preventing it from reaching our QActions -+ # and making it handled by the QPlainTextEdit instead. - return False -- # handle Tab and Backtab -+ - if ev.type() == QEvent.KeyPress: -+ if ev.matches(QKeySequence.InsertLineSeparator): -+ return False -+ - cursor = self.textCursor() - if ev.key() == Qt.Key_Tab and ev.modifiers() == Qt.NoModifier: - # tab pressed, insert a tab when no selection and in text, -@@ -143,7 +144,7 @@ class View(QPlainTextEdit): - Currently handles: - - - indent change on Enter, }, # or > -- -+ - - update the tooltip info when Ctrl is pressed - - """ --- -2.39.2 - diff --git a/0001-Remove-nested-list-from-metainfo-release.patch b/0001-Remove-nested-list-from-metainfo-release.patch deleted file mode 100644 index 5e021de..0000000 --- a/0001-Remove-nested-list-from-metainfo-release.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- linux/org.frescobaldi.Frescobaldi.metainfo.xml.in~ 2022-02-20 08:20:49.000000000 -0600 -+++ linux/org.frescobaldi.Frescobaldi.metainfo.xml.in 2022-05-05 12:31:23.756135594 -0500 -@@ -83,11 +83,9 @@ -
  • fixed "NameError: name 'imp' is not defined" when importing
  • -
  • fixed search of generated files on macOS for some Unicode file names
  • -
  • fixed selection of Python on Mac OS:
  • --
      --
    • select the system Python 2 or 3 according to LilyPond's version
    • --
    • support MacPorts' LilyPond tools
    • --
    • add option to allow forcing the use of the tools' #! lines (useful for self-compiled or other nonstandard LilyPond installations)
    • --
    -+
  • select the system Python 2 or 3 according to LilyPond's version
  • -+
  • support MacPorts' LilyPond tools
  • -+
  • add option to allow forcing the use of the tools' #! lines (useful for self-compiled or other nonstandard LilyPond installations)
  • -
  • fixed "AttributeError: 'PreviewJob' object has no attribute 'lilypond_version'"
  • -
  • fixed Ghostscript error on Mac with MacPorts' LilyPond 2.21.x
  • - -@@ -107,12 +105,10 @@ -
  • Fixed pinch gesture zooming in Music View on Mac OS X
  • -
  • Fixed printing the music score on Mac OS X
  • -
  • Fixed cursor navigation keyboard shortcuts on Mac OS X; new shortcuts:
  • --
      --
    • next document: ctrl+tab
    • --
    • previous document: ctrl+shift+tab
    • --
    • start of line: cmd+left
    • --
    • end of line: cmd+right
    • --
    -+
  • next document: ctrl+tab
  • -+
  • previous document: ctrl+shift+tab
  • -+
  • start of line: cmd+left
  • -+
  • end of line: cmd+right
  • -
  • Fixed the display of filenames in document tabs on Mac OS X
  • -
  • Fixed the global menu with no windows open on Mac OS X
  • -
  • Fixed the error with convert-ly on in the Mac app bundle
  • diff --git a/frescobaldi.spec b/frescobaldi.spec index a972894..a0ae6d6 100644 --- a/frescobaldi.spec +++ b/frescobaldi.spec @@ -1,18 +1,16 @@ %{!?qt5_qtwebengine_arches:%global qt5_qtwebengine_arches %{ix86} x86_64 %{arm} aarch64 mips mipsel mips64el} Name: frescobaldi -Version: 3.2 -Release: 5%{?dist} +Version: 3.3.0 +Release: 1%{?dist} Summary: Edit LilyPond sheet music with ease! # hyphenator.py is LGPLv2+ # The rest, including the core of the program, is GPLv2+ License: GPLv2+ and LGPL-2.0-or-later URL: http://www.frescobaldi.org/ -Source0: https://github.com/wbsoft/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: frescobaldi-3.1.2-setup.patch -Patch1: 0001-Remove-nested-list-from-metainfo-release.patch -Patch2: 0001-Avoid-event-QKeySequence-member-comparisons-1480.patch BuildArch: noarch ExclusiveArch: %{qt5_qtwebengine_arches} @@ -60,13 +58,9 @@ yet lightweight and easy to use. It features: find -name "*.py" -exec sed -i -e 's|#! python||' {} \; %patch0 -p0 -%patch1 -p0 -%patch2 -p1 %build python3 ./setup.py build -#cd %{name}_app/po -#make make -C linux/ %install @@ -89,7 +83,7 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml %files %license COPYING -%doc ChangeLog README* THANKS TODO +%doc CHANGELOG.md README* THANKS TODO %{_bindir}/%{name} %{python3_sitelib}/%{name}_app %{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info @@ -99,6 +93,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml %{_metainfodir}/*.metainfo.xml %changelog +* Mon Mar 27 2023 Gwyn Ciesla - 3.3.0-1 +- 3.3.0 + * Thu Mar 09 2023 Nils Philippsen - 3.2-5 - Apply upstream fix for event issue (#2176793) - Remove trailing white space diff --git a/sources b/sources index b5fc6bd..b7bbed9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (frescobaldi-3.2.tar.gz) = 403ae6cfe145595fef0ffe06ce4fd595a0417201b19e5f2315944b45cdcec50592296424f2bf2c7e3eccbe3dbeb9ff5bfc4aa7813241d8168bc057e7bf5539b3 +SHA512 (frescobaldi-3.3.0.tar.gz) = 0dc851cb2ab001f366d20d3c27159087a643cbb5661cc7388b9ec5209c03d4d47dc9114f378dab0562a1a4cb84c2a67eddd8b1981ceaa057e5ac79f8c277ad05