mirror of https://gitlab.com/openlp/openlp.git
Compare commits
136 Commits
Author | SHA1 | Date |
---|---|---|
Raoul Snyman | bfbd85deb4 | |
Raoul Snyman | 795aa22caa | |
Raoul Snyman | 17240e2dd4 | |
Raoul Snyman | 912695dca9 | |
Raoul Snyman | ca5304d91e | |
Tim Stephenson | 2053029d7f | |
Raoul Snyman | dd466fb013 | |
Matey Krastev | 45f68364a3 | |
Raoul Snyman | 6bbfe00ec0 | |
Tim Bentley | cee0a9d573 | |
Raoul Snyman | 2ad33529e4 | |
Raoul Snyman | 7bb7dc35c0 | |
Tim Bentley | 9b9d8feafa | |
Raoul Snyman | 32d132c2f0 | |
Raoul Snyman | f5e0682e0d | |
Raoul Snyman | 7d44795cf7 | |
Raoul Snyman | 64f1a0e52d | |
Raoul Snyman | d2a2b94273 | |
Chris Witterholt | e93ac46f2a | |
Raoul Snyman | 2639c7cd00 | |
Tomas Groth | 6d636f3235 | |
Tomas Groth | b8855eb8ed | |
Tim Bentley | d1724bc6c3 | |
Tim Bentley | 62d6b61518 | |
Chris Witterholt | 9b794e4ff8 | |
Tim Bentley | 6cfa2419e3 | |
Chris Witterholt | 027391d321 | |
Raoul Snyman | 885e57ba41 | |
Tomas Groth | 6498b66698 | |
Tomas Groth | fa05ee4b2d | |
Raoul Snyman | 39833c770d | |
Chris Witterholt | fd45bba951 | |
Raoul Snyman | f2484d170a | |
Chris Witterholt | 34cc2a3e28 | |
Tim Bentley | b569a1793d | |
Trildar | f3c675901c | |
Raoul Snyman | 34ff2dab8b | |
Raoul Snyman | 78c32e434c | |
Tomas Groth | 1a281e3931 | |
Chris Witterholt | 490b25b73b | |
Raoul Snyman | cb1db9f432 | |
Chris Witterholt | 6ea889b974 | |
Raoul Snyman | a53e20864c | |
Raoul Snyman | e5f6850d14 | |
Tomas Groth | 87deeb58cc | |
Raoul Snyman | 2f54765670 | |
Raoul Snyman | 3c20d5f8d6 | |
Raoul Snyman | a40d5e894e | |
Raoul Snyman | 5508bb683c | |
Tomas Groth | cb490b9e59 | |
Tim Bentley | 0d3acc2e67 | |
Tim Bentley | 9747f16de9 | |
Raoul Snyman | e5e8bc4164 | |
Tomas Groth | 8c61bb68fd | |
Raoul Snyman | 50c431a1f1 | |
Tim Bentley | c5da029024 | |
Tim Bentley | 0065049437 | |
Tim Bentley | f0e23b4166 | |
Tim Bentley | 77627f55f0 | |
Tomas Groth | 2962b8dc14 | |
Tim Bentley | f2410aede7 | |
Tomas Groth | 8c4f99689b | |
Raoul Snyman | 52afc20ac4 | |
Michael Weghorn | d32ee3dfa3 | |
Tim Bentley | b3cab7113b | |
Joel Beckmeyer | eef6ae8863 | |
Raoul Snyman | ed7561bded | |
Raoul Snyman | 4591c6bf06 | |
Raoul Snyman | d73d387923 | |
Bastian Germann | c74bc27b48 | |
Raoul Snyman | 8c3d9b5742 | |
Raoul Snyman | d08f488040 | |
Raoul Snyman | dc36d598e5 | |
Raoul Snyman | de068a5625 | |
Raoul Snyman | 3778448e76 | |
Tim Bentley | a4a05630e9 | |
Tomas Groth | 41ed3b45c1 | |
Raoul Snyman | 4cdcc3d320 | |
Tomas Groth | 143492f2e2 | |
JessyJP | 4269c33cd1 | |
Raoul Snyman | b5fe3bde41 | |
Tomas Groth | d725627c16 | |
Raoul Snyman | 6fa5075b7b | |
JessyJP | c17692976a | |
Raoul Snyman | d13c1d199d | |
Tim Bentley | 6942211950 | |
Tim Bentley | 504b6bfd0a | |
Raoul Snyman | cc0ee4bd5c | |
Raoul Snyman | eb389670f9 | |
Chris Witterholt | 8cbfd8121e | |
Raoul Snyman | 24e8dfb6e9 | |
Raoul Snyman | 091caafcbf | |
Raoul Snyman | 80752badf4 | |
Raoul Snyman | c1eab51bc9 | |
Raoul Snyman | 651a2a5dfe | |
Raoul Snyman | 5a8b57923f | |
Tomas Groth | fb4409792d | |
Raoul Snyman | 243e1d0c8f | |
Raoul Snyman | 50cb2344c8 | |
Raoul Snyman | 001bf51d42 | |
Dominik Pieczyński | e520dd5951 | |
Raoul Snyman | 299b596651 | |
Gbenga Adeyi | cab39743e4 | |
Raoul Snyman | 79b3638392 | |
Raoul Snyman | 9844915164 | |
Tim Bentley | 3fb198749c | |
Raoul Snyman | b360fa021a | |
Raoul Snyman | 1036c4e8ad | |
Raoul Snyman | de5ba6eaac | |
Raoul Snyman | cf558fbe9b | |
Raoul Snyman | 8ddab1dc16 | |
Raoul Snyman | 79012cc005 | |
Tomas Groth | bff87b0e83 | |
Tomas Groth | 0cd960494b | |
Raoul Snyman | 07633cd249 | |
Raoul Snyman | e1bd70284f | |
Raoul Snyman | a58a403d06 | |
Raoul Snyman | 60397daa63 | |
Raoul Snyman | 98d682c541 | |
Simeon Brooks | efec2bc70d | |
Tomas Groth | d0aebd6429 | |
Tomas Groth | 45ccf8cf36 | |
Raoul Snyman | 4a7273fd14 | |
Tim Bentley | 6b31c01ab9 | |
Raoul Snyman | c277ac2b6f | |
Tomas Groth | 78708213a0 | |
Tomas Groth | 5b2282ca23 | |
Raoul Snyman | 28905b4d60 | |
Raoul Snyman | 6d1c598f39 | |
Gyuris Gellért | e09d7719a9 | |
Raoul Snyman | 621a8f2516 | |
Tomas Groth | 58e3312ace | |
Tomas Groth | 987abbd033 | |
Chris Witterholt | c99202342a | |
Raoul Snyman | c0215785e4 | |
Chris Witterholt | b4a67d7346 |
|
@ -33,6 +33,7 @@ __pycache__
|
|||
build
|
||||
cover
|
||||
coverage
|
||||
coverage.xml
|
||||
dist
|
||||
env
|
||||
htmlcov
|
||||
|
|
|
@ -24,11 +24,16 @@ test-debian:
|
|||
image: $IMAGE_BASE/debian
|
||||
script:
|
||||
- sh scripts/generate_resources.sh
|
||||
- xvfb-run -s '-screen 0 1024x768x24' pytest-3 --color=no --disable-warnings --cov openlp --cov-report term
|
||||
- xvfb-run -s '-screen 0 1024x768x24' pytest-3 --color=no --disable-warnings --cov openlp --cov-report term --cov-report xml:coverage.xml
|
||||
- mv .coverage linux.coverage
|
||||
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
|
||||
artifacts:
|
||||
paths:
|
||||
- linux.coverage
|
||||
reports:
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: coverage.xml
|
||||
|
||||
test-ubuntu:
|
||||
stage: test
|
||||
|
@ -102,11 +107,16 @@ pages:
|
|||
- python3-coverage combine linux.coverage macos.coverage
|
||||
- python3-coverage html
|
||||
- mv htmlcov public
|
||||
- python3-coverage report
|
||||
- python3-coverage xml
|
||||
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
expire_in: 30 days
|
||||
reports:
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: coverage.xml
|
||||
dependencies:
|
||||
- test-debian
|
||||
- test-macos-intel
|
||||
|
|
175
CHANGELOG.rst
175
CHANGELOG.rst
|
@ -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
|
||||
============
|
||||
|
||||
|
|
|
@ -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 ..
|
||||
}
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -1 +1 @@
|
|||
3.1.0rc2
|
||||
3.1.2
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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,6 +39,7 @@ from PyQt5 import QtCore, QtGui, QtWebEngineWidgets, QtWidgets # noqa
|
|||
|
||||
from openlp.core.api.deploy import check_for_remote_update
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.enum import HiDPIMode
|
||||
from openlp.core.common.i18n import LanguageManager, UiStrings, translate
|
||||
from openlp.core.common.mixins import LogMixin
|
||||
from openlp.core.common.path import create_paths, resolve
|
||||
|
@ -73,6 +74,7 @@ class OpenLP(QtCore.QObject, LogMixin):
|
|||
"""
|
||||
args = []
|
||||
worker_threads = {}
|
||||
settings = None
|
||||
|
||||
def exec(self):
|
||||
"""
|
||||
|
@ -99,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
|
||||
|
@ -289,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',
|
||||
|
@ -395,6 +399,70 @@ def backup_if_version_changed(settings):
|
|||
return True
|
||||
|
||||
|
||||
def apply_dpi_adjustments_stage_qt(hidpi_mode, qt_args):
|
||||
if hidpi_mode == HiDPIMode.Windows_Unaware:
|
||||
os.environ['QT_SCALE_FACTOR'] = '1'
|
||||
os.environ['QT_AUTO_SCREEN_SCALE_FACTOR'] = '0'
|
||||
os.environ['QT_ENABLE_HIGHDPI_SCALING'] = '0'
|
||||
if is_win():
|
||||
try:
|
||||
platform_index = qt_args.index('-platform')
|
||||
qt_args[platform_index + 1] += ' windows:dpiawareness=0'
|
||||
except ValueError:
|
||||
qt_args.extend(['-platform', 'windows:dpiawareness=0'])
|
||||
else:
|
||||
QtWidgets.QApplication.setAttribute(QtCore.Qt.ApplicationAttribute.AA_EnableHighDpiScaling)
|
||||
if hidpi_mode == HiDPIMode.Default:
|
||||
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:
|
||||
# TODO Won't be needed on PyQt6, PassThrough is the default
|
||||
os.environ['QT_SCALE_FACTOR_ROUNDING_POLICY'] = 'PassThrough'
|
||||
|
||||
|
||||
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)
|
||||
|
||||
:param args: OpenLP startup arguments
|
||||
:param settings: The settings object
|
||||
:param stage: The stage of app
|
||||
"""
|
||||
if hidpi_mode == HiDPIMode.Default:
|
||||
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 and hasattr(QtWidgets.QApplication, 'setHighDpiScaleFactorRoundingPolicy'):
|
||||
# TODO Won't be needed on PyQt6, PassThrough is the default
|
||||
application.setHighDpiScaleFactorRoundingPolicy(QtCore.Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)
|
||||
if is_win() and application.devicePixelRatio() > 1.0:
|
||||
# Increasing font size to match pixel ratio (Windows only)
|
||||
# TODO: Review on PyQt6 migration
|
||||
font = application.font()
|
||||
font.setPointSizeF(font.pointSizeF() * application.devicePixelRatio())
|
||||
application.setFont(font)
|
||||
if hidpi_mode != HiDPIMode.Windows_Unaware:
|
||||
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
|
||||
|
@ -417,53 +485,65 @@ 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:
|
||||
# TODO Won't be needed on PyQt6
|
||||
os.environ['QT_SCALE_FACTOR_ROUNDING_POLICY'] = 'PassThrough'
|
||||
# Initialise the resources
|
||||
qInitResources()
|
||||
# Now create and actually run the application.
|
||||
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)
|
||||
# Initialise OpenLP
|
||||
app = OpenLP()
|
||||
Registry.create()
|
||||
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_UseHighDpiPixmaps, True)
|
||||
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)
|
||||
if no_custom_factor_rounding and hasattr(QtWidgets.QApplication, 'setHighDpiScaleFactorRoundingPolicy'):
|
||||
# TODO: Check won't be needed on PyQt6
|
||||
application.setHighDpiScaleFactorRoundingPolicy(QtCore.Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)
|
||||
if is_win() and application.devicePixelRatio() > 1.0:
|
||||
# Increasing font size to match pixel ratio (Windows only)
|
||||
font = application.font()
|
||||
# font.setPointSizeF(font.pointSizeF() * application.devicePixelRatio())
|
||||
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
|
||||
|
@ -478,11 +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', '')))
|
||||
app = OpenLP()
|
||||
# Initialise the Registry
|
||||
Registry.create()
|
||||
settings = Settings()
|
||||
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'])
|
||||
|
@ -503,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()
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 #
|
||||
|
@ -156,3 +156,12 @@ class SongFirstSlideMode(IntEnum):
|
|||
Default = 0 # No cover
|
||||
Songbook = 1
|
||||
Footer = 2
|
||||
|
||||
|
||||
@unique
|
||||
class HiDPIMode(IntEnum):
|
||||
Default = 0,
|
||||
# Legacy HiDPI mode is the default Qt behavior, without any OpenLP-specific HiDPI modifications
|
||||
Legacy = 1,
|
||||
# (Windows only) Make the OpenLP run unaware of any screen scaling.
|
||||
Windows_Unaware = 2
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
@ -42,27 +42,27 @@ log = logging.getLogger(__name__ + '.__init__')
|
|||
|
||||
USER_AGENTS = {
|
||||
'win32': [
|
||||
'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36',
|
||||
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36',
|
||||
'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36'
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
|
||||
'Chrome/117.0.5938.132 Safari/537.36',
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.132 '
|
||||
'Safari/537.36 Edg/117.0.2045.43',
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0'
|
||||
],
|
||||
'darwin': [
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) '
|
||||
'Chrome/26.0.1410.43 Safari/537.31',
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.11 (KHTML, like Gecko) '
|
||||
'Chrome/20.0.1132.57 Safari/536.11',
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.11 (KHTML, like Gecko) '
|
||||
'Chrome/20.0.1132.47 Safari/536.11',
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 14.0; rv:109.0) Gecko/20100101 Firefox/118.0',
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) AppleWebKit/537.36 (KHTML, like Gecko) '
|
||||
'Chrome/117.0.5938.132 Safari/537.36',
|
||||
'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) AppleWebKit/605.1.15 (KHTML, like Gecko) '
|
||||
'Version/16.5 Safari/605.1.15',
|
||||
],
|
||||
'linux2': [
|
||||
'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 '
|
||||
'Chrome/25.0.1364.160 Safari/537.22',
|
||||
'Mozilla/5.0 (X11; CrOS armv7l 2913.260.0) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.99 '
|
||||
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.132 Safari/537.36',
|
||||
'Mozilla/5.0 (X11; CrOS armv7l 2913.260.0) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/117.0.5938.132 '
|
||||
'Safari/537.11',
|
||||
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.27 (KHTML, like Gecko) Chrome/26.0.1389.0 Safari/537.27'
|
||||
'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0'
|
||||
],
|
||||
'default': [
|
||||
'Mozilla/5.0 (X11; NetBSD amd64; rv:18.0) Gecko/20130120 Firefox/18.0'
|
||||
'Mozilla/5.0 (X11; NetBSD amd64; rv:109.0) Gecko/20100101 Firefox/118.0'
|
||||
]
|
||||
}
|
||||
CONNECTION_TIMEOUT = 30
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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':
|
||||
"""
|
||||
|
|
|
@ -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 tempfile import gettempdir
|
|||
from PyQt5 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common import SlideLimits, ThemeLevel
|
||||
from openlp.core.common.enum import AlertLocation, BibleSearch, CustomSearch, ImageThemeMode, LayoutStyle, \
|
||||
from openlp.core.common.enum import AlertLocation, BibleSearch, CustomSearch, HiDPIMode, ImageThemeMode, LayoutStyle, \
|
||||
DisplayStyle, LanguageSelection, SongFirstSlideMode, SongSearch, PluginStatus
|
||||
from openlp.core.common.json import OpenLPJSONDecoder, OpenLPJSONEncoder, is_serializable
|
||||
from openlp.core.common.path import files_to_paths, str_to_path
|
||||
|
@ -200,6 +200,7 @@ class Settings(QtCore.QSettings):
|
|||
'advanced/search as type': True,
|
||||
'advanced/ui_theme_name': UiThemes.Automatic,
|
||||
'advanced/delete service item confirmation': False,
|
||||
'advanced/hidpi mode': HiDPIMode.Default,
|
||||
'alerts/font face': QtGui.QFont().family(),
|
||||
'alerts/font size': 40,
|
||||
'alerts/db type': 'sqlite',
|
||||
|
@ -362,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': '',
|
||||
|
@ -528,6 +530,8 @@ class Settings(QtCore.QSettings):
|
|||
QtCore.QSettings.__init__(self, Settings.__file_path__, Settings.IniFormat)
|
||||
else:
|
||||
QtCore.QSettings.__init__(self, *args)
|
||||
|
||||
def init_default_shortcuts(self):
|
||||
# Add shortcuts here so QKeySequence has a QApplication instance to use.
|
||||
Settings.__default_settings__.update({
|
||||
'shortcuts/aboutItem': [QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_F1)],
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
@ -207,11 +207,12 @@ def init_url(plugin_name: str, db_file_name: Union[Path, str, None] = None) -> s
|
|||
if db_type == 'sqlite':
|
||||
db_url = get_db_path(plugin_name, db_file_name)
|
||||
else:
|
||||
db_url = '{type}://{user}:{password}@{host}/{db}'.format(type=db_type,
|
||||
user=urlquote(settings.value('db username')),
|
||||
password=urlquote(settings.value('db password')),
|
||||
host=urlquote(settings.value('db hostname')),
|
||||
db=urlquote(settings.value('db database')))
|
||||
db_url = '{type}://{user}:{password}@{host}/{db}'.format(
|
||||
type=db_type,
|
||||
user=urlquote(settings.value(f'{plugin_name}/db username')),
|
||||
password=urlquote(settings.value(f'{plugin_name}/db password')),
|
||||
host=urlquote(settings.value(f'{plugin_name}/db hostname')),
|
||||
db=urlquote(settings.value(f'{plugin_name}/db database')))
|
||||
return db_url
|
||||
|
||||
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
@ -547,7 +547,7 @@ class DisplayWindow(QtWidgets.QWidget, RegistryProperties, LogMixin):
|
|||
"""
|
||||
Set an alert
|
||||
"""
|
||||
self.run_javascript('Display.alert("{text}", {settings});'.format(text=text, settings=settings))
|
||||
self._run_javascript('Display.alert("{text}", {settings});'.format(text=text, settings=settings))
|
||||
|
||||
@QtCore.pyqtSlot(result='QPixmap')
|
||||
def _grab_screenshot_safe_signal(self):
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
@ -114,7 +114,7 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties, LogMixin):
|
|||
def required_icons(self):
|
||||
"""
|
||||
This method is called to define the icons for the plugin. It provides a default set and the plugin is able to
|
||||
override the if required.
|
||||
override if required.
|
||||
"""
|
||||
self.has_import_icon = False
|
||||
self.has_new_icon = True
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 #
|
||||
|
@ -466,8 +466,9 @@ class ServiceItem(RegistryProperties):
|
|||
else:
|
||||
for slide in self.slides:
|
||||
# When saving a service that originated from openlp 2.4 thumbnail might not be available
|
||||
# Also, sometimes this is not a Path object, but a string.
|
||||
if 'thumbnail' in slide:
|
||||
image_path = slide['thumbnail'].relative_to(AppLocation().get_data_path())
|
||||
image_path = Path(slide['thumbnail']).relative_to(AppLocation().get_data_path())
|
||||
else:
|
||||
# Check if (by chance) the thumbnails for this image is available on this machine
|
||||
test_thumb = AppLocation.get_section_data_path(self.name) / 'thumbnails' / stored_filename
|
||||
|
@ -483,7 +484,8 @@ class ServiceItem(RegistryProperties):
|
|||
elif lite_save:
|
||||
image = slide['image']
|
||||
else:
|
||||
image = slide['image'].relative_to(AppLocation().get_data_path())
|
||||
# Sometimss this is not a Path object, so typecast it
|
||||
image = Path(slide['image']).relative_to(AppLocation().get_data_path())
|
||||
service_data.append({'title': slide['title'], 'image': image, 'path': slide['path'],
|
||||
'display_title': slide['display_title'], 'notes': slide['notes']})
|
||||
return {'header': service_header, 'data': service_data}
|
||||
|
@ -863,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):
|
||||
|
@ -897,7 +901,14 @@ class ServiceItem(RegistryProperties):
|
|||
self.is_valid = False
|
||||
break
|
||||
elif self.is_command():
|
||||
if self.is_capable(ItemCapabilities.IsOptical) and State().check_preconditions('media'):
|
||||
# Needs Media but no media processing available.
|
||||
if self.is_capable(ItemCapabilities.RequiresMedia) and not State().check_preconditions('media'):
|
||||
self.is_valid = False
|
||||
break
|
||||
elif self.is_capable(ItemCapabilities.HasBackgroundAudio) and not State().check_preconditions('media'):
|
||||
self.is_valid = False
|
||||
break
|
||||
elif self.is_capable(ItemCapabilities.IsOptical) and State().check_preconditions('media'):
|
||||
if not os.path.exists(slide['title']):
|
||||
self.is_valid = False
|
||||
break
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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
|
||||
"""
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
@ -146,7 +146,14 @@ class State(LogMixin, metaclass=Singleton):
|
|||
mdl[pl] = self.modules[pl]
|
||||
self.modules = mdl
|
||||
|
||||
def is_module_active(self, name) -> bool:
|
||||
def is_module_active(self, name: str) -> bool:
|
||||
"""
|
||||
Checks if a modules is active.
|
||||
|
||||
:param name: Module name
|
||||
:return: Have the preconditions been met.
|
||||
:rtype: bool
|
||||
"""
|
||||
return self.modules[name].status == PluginStatus.Active
|
||||
|
||||
def check_preconditions(self, name: str) -> bool:
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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>'
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
@ -110,6 +110,22 @@ class AdvancedTab(SettingsTab):
|
|||
self.prefer_windowed_capture_check_box.setObjectName('prefer_windowed_capture_check_box')
|
||||
self.display_workaround_layout.addWidget(self.prefer_windowed_capture_check_box)
|
||||
self.left_layout.addWidget(self.display_workaround_group_box)
|
||||
# Misc Workarounds
|
||||
self.misc_workaround_group_box = QtWidgets.QGroupBox(self.left_column)
|
||||
self.misc_workaround_group_box.setObjectName('misc_workaround_group_box')
|
||||
self.misc_workaround_layout = QtWidgets.QVBoxLayout(self.misc_workaround_group_box)
|
||||
self.misc_workaround_layout.setObjectName('misc_workaround_layout')
|
||||
self.hidpi_mode_widget = QtWidgets.QWidget(self.misc_workaround_group_box)
|
||||
self.hidpi_mode_layout = QtWidgets.QHBoxLayout(self.hidpi_mode_widget)
|
||||
self.hidpi_mode_layout.setContentsMargins(0, 0, 0, 0)
|
||||
self.hidpi_mode_label = QtWidgets.QLabel(self.hidpi_mode_widget)
|
||||
self.hidpi_mode_combobox = QtWidgets.QComboBox(self.hidpi_mode_widget)
|
||||
self.hidpi_mode_combobox.addItems(['', '', ''])
|
||||
self.hidpi_mode_layout.addWidget(self.hidpi_mode_label)
|
||||
self.hidpi_mode_layout.addWidget(self.hidpi_mode_combobox)
|
||||
self.hidpi_mode_widget.setLayout(self.hidpi_mode_layout)
|
||||
self.misc_workaround_layout.addWidget(self.hidpi_mode_widget)
|
||||
self.left_layout.addWidget(self.misc_workaround_group_box)
|
||||
# Proxies
|
||||
self.proxy_widget = ProxyWidget(self.right_column)
|
||||
self.right_layout.addWidget(self.proxy_widget)
|
||||
|
@ -117,10 +133,11 @@ class AdvancedTab(SettingsTab):
|
|||
self.left_layout.addStretch()
|
||||
self.right_layout.addStretch()
|
||||
# Set up all the connections and things
|
||||
self.alternate_rows_check_box.toggled.connect(self.on_alternate_rows_check_box_toggled)
|
||||
self.alternate_rows_check_box.toggled.connect(self.on_restart_needed)
|
||||
self.data_directory_path_edit.pathChanged.connect(self.on_data_directory_path_edit_path_changed)
|
||||
self.data_directory_cancel_button.clicked.connect(self.on_data_directory_cancel_button_clicked)
|
||||
self.data_directory_copy_check_box.toggled.connect(self.on_data_directory_copy_check_box_toggled)
|
||||
self.hidpi_mode_combobox.currentIndexChanged.connect(self.on_restart_needed)
|
||||
|
||||
def retranslate_ui(self):
|
||||
"""
|
||||
|
@ -153,6 +170,11 @@ class AdvancedTab(SettingsTab):
|
|||
translate('OpenLP.AdvancedTab', 'Disable display transparency'))
|
||||
self.prefer_windowed_capture_check_box.setText(
|
||||
translate('OpenLP.AdvancedTab', 'Prefer window capture instead of screen capture'))
|
||||
self.misc_workaround_group_box.setTitle(translate('OpenLP.AdvancedTab', 'Miscellaneous Workarounds'))
|
||||
self.hidpi_mode_label.setText(translate('OpenLP.AdvancedTab', 'HiDPI Mode:'))
|
||||
self.hidpi_mode_combobox.setItemText(0, translate('OpenLP.AdvancedTab', 'Default'))
|
||||
self.hidpi_mode_combobox.setItemText(1, translate('OpenLP.AdvancedTab', 'Legacy'))
|
||||
self.hidpi_mode_combobox.setItemText(2, translate('OpenLP.AdvancedTab', 'DPI Unaware (Windows only)'))
|
||||
self.proxy_widget.retranslate_ui()
|
||||
|
||||
def load(self):
|
||||
|
@ -178,6 +200,7 @@ class AdvancedTab(SettingsTab):
|
|||
self.data_directory_new_label.hide()
|
||||
self.data_directory_path_edit.hide()
|
||||
self.data_directory_protect_check_box.setChecked(self.settings.value('advanced/protect data directory'))
|
||||
self.hidpi_mode_combobox.setCurrentIndex(self.settings.value('advanced/hidpi mode'))
|
||||
|
||||
def save(self):
|
||||
"""
|
||||
|
@ -193,6 +216,7 @@ class AdvancedTab(SettingsTab):
|
|||
self.settings_form.register_post_process('config_screen_changed')
|
||||
self.settings.setValue('advanced/alternate rows', self.alternate_rows_check_box.isChecked())
|
||||
self.settings.setValue('advanced/protect data directory', self.data_directory_protect_check_box.isChecked())
|
||||
self.settings.setValue('advanced/hidpi mode', self.hidpi_mode_combobox.currentIndex())
|
||||
self.proxy_widget.save()
|
||||
|
||||
def cancel(self):
|
||||
|
@ -287,13 +311,14 @@ class AdvancedTab(SettingsTab):
|
|||
self.data_directory_cancel_button.hide()
|
||||
self.new_data_directory_has_files_label.hide()
|
||||
|
||||
def on_alternate_rows_check_box_toggled(self, checked):
|
||||
def on_restart_needed(self, _):
|
||||
"""
|
||||
Notify user about required restart.
|
||||
|
||||
:param checked: The state of the check box (boolean).
|
||||
"""
|
||||
QtWidgets.QMessageBox.information(self, translate('OpenLP.AdvancedTab', 'Restart Required'),
|
||||
translate('OpenLP.AdvancedTab',
|
||||
'This change will only take effect once OpenLP '
|
||||
'has been restarted.'))
|
||||
if self.isVisible():
|
||||
QtWidgets.QMessageBox.information(self, translate('OpenLP.AdvancedTab', 'Restart Required'),
|
||||
translate('OpenLP.AdvancedTab',
|
||||
'This change will only take effect once OpenLP '
|
||||
'has been restarted.'))
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue