Compare commits

...

92 Commits

Author SHA1 Message Date
Raoul Snyman bfbd85deb4 Merge branch 'release-3.1.2' into 'master'
Release 3.1.2

See merge request openlp/openlp!752
2024-05-17 20:05:52 +00:00
Raoul Snyman 795aa22caa Merge branch 'update-changelog-3.1.2' into 'master'
Update the changelog for 3.1.2

See merge request openlp/openlp!751
2024-05-17 20:04:45 +00:00
Raoul Snyman 17240e2dd4 Update the changelog for 3.1.2 2024-05-17 20:04:45 +00:00
Raoul Snyman 912695dca9 Release 3.1.2 2024-05-15 22:20:01 -07:00
Raoul Snyman ca5304d91e Merge branch 'additional_planning_center_data' into 'master'
Additional planning center data

See merge request openlp/openlp!750
2024-05-14 16:03:45 +00:00
Tim Stephenson 2053029d7f Additional planning center data 2024-05-14 16:03:45 +00:00
Raoul Snyman dd466fb013 Merge branch 'uppercase-global' into 'master'
Add "Apply UPPERCASE globally" function to songs plugin.

See merge request openlp/openlp!749
2024-05-02 16:46:44 +00:00
Matey Krastev 45f68364a3 Add "Apply UPPERCASE globally" function to songs plugin. 2024-05-02 16:46:44 +00:00
Raoul Snyman 6bbfe00ec0 Merge branch 'translations-21042024' into 'master'
Translations 21042024

See merge request openlp/openlp!748
2024-04-27 05:42:58 +00:00
Tim Bentley cee0a9d573 Translations 21042024 2024-04-27 05:42:58 +00:00
Raoul Snyman 2ad33529e4 Merge branch 'issue-1877' into 'master'
Attempt to bubble up permissions errors to the user so that we don't run into None files or hashes

See merge request openlp/openlp!746
2024-04-20 22:26:55 +00:00
Raoul Snyman 7bb7dc35c0 Merge branch 'minor_fixes2' into 'master'
Stop Service File items from containing more than one audio file

See merge request openlp/openlp!742
2024-04-20 22:14:30 +00:00
Tim Bentley 9b9d8feafa Stop Service File items from containing more than one audio file 2024-04-20 22:14:29 +00:00
Raoul Snyman 32d132c2f0 Merge branch 'issue-1883' into 'master'
Fix build part of version number

Closes #1883

See merge request openlp/openlp!745
2024-04-20 22:13:26 +00:00
Raoul Snyman f5e0682e0d Fix build part of version number 2024-04-20 22:13:26 +00:00
Raoul Snyman 7d44795cf7 Merge branch 'issue-1878' into 'master'
Attempt to fix #1878 by checking if the service item exists first

Closes #1878

See merge request openlp/openlp!744
2024-04-20 22:13:08 +00:00
Raoul Snyman 64f1a0e52d Attempt to bubble up permissions errors to the user so that we don't run into None files or hashes 2024-04-19 23:11:01 -07:00
Raoul Snyman d2a2b94273 Merge branch 'hide-live-when-screen-setup-has-changed' into 'master'
Hide live when screen setup has changed

See merge request openlp/openlp!743
2024-04-20 05:42:23 +00:00
Chris Witterholt e93ac46f2a Hide live when screen setup has changed 2024-04-20 05:42:23 +00:00
Raoul Snyman 2639c7cd00 Attempt to fix #1878 by checking if the service item exists first 2024-04-19 21:59:07 -07:00
Tomas Groth 6d636f3235 Merge branch 'plugin-hooks' into 'master'
Add some registry functions and more that makes it easier for plugins to integrate

See merge request openlp/openlp!741
2024-04-17 20:06:18 +00:00
Tomas Groth b8855eb8ed Add some registry functions and more that makes it easier for plugins to integrate 2024-04-17 17:14:58 +02:00
Tim Bentley d1724bc6c3 Merge branch 'issue-1880' into 'master'
Make the slide height affect the size of the thumbnails generated

Closes #1880

See merge request openlp/openlp!738
2024-04-16 20:58:55 +00:00
Tim Bentley 62d6b61518 Merge branch 'fix-for-not-found-i18n-directory' into 'master'
Fix for not found i18n directory

See merge request openlp/openlp!739
2024-04-16 18:19:45 +00:00
Chris Witterholt 9b794e4ff8 Fix for not found i18n directory 2024-04-16 18:19:45 +00:00
Tim Bentley 6cfa2419e3 Merge branch 'fix-missing-verse-translations' into 'master'
Fix missing verse translations

See merge request openlp/openlp!740
2024-04-16 18:16:24 +00:00
Chris Witterholt 027391d321 Fix missing verse translations 2024-04-16 18:16:24 +00:00
Raoul Snyman 885e57ba41 Make the slide height affect the size of the thumbnails generated 2024-04-14 22:36:19 -07:00
Tomas Groth 6498b66698 Merge branch 'import-ewsx' into 'master'
Add ewsx song importer

See merge request openlp/openlp!737
2024-04-09 15:19:58 +00:00
Tomas Groth fa05ee4b2d Add ewsx song importer 2024-04-09 15:19:58 +00:00
Raoul Snyman 39833c770d Merge branch 'add-webapi-endpoint-get-translation' into 'master'
Add web API endpoint get configured language

See merge request openlp/openlp!730
2024-03-28 03:17:33 +00:00
Chris Witterholt fd45bba951 Add web API endpoint get configured language 2024-03-28 03:17:33 +00:00
Raoul Snyman f2484d170a Merge branch 'add-webapi-endpoint-get-shortcuts' into 'master'
Add web API endpoint get configured shortcut keys.

See merge request openlp/openlp!734
2024-03-27 19:12:22 +00:00
Chris Witterholt 34cc2a3e28 Add web API endpoint get configured shortcut keys. 2024-03-27 19:12:22 +00:00
Tim Bentley b569a1793d Merge branch 'bug-940' into 'master'
Add checks to prevent multiple Linked Audio items on songs

Closes #940

See merge request openlp/openlp!728
2024-03-25 07:51:34 +00:00
Trildar f3c675901c Add checks to prevent multiple Linked Audio items on songs 2024-03-25 07:51:34 +00:00
Raoul Snyman 34ff2dab8b Merge branch 'fix-1871' into 'master'
Further fix #1871 by adding the Application name as early as possible

Closes #1871

See merge request openlp/openlp!733
2024-03-24 19:59:36 +00:00
Raoul Snyman 78c32e434c Further fix #1871 by adding the Application name as early as possible 2024-03-24 10:43:29 -07:00
Tomas Groth 1a281e3931 Merge branch 'issue-1871' into 'master'
Fix unintentional change of the organization name by the domain name.

Closes #1871

See merge request openlp/openlp!732
2024-03-23 20:50:01 +00:00
Chris Witterholt 490b25b73b Fix unintentional change of the organization name by the domain name. 2024-03-23 20:50:00 +00:00
Raoul Snyman cb1db9f432 Merge branch 'fix-missing-translations' into 'master'
Fix missing translations

See merge request openlp/openlp!729
2024-03-18 06:13:26 +00:00
Chris Witterholt 6ea889b974 Fix missing translations 2024-03-18 06:13:26 +00:00
Raoul Snyman a53e20864c Merge branch 'release-3.1.1' into 'master'
Release 3.1.1

See merge request openlp/openlp!727
2024-03-10 00:57:32 +00:00
Raoul Snyman e5f6850d14 Release 3.1.1 2024-03-08 21:09:01 -07:00
Tomas Groth 87deeb58cc Merge branch 'issue-1860' into 'master'
Fix path to QtWebEngineProcess binary

Closes #1860

See merge request openlp/openlp!726
2024-03-07 05:41:43 +00:00
Raoul Snyman 2f54765670 Fix path to QtWebEngineProcess binary 2024-03-06 22:05:34 -07:00
Raoul Snyman 3c20d5f8d6 Merge branch 'songselect-import-encoding' into 'master'
Always open downloaded songs as utf-8

See merge request openlp/openlp!725
2024-03-07 03:56:37 +00:00
Raoul Snyman a40d5e894e Merge branch 'issue-1859' into 'master'
Use Python's version comparison, not Qt's

Closes #1859

See merge request openlp/openlp!724
2024-03-06 15:58:22 +00:00
Raoul Snyman 5508bb683c Use Python's version comparison, not Qt's 2024-03-06 15:58:22 +00:00
Tomas Groth cb490b9e59 Always open downloaded songs as utf-8 2024-03-06 13:08:02 +00:00
Tim Bentley 0d3acc2e67 Merge branch 'translations-01032024aa' into 'master'
Translations 01032024aa

See merge request openlp/openlp!723
2024-03-01 11:34:07 +00:00
Tim Bentley 9747f16de9 Translations 01032024aa 2024-03-01 11:34:07 +00:00
Raoul Snyman e5e8bc4164 Merge branch 'bugs31-email' into 'master'
Change bug reporting email address to differentiate between affected versions.

See merge request openlp/openlp!720
2024-02-19 06:16:21 +00:00
Tomas Groth 8c61bb68fd Change bug reporting email address to differentiate between affected versions. 2024-02-18 09:51:06 +01:00
Raoul Snyman 50c431a1f1 Merge branch 'version' into 'master'
Update version file - incase Superfly forgets!

See merge request openlp/openlp!719
2024-02-16 15:21:40 +00:00
Tim Bentley c5da029024 Update version file - incase Superfly forgets! 2024-02-16 15:21:39 +00:00
Tim Bentley 0065049437 Merge branch 'translations-14022024' into 'master'
Translations 14022024

See merge request openlp/openlp!716
2024-02-16 14:09:08 +00:00
Tim Bentley f0e23b4166 Translations 14022024 2024-02-16 14:09:07 +00:00
Tim Bentley 77627f55f0 Merge branch 'more-non-linux-test-fixes' into 'master'
Fix more non-linux test

See merge request openlp/openlp!718
2024-02-16 13:39:01 +00:00
Tomas Groth 2962b8dc14 Fix more non-linux test 2024-02-16 13:39:01 +00:00
Tim Bentley f2410aede7 Merge branch 'non-linux-test-fixes' into 'master'
Fix tests for non-linux

See merge request openlp/openlp!717
2024-02-15 21:48:23 +00:00
Tomas Groth 8c4f99689b Fix tests for non-linux 2024-02-15 21:48:22 +00:00
Raoul Snyman 52afc20ac4 Merge branch 'michaelweghorn/set_desktop_file_name' into 'master'
Set the app's desktop file name

Closes #1837

See merge request openlp/openlp!714
2024-02-15 18:29:51 +00:00
Michael Weghorn d32ee3dfa3 Set the app's desktop file name 2024-02-15 18:29:51 +00:00
Tim Bentley b3cab7113b Merge branch 'fix/asserts' into 'master'
tests: add `assert_ ` prefix to a bunch of asserts missing it

See merge request openlp/openlp!711
2024-02-15 15:11:57 +00:00
Joel Beckmeyer eef6ae8863 tests: add `assert_ ` prefix to a bunch of asserts missing it 2024-02-15 09:21:52 -05:00
Raoul Snyman ed7561bded Merge branch 'issue-1564' into 'master'
Invalidate the service item cache when the theme changes

Closes #1564

See merge request openlp/openlp!715
2024-02-15 03:58:41 +00:00
Raoul Snyman 4591c6bf06 Invalidate the service item cache when the theme changes 2024-02-14 20:54:29 -07:00
Raoul Snyman d73d387923 Merge branch 'platformdirs' into 'master'
Replace appdirs with platformdirs

Closes #1792

See merge request openlp/openlp!712
2024-02-15 03:49:04 +00:00
Bastian Germann c74bc27b48 Replace appdirs with platformdirs 2024-02-15 03:49:04 +00:00
Raoul Snyman 8c3d9b5742 Merge branch 'issue-1808' into 'master'
Fix a PermissionError that occurs on Windows 10/11 when qtawesome tries to look at its own fonts

See merge request openlp/openlp!710
2024-01-27 22:06:23 +00:00
Raoul Snyman d08f488040 Fix a PermissionError that occurs on Windows 10/11 when qtawesome tries to look at its own fonts 2024-01-26 23:30:24 -07:00
Raoul Snyman dc36d598e5 Merge branch 'issue-1641' into 'master'
Change the filter to be SQLAlchemy 2 compatible

Closes #1641

See merge request openlp/openlp!709
2024-01-27 04:03:28 +00:00
Raoul Snyman de068a5625 Change the filter to be SQLAlchemy 2 compatible 2024-01-26 08:12:45 -07:00
Raoul Snyman 3778448e76 Merge branch 'imports_2' into 'master'
Working version of Community Imports

See merge request openlp/openlp!703
2024-01-24 17:56:58 +00:00
Tim Bentley a4a05630e9 Working version of Community Imports 2024-01-24 17:56:58 +00:00
Tomas Groth 41ed3b45c1 Merge branch 'issue-1323-projectors' into 'master'
Fix #1323 for the Projector Manager

Closes #1323

See merge request openlp/openlp!708
2024-01-24 08:24:11 +00:00
Raoul Snyman 4cdcc3d320 Fix #1323 for the Projector Manager 2024-01-23 23:31:33 -07:00
Tomas Groth 143492f2e2 Merge branch 'typo-fix' into 'master'
Typo in commnet - Update slidecontroller.py

