Skip to content

Commit

Permalink
New package: frescobaldi-3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dexgs committed Jan 3, 2023
1 parent bfce281 commit a1f8c80
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
From ac002d5534c57f2e2f86fbde0ece166a90c4b7e0 Mon Sep 17 00:00:00 2001
From: Dexter Gaon-Shatford <dexter@gaonshatford.ca>
Date: Fri, 11 Nov 2022 15:23:41 -0500
Subject: [PATCH] fix: TypeError when treating Type as QKeySequence

Removed code which treats instances of QEvent.Type as QKeySequence as
they result in a TypeError on Python 3.11
---
frescobaldi_app/search/__init__.py | 6 +-----
frescobaldi_app/view.py | 14 --------------
2 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/frescobaldi_app/search/__init__.py b/frescobaldi_app/search/__init__.py
index ea184506..448c2d3a 100644
--- a/frescobaldi_app/search/__init__.py
+++ b/frescobaldi_app/search/__init__.py
@@ -357,11 +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:
- userguide.show("search_replace")
- ev.accept()
- return True
- elif ev.type() == QEvent.KeyPress:
+ if ev.type() == QEvent.KeyPress:
modifiers = int(ev.modifiers() & (Qt.SHIFT | Qt.CTRL | Qt.ALT | Qt.META))
if ev.key() == Qt.Key_Tab and modifiers == 0:
# prevent Tab from reaching the View widget
diff --git a/frescobaldi_app/view.py b/frescobaldi_app/view.py
index 245847b2..69de7330 100644
--- a/frescobaldi_app/view.py
+++ b/frescobaldi_app/view.py
@@ -86,23 +86,9 @@ class View(QPlainTextEdit):

This is reimplemented to:

- - prevent inserting the hard line separator, which makes no sense in
- plain text
-
- - prevent handling Undo and Redo, they work better via the menu actions
-
- 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,
- ):
- return False
# handle Tab and Backtab
if ev.type() == QEvent.KeyPress:
cursor = self.textCursor()
--
2.38.1

20 changes: 20 additions & 0 deletions srcpkgs/frescobaldi/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Template file for 'frescobaldi'
pkgname=frescobaldi
version=3.2
revision=1
build_style=python3-module
make_check_target="check"
hostmakedepends="python3-setuptools gettext"
depends="python3-PyQt5 python3-PyQt5-svg poppler-qt5 portmidi
python3-cups python3-ly lilypond python3-qpageview"
short_desc="Powerful, lightweight and easy to use LilyPond sheet music text editor"
maintainer="chili-b <dexter.gaonshatford@gmail.com>"
license="GPL-2.0-or-later"
homepage="https://frescobaldi.org/"
changelog="https://github.com/frescobaldi/frescobaldi/blob/master/ChangeLog"
distfiles="https://github.com/frescobaldi/frescobaldi/archive/v${version}.tar.gz"
checksum=f7bb9b5f708f902f8f512ab6f0de1a6272d9e176f678027e576b06e5ceec8fe8

pre_build() {
make -C linux
}

0 comments on commit a1f8c80

Please sign in to comment.