See merge request openlp/openlp!706
2024-01-13 15:57:47 +00:00
JessyJP 4269c33cd1 Typo in commnet - Update slidecontroller.py 2024-01-13 15:57:47 +00:00
Raoul Snyman b5fe3bde41 Merge branch 'wordproject-import-fix' into 'master'
Made the wordproject import more robust

Closes #1437

See merge request openlp/openlp!705
2024-01-09 17:26:36 +00:00
Tomas Groth d725627c16 Made the wordproject import more robust 2024-01-09 17:26:36 +00:00
Raoul Snyman 6fa5075b7b Merge branch 'Fix-a-typo-in-a-comment-that-reffers-to-a-method-rather-than-class' into 'master'
Just a simple typo fix - Update loader.py

See merge request openlp/openlp!701
2024-01-05 17:19:37 +00:00
JessyJP c17692976a Just a simple typo fix - Update loader.py 2024-01-05 17:19:37 +00:00
Raoul Snyman d13c1d199d Merge branch '2024' into 'master'
2024 - One year older but wiser?

See merge request openlp/openlp!704
2024-01-05 17:19:00 +00:00
Tim Bentley 6942211950 2024 - One year older but wiser? 2024-01-05 17:18:59 +00:00
Tim Bentley 504b6bfd0a Merge branch 'release-3.1.0rc4' into 'master'
Release 3.1.0rc4

See merge request openlp/openlp!700
2023-12-16 22:13:59 +00:00
Raoul Snyman cc0ee4bd5c Release 3.1.0rc4 2023-12-16 14:20:47 -07:00
Raoul Snyman eb389670f9 Merge branch 'ftw_loop_windows' into 'master'
FTW loop on Windows

See merge request openlp/openlp!699
2023-12-12 00:29:16 +00:00
Chris Witterholt 8cbfd8121e FTW loop on Windows 2023-12-12 00:29:16 +00:00
Raoul Snyman 24e8dfb6e9 Merge branch 'issue-1756' into 'master'
Fix portable builds by re-arranging when the settings are created

Closes #1756

See merge request openlp/openlp!698
2023-12-08 15:43:38 +00:00
Raoul Snyman 091caafcbf Fix portable builds by re-arranging when the settings are created 2023-12-07 20:47:39 -07:00
640 changed files with 19110 additions and 16830 deletions

View File

@ -1,3 +1,177 @@
OpenLP 3.1.2
============
* Import additional planning center data
* Add "Apply UPPERCASE globally" function to songs plugin
* Update translations
* Stop Service File items from containing more than one audio file
* Fix build part of version number
* Attempt to bubble up permissions errors to the user so that we don't run into None files or hashes
* Hide live when screen setup has changed
* Attempt to fix #1878 by checking if the service item exists first
* Add some registry functions and more that makes it easier for plugins to integrate
* Fix for not found i18n directory
* Fix missing verse translations
* Make the slide height affect the size of the thumbnails generated
* Add ewsx song importer
* Add web API endpoint get configured language
* Add web API endpoint get configured shortcut keys
* Add checks to prevent multiple Linked Audio items on songs
* Set up the Application name as early as possible
* Fix unintentional change of the organization name by the domain name.
* Fix missing translations
OpenLP 3.1.1
============
* Fix path to QtWebEngineProcess binary
* Use Python's version comparison, not Qt's
* Always open downloaded songs as utf-8
* Update translations
OpenLP 3.1.0
============
* Change bug reporting email address to differentiate between affected versions
* Update translations
* Set the app's desktop file name
* tests: add ``assert_`` prefix to a bunch of asserts missing it
* Invalidate the service item cache when the theme changes
* Replace appdirs with platformdirs
* Fix a PermissionError that occurs on Windows 10/11 when qtawesome tries to look at its own fonts
* Change the filter to be SQLAlchemy 2 compatible
* Working version of Community Imports
* Fix #1323 for the Projector Manager
* Made the wordproject import more robust
OpenLP 3.1.0rc4
===============
* Fix a loop in the First Time Wizard on Windows
* Fix portable builds by re-arranging when the settings are created
OpenLP 3.1.0rc3
===============
* Fix the coverage badge on GitLab by producing an XML report
* Fix irregular service theme saving (closes #1723)
* Fix AuthorType not getting translated
* Fix bug in _has_header
* Fix issues with upgrading 2.9.x databases
* Update translations
* Fix OpenLP startup by reordering statements
* High DPI Fixes
* Fix traceback on bible import when no bible available
* Check before initialising a None Bible
* Fix #1700 by typecasting the calls to Paths
* Make PathEdit handle None values
* Fix external DB settings
* Fix alerts
* Fix handling of missing VLC
* Better handling of attempts to load invalid SWORD folder or zip-file
* Ensure a path set in PathEdit is a Path instance
* Fix trimming leading whitespaces
* Inject String.replaceAll javascript implementation if needed into webengine when browsing SongSelect.
* Do not start the same presentation again when it's already live.
* Prevent key error when unblank screen at start of presentation.
OpenLP 3.1.0rc2
===============
* Revert the Registry behaviour
* Fix the multiselect in the images plugin
* Spoof the songselect webengine user agent
OpenLP 3.1.0rc1
===============
* Don't build manual, use online manual instead
* Update AppVeyor for Mac to install Pyro5 instead of Pyro4
* Silence error when shutting down threads
* Fix saving of songs
* Update some system messaging
* Re introduce the selective turning off logging - correctly this time.
* Fix some issues with building on macOS
* Fix spelling in songimport.py
* Bypass image db updates if the db has already been upgraded
* Fix a couple of macOS issues
* Fix issue with database cleanup code
* Make some forward compatibility changes
* Refactor last instances of TestCase-based tests
* Change SongSelect import procedure to import when clicking download on webpage
* Add test coverage for __main__.py and remove some unused files
* Remove unused flag in Registry
* When a permission error is raised during generation of the sha256 hash when deleting a presentation from the controller don't crash but continue.
* Fix presentations not being able to return from Display Screen
* fix the deadlock on macos
* Fix issue #1618 by ignoring the messages if the event loop is not running
* Fix issue #1382 by waiting for the service_manager to become available, or giving up after 2m
* Display API abstraction
* Try to fix an issue with MediaInfo perhaps returning a str instead of an int
* Fix issue #1582 by running the search in the original thread
* Try to fix an issue that only seems to happen on macOS
* Allow loading the same presentation file multiple times from 2.4.x service file. Fixes bug #1601.
* Fix endless loop at the end of a PowerPoint presentation
* Implement a filelock for shared data folder.
* Add detection for presentation files that were uploaded from the cloud.
* Move "Live" / "Preview" and current item on one line
* feat(importer): add authors to powerpraise importer
* Add the list of associated songs to the delete dialog in the song maintenance form
* Create a connection and then run execute
* Update appveyor.yml to use python 3.11.
* Fix an issue with the arguments of with_only_columns
* Fix song search by author
* Remove dependency on PIL since the latest version does not support PyQt5
* Fixing freezing screenshot test
* Fix Datasoul translate strings
* RFC/Proposal: Fallback code for display screenshot code (used on '/main' Web Remote)
* Update translations
* New theme adjustments: Adding letter spacing to theme main area; adding line and letter spacing to footer
* Fix the GitLab CI yaml config
* Fix issue #1297 by reducing the number by 1024 times
* Update resource generation for ARM64 platforms (e.g. Apple M2)
* Enumm Conversion
* Upgrade to Pyro5
* Ignore the thumbnails if the path doesn't exist (fixes #914)
* Adding Footer Content as Extra First Slide
* Fix an issue where an item's parent is None
* Migrate to SQLAlchemy 2 style queries
* Fix the 415 errors due to a change in Werkzeug
* Update CI to use the GitLab container registry
* Display Custom Scheme
* Implementing new message websocket endpoint
* Fix bug in icon definition - Typr only
* Take account of VLC on macOS being bundled with OpenLP
* Fix for #1495 task: wrapped C/C++ object of type QTreeWidgetItem has been deleted
* Fixing Images not being able to be inserted on Service
* Reusable Media Toolbar
* Adding foundational support to Footer per slide
* Merge CustomXMLBuilder and CustomXMLParser
* Add Datasoul song importer
* fix: tests on windows failing due to MagicMock in Path
* Migrate from FontAwesome4 to Material Design Icons v5.9.55
* Highlighted slidecontroller buttons
* Fix translations loading on linux system-wide installation
* Migrate database metadata to declarative base
* Migrate Song Usage to declarative
* Migrate alerts to declarative
* Migrate Images plugin to use shared folder code
* Fix a typo in creating custom slides from other text items
* Migrate images plugin to declarative base
* Convert Bibles to use declarative_base
* Convert custom slides to declarative
* Migrate to using Declarative Base in Songs
* Fix: Correct About references and Remove Unused
* Minor fix for EasyWorship import
* Improve Powerpoint detection by trying to start the application instead of looking it up in the registry.
* Fix selected=True not being set at new Transpose API Endpoint
* Allow the remote interface update notification to be turned off.
* Skip missing thumbnails when loading a service
* Rework the songs settings, so that they're not as squashed.
* Remove WebOb -- we don't need it
* Add a grid view to themes manager
OpenLP 3.0.2
============
@ -19,7 +193,6 @@ OpenLP 3.0.2
* Fix an issue where the websockets server would try to shut down even when -w is supplied
* Use a simpler approach when creating a tmp file when saving service files
OpenLP 2.5.1
============

View File

@ -31,7 +31,7 @@ install:
# Update pip
- python -m pip install --upgrade pip
# Install generic dependencies from pypi.
- python -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock psycopg2-binary websockets waitress six requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF QDarkStyle python-vlc flask-cors pytest-qt pyenchant pysword qrcode flask
- python -m pip install sqlalchemy alembic platformdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock psycopg2-binary websockets waitress six requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF QDarkStyle python-vlc flask-cors pytest-qt pyenchant pysword qrcode flask packaging
# Install Windows only dependencies
- cmd: python -m pip install pyodbc pypiwin32
- cmd: choco install vlc %CHOCO_VLC_ARG% --no-progress --limit-output
@ -51,6 +51,9 @@ test_script:
cd $env:APPVEYOR_BUILD_FOLDER
# Run the tests
python -m pytest tests
if ($LastExitCode -ne 0) {
throw "The tests failed!"
}
# Go back to the user root folder
cd ..
}

View File

@ -4,7 +4,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -1 +1 @@
3.1.0rc3
3.1.2

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -39,7 +39,7 @@ def index(path):
'index.html', mimetype='text/html')
@main_views.route('/assets/<path>')
@main_views.route('/assets/<path:path>')
def assets(path):
return send_from_directory(str(AppLocation.get_section_data_path('remotes') / 'assets'),
path, mimetype=get_mime_type(path))

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -4,7 +4,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -24,6 +24,7 @@ from flask import jsonify, request, abort, Blueprint
from PyQt5 import QtCore
from openlp.core.api.lib import login_required
from openlp.core.common.i18n import LanguageManager
from openlp.core.common.registry import Registry
from openlp.core.lib.plugin import PluginStatus, StringContent
from openlp.core.state import State
@ -56,16 +57,38 @@ def plugin_list():
return jsonify(searches)
@core.route('/shortcuts')
def shortcuts():
data = []
settings = Registry().get('settings_thread')
shortcut_prefix = 'shortcuts/'
for key in settings.allKeys():
if key.startswith(shortcut_prefix):
data.append(
{
'action': key.removeprefix(shortcut_prefix),
'shortcut': settings.value(key)
}
)
return jsonify(data)
@core.route('/system')
def system_information():
data = {}
data['websocket_port'] = Registry().get('settings_thread').value('api/websocket port')
data['login_required'] = Registry().get('settings_thread').value('api/authentication enabled')
data['api_version'] = 2
data['api_revision'] = 4
data['api_revision'] = 5
return jsonify(data)
@core.route('/language')
def language():
language = LanguageManager.get_language()
return jsonify({'language': language})
@core.route('/login', methods=['POST'])
def login():
data = request.json

View File

@ -4,7 +4,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -74,6 +74,7 @@ class OpenLP(QtCore.QObject, LogMixin):
"""
args = []
worker_threads = {}
settings = None
def exec(self):
"""
@ -100,6 +101,8 @@ class OpenLP(QtCore.QObject, LogMixin):
if 'OpenLP' in args:
args.remove('OpenLP')
self.args.extend(args)
# set desktop file name, which is used to display the proper window icon on Wayland
QtGui.QGuiApplication.setDesktopFileName("openlp")
# Decide how many screens we have and their size
screens = ScreenList.create(app)
# First time checks in settings
@ -290,7 +293,7 @@ def parse_options():
help='Set logging to LEVEL level. Valid values are "debug", "info", "warning".')
parser.add_argument('-p', '--portable', dest='portable', action='store_true',
help='Specify if this should be run as a portable app, ')
parser.add_argument('-pp', '--portable-path', dest='portablepath', default=None,
parser.add_argument('-P', '--portable-path', dest='portablepath', default=None,
help='Specify the path of the portable data, defaults to "{dir_name}".'.format(
dir_name=os.path.join('<AppDir>', '..', '..')))
parser.add_argument('-w', '--no-web-server', dest='no_web_server', action='store_true',
@ -417,7 +420,7 @@ def apply_dpi_adjustments_stage_qt(hidpi_mode, qt_args):
os.environ['QT_SCALE_FACTOR_ROUNDING_POLICY'] = 'PassThrough'
def apply_dpi_adjustments_stage_application(hidpi_mode, application):
def apply_dpi_adjustments_stage_application(hidpi_mode: HiDPIMode, application: QtWidgets.QApplication):
"""
Apply OpenLP DPI adjustments to bypass Windows and QT bugs (unless disabled on settings)
@ -441,6 +444,25 @@ def apply_dpi_adjustments_stage_application(hidpi_mode, application):
application.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
def setup_portable_settings(portable_path: Path | str | None) -> Settings:
"""Set up the portable settings"""
Settings.setDefaultFormat(Settings.IniFormat)
# Get location OpenLPPortable.ini
if portable_path:
if os.path.isabs(portable_path):
portable_path = Path(portable_path)
else:
portable_path = AppLocation.get_directory(AppLocation.AppDir) / '..' / portable_path
else:
portable_path = AppLocation.get_directory(AppLocation.AppDir) / '..' / '..'
portable_path = resolve(portable_path)
portable_settings_path = portable_path / 'Data' / 'OpenLP.ini'
# Make this our settings file
log.info(f'INI file: {portable_settings_path}')
Settings.set_filename(portable_settings_path)
return portable_path, Settings()
def main():
"""
The main function which parses command line options and then runs
@ -463,12 +485,12 @@ def main():
# support dark mode on windows 10. This makes the titlebar dark, the rest is setup later
# by calling set_windows_darkmode
qt_args.extend(['-platform', 'windows:darkmode=1'])
elif is_macosx() and getattr(sys, 'frozen', False) and not os.environ.get('QTWEBENGINEPROCESS_PATH'):
# Work around an issue where PyInstaller is not setting this environment variable
os.environ['QTWEBENGINEPROCESS_PATH'] = str(AppLocation.get_directory(AppLocation.AppDir) / 'PyQt5' / 'Qt5' /
'lib' / 'QtWebEngineCore.framework' / 'Versions' / '5' /
'Helpers' / 'QtWebEngineProcess.app' / 'Contents' / 'MacOS' /
'QtWebEngineProcess')
elif is_macosx() and getattr(sys, 'frozen', False):
# Set the location to the QtWebEngineProcess binary, normally set by PyInstaller, but it moves around...
os.environ['QTWEBENGINEPROCESS_PATH'] = str((AppLocation.get_directory(AppLocation.AppDir) / '..' /
'Frameworks' / 'QtWebEngineCore.framework' / 'Versions' / '5' /
'Helpers' / 'QtWebEngineProcess.app' / 'Contents' / 'MacOS' /
'QtWebEngineProcess').resolve())
no_custom_factor_rounding = not ('QT_SCALE_FACTOR_ROUNDING_POLICY' in os.environ
and bool(os.environ['QT_SCALE_FACTOR_ROUNDING_POLICY'].strip()))
if no_custom_factor_rounding:
@ -479,20 +501,26 @@ def main():
# Initialise OpenLP
app = OpenLP()
Registry.create()
settings = Settings()
QtWidgets.QApplication.setOrganizationName('OpenLP')
QtWidgets.QApplication.setApplicationName('OpenLP')
QtWidgets.QApplication.setOrganizationDomain('openlp.org')
if args.portable:
# This has to be done here so that we can load the settings before instantiating the application object
QtWidgets.QApplication.setApplicationName('OpenLPPortable')
portable_path, settings = setup_portable_settings(args.portablepath)
else:
settings = Settings()
Registry().register('settings', settings)
app.settings = settings
# Doing HiDPI adjustments that need to be done before QCoreApplication instantiation.
hidpi_mode = settings.value('advanced/hidpi mode')
apply_dpi_adjustments_stage_qt(hidpi_mode, qt_args)
# Instantiating QCoreApplication
init_webview_custom_schemes()
application = QtWidgets.QApplication(qt_args)
application.setOrganizationName('OpenLP')
application.setOrganizationDomain('openlp.org')
application.setAttribute(QtCore.Qt.AA_DontCreateNativeWidgetSiblings, True)
# Doing HiDPI adjustments that need to be done after QCoreApplication instantiation.
apply_dpi_adjustments_stage_application(hidpi_mode, application)
# Now create and actually run the application.
application.setAttribute(QtCore.Qt.AA_DontCreateNativeWidgetSiblings, True)
if no_custom_factor_rounding and hasattr(QtWidgets.QApplication, 'setHighDpiScaleFactorRoundingPolicy'):
# TODO: Check won't be needed on PyQt6
application.setHighDpiScaleFactorRoundingPolicy(QtCore.Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)
@ -503,36 +531,19 @@ def main():
font.setPointSizeF(font.pointSizeF() * application.devicePixelRatio())
application.setFont(font)
if args.portable:
application.setApplicationName('OpenLPPortable')
Settings.setDefaultFormat(Settings.IniFormat)
# Get location OpenLPPortable.ini
if args.portablepath:
if os.path.isabs(args.portablepath):
portable_path = Path(args.portablepath)
else:
portable_path = AppLocation.get_directory(AppLocation.AppDir) / '..' / args.portablepath
else:
portable_path = AppLocation.get_directory(AppLocation.AppDir) / '..' / '..'
portable_path = resolve(portable_path)
data_path = portable_path / 'Data'
set_up_logging(portable_path / 'Other')
set_up_web_engine_cache(portable_path / 'Other' / 'web_cache')
log.info('Running portable')
portable_settings_path = data_path / 'OpenLP.ini'
# Make this our settings file
log.info(f'INI file: {portable_settings_path}')
Settings.set_filename(portable_settings_path)
portable_settings = Settings()
# Set our data path
log.info(f'Data path: {data_path}')
# Point to our data path
portable_settings.setValue('advanced/data path', data_path)
portable_settings.setValue('advanced/is portable', True)
portable_settings.sync()
settings.setValue('advanced/data path', data_path)
settings.setValue('advanced/is portable', True)
settings.sync()
else:
application.setApplicationName('OpenLP')
set_up_logging(AppLocation.get_directory(AppLocation.CacheDir))
set_up_web_engine_cache(AppLocation.get_directory(AppLocation.CacheDir) / 'web_cache')
settings.init_default_shortcuts()
# Set the libvlc environment variable if we're frozen
if getattr(sys, 'frozen', False):
# Path to libvlc and the plugins
@ -547,8 +558,6 @@ def main():
os.environ['PYTHON_VLC_MODULE_PATH'] = str(vlc_dir)
os.environ['PATH'] += ';' + str(vlc_dir)
log.debug('VLC Path: {}'.format(os.environ.get('PYTHON_VLC_LIB_PATH', '')))
settings.init_default_shortcuts()
Registry().register('settings', settings)
if settings.value('advanced/protect data directory'):
# attempt to create a file lock
app.data_dir_lock = FileLock(AppLocation.get_data_path(), get_version()['full'])
@ -569,8 +578,6 @@ def main():
else:
set_webview_display_path(args.display_custom_path)
Registry().set_flag('no_web_server', args.no_web_server)
# Upgrade settings.
app.settings = settings
application.setApplicationVersion(get_version()['version'])
# Check if an instance of OpenLP is already running. Quit if there is a running instance and the user only wants one
server = Server()

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -28,7 +28,9 @@ import logging
import re
import sys
import traceback
from ipaddress import IPv4Address, IPv6Address, AddressValueError
from pathlib import Path
from shutil import which
from PyQt5 import QtGui
@ -100,16 +102,20 @@ def trace_error_handler(logger):
logger.error(log_string)
def path_to_module(path):
def path_to_module(path: Path, community: bool = None) -> str:
"""
Convert a path to a module name (i.e openlp.core.common)
:param pathlib.Path path: The path to convert to a module name.
:param bool False community: Are we in Community Mode?
:return: The module name.
:rtype: str
"""
module_path = path.with_suffix('')
return 'openlp.' + '.'.join(module_path.parts)
if community:
return 'contrib.' + '.'.join(module_path.parts)
else:
return 'openlp.' + '.'.join(module_path.parts)
def import_openlp_module(module_name):
@ -119,7 +125,7 @@ def import_openlp_module(module_name):
importlib.import_module(module_name)
def extension_loader(glob_pattern, excluded_files=None):
def extension_loader(glob_pattern: str, excluded_files: list = None, community: bool = False) -> None:
"""
A utility function to find and load OpenLP extensions, such as plugins, presentation and media controllers and
importers.
@ -127,16 +133,22 @@ def extension_loader(glob_pattern, excluded_files=None):
:param str glob_pattern: A glob pattern used to find the extension(s) to be imported. Should be relative to the
application directory. i.e. plugins/*/*plugin.py
:param list[str] | None excluded_files: A list of file names to exclude that the glob pattern may find.
:param bool | False community: are we using the community directory path
:rtype: None
"""
from openlp.core.common.applocation import AppLocation
app_dir = AppLocation.get_directory(AppLocation.AppDir)
if community:
app_dir = AppLocation.get_directory(AppLocation.DataDir)
sys.path.insert(0, str(app_dir))
app_dir = app_dir / 'contrib'
else:
app_dir = AppLocation.get_directory(AppLocation.AppDir)
for extension_path in app_dir.glob(glob_pattern):
extension_path = extension_path.relative_to(app_dir)
if extension_path.name in (excluded_files or []):
continue
log.debug('Attempting to import %s', extension_path)
module_name = path_to_module(extension_path)
module_name = path_to_module(extension_path, community)
try:
import_openlp_module(module_name)
except (ImportError, OSError):
@ -263,6 +275,8 @@ def sha256_file_hash(filename):
"""
Returns the hashed output of sha256 on the file content using Python3 hashlib
This method allows PermissionError to bubble up, while supressing other exceptions
:param filename: Name of the file to hash
:returns: str
"""
@ -276,6 +290,8 @@ def sha256_file_hash(filename):
hash_obj.update(chunk)
return hash_obj.hexdigest()
except PermissionError:
raise
except Exception:
return None

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -26,7 +26,7 @@ import os
import sys
from pathlib import Path
from appdirs import AppDirs
from platformdirs import PlatformDirs
import openlp
from openlp.core.common import get_frozen_path
@ -142,7 +142,7 @@ def _get_os_dir_path(dir_type):
return Path(openlp.__file__).parent
return openlp_folder_path
dirs = AppDirs('openlp', multipath=True)
dirs = PlatformDirs('openlp', multipath=True)
if is_macosx():
openlp_folder_path = Path(dirs.user_data_dir)
if dir_type == AppLocation.DataDir:

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -356,10 +356,12 @@ class UiStrings(metaclass=Singleton):
self.BibleNoBibles = translate('OpenLP.Ui', '<strong>There are no Bibles currently installed.</strong><br><br>'
'Please use the Import Wizard to install one or more Bibles.')
self.Bottom = translate('OpenLP.Ui', 'Bottom')
self.Bridge = translate('SongsPlugin.VerseType', 'Bridge')
self.Browse = translate('OpenLP.Ui', 'Browse...')
self.Cancel = translate('OpenLP.Ui', 'Cancel')
self.CCLINumberLabel = translate('OpenLP.Ui', 'CCLI number:')
self.CCLISongNumberLabel = translate('OpenLP.Ui', 'CCLI song number:')
self.Chorus = translate('SongsPlugin.VerseType', 'Chorus')
self.CreateService = translate('OpenLP.Ui', 'Create a new service.')
self.ConfirmDelete = translate('OpenLP.Ui', 'Confirm Delete')
self.Continuous = translate('OpenLP.Ui', 'Continuous')
@ -371,14 +373,20 @@ class UiStrings(metaclass=Singleton):
'.html#strftime-strptime-behavior for more information.')
self.Delete = translate('OpenLP.Ui', '&Delete')
self.DisplayStyle = translate('OpenLP.Ui', 'Display style:')
self.Down = translate('SongsPlugin.EditVerseForm', 'Down')
self.Duplicate = translate('OpenLP.Ui', 'Duplicate Error')
self.Edit = translate('OpenLP.Ui', '&Edit')
self.EditVerse = translate('SongsPlugin.EditVerseForm', 'Edit Verse')
self.EmptyField = translate('OpenLP.Ui', 'Empty Field')
self.Ending = translate('SongsPlugin.VerseType', 'Ending')
self.Error = translate('OpenLP.Ui', 'Error')
self.Export = translate('OpenLP.Ui', 'Export')
self.File = translate('OpenLP.Ui', 'File')
self.FileCorrupt = translate('OpenLP.Ui', 'File appears to be corrupt.')
self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font point size unit')
self.ForcedSplit = translate('SongsPlugin.EditVerseForm', '&Forced Split')
self.ForcedSplitToolTip = translate('SongsPlugin.EditVerseForm', 'Split the verse when displayed '
'regardless of the screen size.')
self.Help = translate('OpenLP.Ui', 'Help')
self.Hours = translate('OpenLP.Ui', 'h', 'The abbreviated unit for hours')
self.IFdSs = translate('OpenLP.Ui', 'Invalid Folder Selected', 'Singular')
@ -386,6 +394,10 @@ class UiStrings(metaclass=Singleton):
self.IFSp = translate('OpenLP.Ui', 'Invalid Files Selected', 'Plural')
self.Image = translate('OpenLP.Ui', 'Image')
self.Import = translate('OpenLP.Ui', 'Import')
self.Insert = translate('SongsPlugin.EditVerseForm', '&Insert')
self.InsertToolTip = translate('SongsPlugin.EditVerseForm',
'Split a slide into two by inserting a verse splitter.')
self.Intro = translate('SongsPlugin.VerseType', 'Intro')
self.LayoutStyle = translate('OpenLP.Ui', 'Layout style:')
self.Live = translate('OpenLP.Ui', 'Live')
self.LiveStream = translate('OpenLP.Ui', 'Live Stream')
@ -414,8 +426,11 @@ class UiStrings(metaclass=Singleton):
self.OpenService = translate('OpenLP.Ui', 'Open service.')
self.OptionalShowInFooter = translate('OpenLP.Ui', 'Optional, this will be displayed in footer.')
self.OptionalHideInFooter = translate('OpenLP.Ui', 'Optional, this won\'t be displayed in footer.')
self.Other = translate('SongsPlugin.VerseType', 'Other')
self.PermissionError = translate('OpenLP.Ui', 'Permission Error')
self.PlaySlidesInLoop = translate('OpenLP.Ui', 'Play Slides in Loop')
self.PlaySlidesToEnd = translate('OpenLP.Ui', 'Play Slides to End')
self.PreChorus = translate('SongsPlugin.VerseType', 'Pre-Chorus')
self.Preview = translate('OpenLP.Ui', 'Preview')
self.PreviewToolbar = translate('OpenLP.Ui', 'Preview Toolbar')
self.PrintService = translate('OpenLP.Ui', 'Print Service')
@ -431,6 +446,11 @@ class UiStrings(metaclass=Singleton):
self.Seconds = translate('OpenLP.Ui', 's', 'The abbreviated unit for seconds')
self.SaveAndClose = translate('OpenLP.ui', translate('SongsPlugin.EditSongForm', '&Save && Close'))
self.SaveAndPreview = translate('OpenLP.Ui', 'Save && Preview')
self.ScreenSetupHasChangedTitle = translate('OpenLP.MainWindow', 'Screen setup has changed')
self.ScreenSetupHasChanged = translate('OpenLP.MainWindow',
'The screen setup has changed. OpenLP will try to '
'automatically select a display screen, but '
'you should consider updating the screen settings.')
self.Search = translate('OpenLP.Ui', 'Search')
self.SearchThemes = translate('OpenLP.Ui', 'Search Themes...', 'Search bar place holder text ')
self.SelectDelete = translate('OpenLP.Ui', 'You must select an item to delete.')
@ -449,9 +469,16 @@ class UiStrings(metaclass=Singleton):
self.Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
self.Tools = translate('OpenLP.Ui', 'Tools')
self.Top = translate('OpenLP.Ui', 'Top')
self.Transpose = translate('SongsPlugin.EditVerseForm', 'Transpose:')
self.UnableToRead = translate('OpenLP.Ui', 'Unable to read the file(s) listed below, please check that '
'your user has permission to read the file(s) or that the '
'file(s) are not using cloud storage (e.g. Dropbox, OneDrive).')
self.UnsupportedFile = translate('OpenLP.Ui', 'Unsupported File')
self.Up = translate('SongsPlugin.EditVerseForm', 'Up')
self.Verse = translate('SongsPlugin.VerseType', 'Verse')
self.VersePerSlide = translate('OpenLP.Ui', 'Verse Per Slide')
self.VersePerLine = translate('OpenLP.Ui', 'Verse Per Line')
self.VerseType = translate('SongsPlugin.EditVerseForm', '&Verse type:')
self.Version = translate('OpenLP.Ui', 'Version')
self.View = translate('OpenLP.Ui', 'View')
self.ViewMode = translate('OpenLP.Ui', 'View Mode')

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -38,6 +38,9 @@ class Registry(metaclass=Singleton):
"""
log.info('Registry loaded')
# Try to get around the AttributeError in tests
functions_list = {}
@classmethod
def create(cls) -> 'Registry':
"""

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -363,6 +363,7 @@ class Settings(QtCore.QSettings):
'songs/chord notation': 'english', # Can be english, german or neo-latin
'songs/disable chords import': False,
'songs/auto play audio': False,
'songs/uppercase songs': False,
'songusage/status': PluginStatus.Inactive,
'songusage/db type': 'sqlite',
'songusage/db username': '',

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -35,6 +35,9 @@ from openlp.core.common.i18n import UiStrings, translate
log = logging.getLogger(__name__ + '.__init__')
DEFAULT_THUMBNAIL_HEIGHT = 88
class DataType(IntEnum):
U8 = 1
U16 = 2
@ -301,8 +304,8 @@ def create_thumb(image_path, thumb_path, return_icon=True, size=None):
:param Path image_path: The image file to create the icon from.
:param Path thumb_path: The filename to save the thumbnail to.
:param return_icon: States if an icon should be build and returned from the thumb. Defaults to ``True``.
:param size: Allows to state a own size (QtCore.QSize) to use. Defaults to ``None``, which means that a default
height of 88 is used.
:param size: Allows to state a own size (QtCore.QSize) to use. Defaults to ``None``, which means it uses the value
from DEFAULT_THUMBNAIL_HEIGHT.
:return: The final icon.
"""
reader = QtGui.QImageReader(str(image_path))
@ -312,7 +315,7 @@ def create_thumb(image_path, thumb_path, return_icon=True, size=None):
ratio = 1
else:
ratio = reader.size().width() / reader.size().height()
reader.setScaledSize(QtCore.QSize(int(ratio * 88), 88))
reader.setScaledSize(QtCore.QSize(int(ratio * DEFAULT_THUMBNAIL_HEIGHT), DEFAULT_THUMBNAIL_HEIGHT))
elif size.isValid():
# Complete size given
reader.setScaledSize(size)
@ -330,7 +333,7 @@ def create_thumb(image_path, thumb_path, return_icon=True, size=None):
reader.setScaledSize(QtCore.QSize(int(ratio * size.height()), size.height()))
else:
# Invalid; use default height of 88
reader.setScaledSize(QtCore.QSize(int(ratio * 88), 88))
reader.setScaledSize(QtCore.QSize(int(ratio * DEFAULT_THUMBNAIL_HEIGHT), DEFAULT_THUMBNAIL_HEIGHT))
thumb = reader.read()
thumb.save(str(thumb_path), thumb_path.suffix[1:].lower())
if not return_icon:

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -56,6 +56,7 @@ class PluginManager(RegistryBase, LogMixin, RegistryProperties):
"""
glob_pattern = os.path.join('plugins', '*', '[!.]*plugin.py')
extension_loader(glob_pattern)
extension_loader(glob_pattern, community=True)
plugin_classes = Plugin.__subclasses__()
for p in plugin_classes:
try:

View File

@ -2,7 +2,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -865,6 +865,8 @@ class ServiceItem(RegistryProperties):
"""
self.theme_overwritten = (theme is None)
self.theme = theme
if self.is_text():
self._clear_slides_cache()
self._new_item()
def remove_invalid_frames(self, invalid_paths=None):

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -32,7 +32,7 @@ from openlp.core.ui.slidecontroller import LiveController, PreviewController
def loader():
"""
God class to load all the components which are registered with the Registry
God method to load all the components which are registered with the Registry
:return: None
"""

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -23,8 +23,8 @@
Provides the functions for the display/control of Projectors.
"""
import logging
from typing import Optional
from PyQt5 import QtCore, QtGui, QtWidgets
@ -33,7 +33,7 @@ from openlp.core.common.mixins import LogMixin, RegistryProperties
from openlp.core.common.registry import Registry, RegistryBase
from openlp.core.lib.ui import create_widget_action
from openlp.core.projectors import DialogSourceStyle
from openlp.core.projectors.constants import E_AUTHENTICATION, E_ERROR, E_NETWORK, E_NOT_CONNECTED, E_SOCKET_TIMEOUT,\
from openlp.core.projectors.constants import E_AUTHENTICATION, E_ERROR, E_NETWORK, E_NOT_CONNECTED, E_SOCKET_TIMEOUT, \
E_UNKNOWN_SOCKET_ERROR, PJLINK_PORT, QSOCKET_STATE, S_CONNECTED, S_CONNECTING, S_COOLDOWN, S_INITIALIZE, \
S_NOT_CONNECTED, S_OFF, S_ON, S_STANDBY, S_WARMUP, STATUS_CODE, STATUS_MSG
@ -305,6 +305,12 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
E_UNKNOWN_SOCKET_ERROR: UiIcons().error,
E_NOT_CONNECTED: UiIcons().projector_disconnect
}
# update_status debouncer
self.update_status_timer = QtCore.QTimer(self)
self.update_status_timer.setInterval(100)
self.update_status_timer.timeout.connect(self._try_update_status)
self.is_updating_status = False
self.ip_status_to_update = (None, None, None)
def bootstrap_initialise(self):
"""
@ -810,7 +816,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
return self.projector_list
@QtCore.pyqtSlot(str, int, str)
def update_status(self, ip, status=None, msg=None):
def update_status(self, ip: str, status: Optional[int] = None, msg: Optional[str] = None):
"""
Update the status information/icon for selected list item
@ -820,23 +826,51 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
"""
if status is None:
return
item = None
for list_item in self.projector_list:
if ip == list_item.link.ip:
item = list_item
break
if item is None:
log.error(f'ProjectorManager: Unknown item "{ip}" - not updating status')
return
elif item.status == status:
log.debug(f'ProjectorManager: No status change for "{ip}" - not updating status')
return
self._try_update_status(ip, status, msg)
item.status = status
item.icon = self.status_icons[status]
log.debug(f'({item.link.name}) Updating icon with {STATUS_CODE[status]}')
item.widget.setIcon(item.icon)
return self.update_icons()
def _try_update_status(self, ip: str, status: int, msg: Optional[str] = None):
"""
Try to update the status of a projector
"""
if not self.is_updating_status:
self.update_status_timer.stop()
self._update_status(ip, status, msg)
else:
self.update_status_timer.stop()
self.update_status_timer.start()
def _update_status(self, ip: str, status: int, msg: Optional[str] = None):
"""
Actually update the status of the projector
"""
self.is_updating_status = True
try:
item = None
for list_item in self.projector_list:
if ip == list_item.link.ip:
item = list_item
break
if item is None:
log.error(f'ProjectorManager: Unknown item "{ip}" - not updating status')
self.is_updating_status = False
return
elif item.status == status:
log.debug(f'ProjectorManager: No status change for "{ip}" - not updating status')
self.is_updating_status = False
return
item.status = status
item.icon = self.status_icons[status]
log.debug(f'({item.link.name}) Updating icon with {STATUS_CODE[status]}')
item.widget.setIcon(item.icon)
self.is_updating_status = False
return self.update_icons()
except RuntimeError:
# it's probably a "wrapped C/C++ object of type QTreeWidgetItem has been deleted" due to
# consecutive/parallel repaint_service_list execution. We've added some mitigation to avoid this
# to happen, but it for any reason it happens again, we'll silent it and try to repaint the list
# again (to avoid a broken list presented to the user).
self.is_updating_status = False
def get_toolbar_item(self, name, enabled=False, hidden=False):
item = self.one_toolbar.findChild(QtWidgets.QAction, name)

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -125,7 +125,7 @@ class UiAboutDialog(object):
'<li><a href="https://www.python.org/">Python</a> (PSFL)</li>'
'<li><a href="https://www.qt.io">Qt5</a> (GPL3/LGPL3)</li>'
'<li><a href="https://www.riverbankcomputing.co.uk/software/pyqt/intro">PyQt5</a> (GPL3)</li>'
'<li><a href="https://github.com/ActiveState/appdirs">appdirs</a> (MIT)</li>'
'<li><a href="https://github.com/platformdirs/platformdirs">platformdirs</a> (MIT)</li>'
'<li><a href="https://alembic.sqlalchemy.org/en/latest/">Alembic</a> (MIT)</li>'
'<li><a href="https://www.crummy.com/software/BeautifulSoup/">BeautifulSoup 4</a> (MIT)</li>'
'<li><a href="https://github.com/chardet/chardet">chardet</a> (LGPL)</li>'

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -138,7 +138,7 @@ class ExceptionForm(QtWidgets.QDialog, Ui_ExceptionDialog, RegistryProperties):
libs=content['libs']))
if self.file_attachment:
mail_urlquery.addQueryItem('attach', self.file_attachment)
mail_to_url = QtCore.QUrl('mailto:bugs3@openlp.org')
mail_to_url = QtCore.QUrl('mailto:bugs31@openlp.org')
mail_to_url.setQuery(mail_urlquery)
QtGui.QDesktopServices.openUrl(mail_to_url)

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -62,7 +62,7 @@ class ThemeListWidgetItem(QtWidgets.QListWidgetItem):
thumbnail = sample_theme_data['thumbnail']
self.file_name = sample_theme_data['file_name']
self.sha256 = sample_theme_data['sha256']
self.setIcon(UiIcons().picture) # Set a place holder icon whilst the thumbnails download
self.setIcon(UiIcons().get_icon_variant('picture')) # Set a place holder icon whilst the thumbnails download
self.setText(title)
self.setToolTip(title)
worker = DownloadWorker(themes_url, thumbnail)
@ -78,7 +78,7 @@ class ThemeListWidgetItem(QtWidgets.QListWidgetItem):
:rtype: None
"""
self.setIcon(UiIcons().exception)
self.setIcon(UiIcons().get_icon_variant('exception'))
def _on_thumbnail_downloaded(self, thumbnail_path):
"""

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #

Some files were not shown because too many files have changed in this diff Show More