Compare commits

...

144 Commits

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

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

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

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

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

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

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

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

Closes #1883

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

Closes #1878

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

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

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

Closes #1880

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

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

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

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

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

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

Closes #940

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

Closes #1871

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

Closes #1871

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

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

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

Closes #1860

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

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

Closes #1859

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

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

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

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

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

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

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

Closes #1837

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

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

Closes #1564

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

Closes #1792

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

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

Closes #1641

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

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

Closes #1323

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

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

Closes #1437

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

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

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

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

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

Closes #1756

See merge request openlp/openlp!698
2023-12-08 15:43:38 +00:00
Raoul Snyman 091caafcbf Fix portable builds by re-arranging when the settings are created 2023-12-07 20:47:39 -07:00
Raoul Snyman 80752badf4 Merge branch 'release-3.1rc3' into 'master'
OpenLP 3.1 release candidate 3

See merge request openlp/openlp!696
2023-12-07 21:49:01 +00:00
Raoul Snyman c1eab51bc9 Merge branch 'fix-coverage-badge' into 'master'
Fix the coverage badge on GitLab by producing an XML report

See merge request openlp/openlp!695
2023-12-07 21:47:29 +00:00
Raoul Snyman 651a2a5dfe OpenLP 3.1 release candidate 3 2023-12-07 14:20:49 -07:00
Raoul Snyman 5a8b57923f Fix the coverage badge on GitLab by producing an XML report 2023-12-07 10:54:02 -07:00
Tomas Groth fb4409792d Merge branch 'issue-1723' into 'master'
Fix irregular service theme saving (closes #1723)

Closes #1723

See merge request openlp/openlp!694
2023-12-07 07:56:08 +00:00
Raoul Snyman 243e1d0c8f Fix irregular service theme saving (closes #1723) 2023-12-06 21:52:52 -07:00
Raoul Snyman 50cb2344c8 Merge branch 'issue-1748' into 'master'
Fix issues with upgrading 2.9.x databases

Closes #1748

See merge request openlp/openlp!693
2023-12-06 16:37:26 +00:00
Raoul Snyman 001bf51d42 Merge branch 'fix_authortype_translation' into 'master'
Fix AuthorType not getting translated

Closes #1752

See merge request openlp/openlp!691
2023-12-06 16:37:08 +00:00
Dominik Pieczyński e520dd5951 Fix AuthorType not getting translated 2023-12-06 16:37:08 +00:00
Raoul Snyman 299b596651 Merge branch 'fix-csv-import' into 'master'
Fix bug in _has_header

Closes #1749

See merge request openlp/openlp!690
2023-12-05 17:45:22 +00:00
Gbenga Adeyi cab39743e4 Fix bug in _has_header 2023-12-05 17:45:22 +00:00
Raoul Snyman 79b3638392 Fix issues with upgrading 2.9.x databases 2023-12-05 10:27:38 -07:00
Raoul Snyman 9844915164 Merge branch 'translations-29112023' into 'master'
Translations 29112023

See merge request openlp/openlp!688
2023-11-30 16:49:58 +00:00
Tim Bentley 3fb198749c Translations 29112023 2023-11-30 16:49:57 +00:00
Raoul Snyman b360fa021a Merge branch 'fix-startup-sequence' into 'master'
Fix OpenLP startup by reordering statements

See merge request openlp/openlp!687
2023-11-29 17:16:43 +00:00
Raoul Snyman 1036c4e8ad Fix OpenLP startup by reordering statements 2023-11-29 10:00:07 -07:00
Raoul Snyman de5ba6eaac Merge branch 'openlp-hidpi-fixes' into 'master'
High DPI Fixes

See merge request openlp/openlp!684
2023-11-26 04:17:59 +00:00
Raoul Snyman cf558fbe9b High DPI Fixes 2023-11-26 04:17:58 +00:00
Raoul Snyman 8ddab1dc16 Merge branch 'issue-1700' into 'master'
Fix #1700 by typecasting the calls to Paths

Closes #1700

See merge request openlp/openlp!682
2023-11-23 03:05:37 +00:00
Raoul Snyman 79012cc005 Merge branch 'issue-1571' into 'master'
Check before initialising a None Bible

Closes #1571

See merge request openlp/openlp!683
2023-11-23 03:05:17 +00:00
Tomas Groth bff87b0e83 Merge branch 'pln-center-bible-import' into 'master'
Fix traceback on bible import when no bible available

See merge request openlp/openlp!685
2023-11-22 11:37:56 +00:00
Tomas Groth 0cd960494b Fix traceback on bible import when no bible available 2023-11-22 11:37:56 +00:00
Raoul Snyman 07633cd249 Check before initialising a None Bible 2023-11-21 10:42:15 -07:00
Raoul Snyman e1bd70284f Fix #1700 by typecasting the calls to Paths 2023-11-16 20:42:39 -07:00
Raoul Snyman a58a403d06 Merge branch 'pathedit-handles-none' into 'master'
Make PathEdit handle None values

Closes #1704

See merge request openlp/openlp!681
2023-11-16 20:53:36 +00:00
Raoul Snyman 60397daa63
Make PathEdit handle None values 2023-11-15 21:22:40 -07:00
Raoul Snyman 98d682c541 Merge branch 'fixExternalDb' into 'master'
Fix external DB settings

See merge request openlp/openlp!679
2023-11-14 21:45:48 +00:00
Simeon Brooks efec2bc70d Fix external DB settings 2023-11-14 21:45:48 +00:00
Tomas Groth d0aebd6429 Merge branch 'fix-alerts' into 'master'
Fix alerts

Closes #1669

See merge request openlp/openlp!678
2023-10-21 18:43:31 +00:00
Tomas Groth 45ccf8cf36 Fix alerts 2023-10-20 19:22:21 +02:00
Raoul Snyman 4a7273fd14 Merge branch 'wot-no-vlc' into 'master'
Fixes #1325 - Handling of Missing VLC.

Closes #1325

See merge request openlp/openlp!676
2023-10-19 23:15:39 +00:00
Tim Bentley 6b31c01ab9 Fixes #1325 - Handling of Missing VLC. 2023-10-19 23:15:38 +00:00
Raoul Snyman c277ac2b6f Merge branch 'sword-import-error-handling' into 'master'
Better handling of attempts to load invalid SWORD folder or zip-file

Closes #1649 and #1326

See merge request openlp/openlp!675
2023-10-12 03:32:14 +00:00
Tomas Groth 78708213a0 Better handling of attempts to load invalid SWORD folder or zip-file 2023-10-12 03:32:14 +00:00
Tomas Groth 5b2282ca23 Merge branch 'issue-1362' into 'master'
Ensure a path set in PathEdit is a Path instance

Closes #1362

See merge request openlp/openlp!674
2023-10-11 20:17:05 +00:00
Raoul Snyman 28905b4d60 Ensure a path set in PathEdit is a Path instance 2023-10-11 20:17:05 +00:00
Raoul Snyman 6d1c598f39 Merge branch 'openLyrics-whitespaces' into 'master'
Fix trimming leading whitespaces

Closes #1534

See merge request openlp/openlp!659
2023-10-10 23:53:41 +00:00
Gyuris Gellért e09d7719a9 Fix trimming leading whitespaces 2023-10-10 23:53:41 +00:00
Raoul Snyman 621a8f2516 Merge branch 'webengine-str-replace-all' into 'master'
Inject String.replaceAll javascript implementation if needed into webengine when browsing SongSelect.

See merge request openlp/openlp!671
2023-10-10 19:20:52 +00:00
Tomas Groth 58e3312ace Inject String.replaceAll javascript implementation if needed into webengine when browsing SongSelect. 2023-10-10 19:20:51 +00:00
Tomas Groth 987abbd033 Merge branch 'do-not-start-same-presentation-twice' into 'master'
Do not start the same presentation again when it's already live.

See merge request openlp/openlp!673
2023-10-02 19:25:15 +00:00
Chris Witterholt c99202342a Do not start the same presentation again when it's already live. 2023-10-02 19:25:15 +00:00
Raoul Snyman c0215785e4 Merge branch 'presentation-error-when-starting-from-blank-song' into 'master'
Prevent key error when unblank screen at start of presentation.

See merge request openlp/openlp!672
2023-10-01 16:08:45 +00:00
Chris Witterholt b4a67d7346
Prevent key error when unblank screen at start of presentation. 2023-09-30 14:44:58 +02:00
Raoul Snyman 86b798ec7c Merge branch 'release-3.1rc2' into 'master'
OpenLP Release Candidate 2

See merge request openlp/openlp!670
2023-09-14 17:01:10 +00:00
Raoul Snyman f4611e06cf OpenLP Release Candidate 2 2023-09-14 09:16:52 -07:00
Raoul Snyman 47bcdb6435 Merge branch 'make-images-multiselect-again' into 'master'
Fix the multiselect in the images plugin

See merge request openlp/openlp!669
2023-09-14 16:05:15 +00:00
Raoul Snyman f000948713 Merge branch 'revert-registry-get' into 'master'
Revert the Registry behaviour

See merge request openlp/openlp!668
2023-09-14 16:04:56 +00:00
Raoul Snyman a1581807c5 Revert the Registry behaviour 2023-09-14 16:04:56 +00:00
Raoul Snyman f24e5873bf Fix the multiselect in the images plugin 2023-09-13 21:31:37 -07:00
Raoul Snyman 69de0d7375
Merge branch 'spoof-songselect-webengine' into 'master'
Spoof the songselect webengine user agent

See merge request openlp/openlp!667
2023-09-10 22:58:40 +00:00
Tomas Groth 3fb3246a30
Spoof the songselect webengine user agent 2023-09-10 22:58:39 +00:00
646 changed files with 29647 additions and 24475 deletions

1
.gitignore vendored
View File

@ -33,6 +33,7 @@ __pycache__
build
cover
coverage
coverage.xml
dist
env
htmlcov

View File

@ -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

View File

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

View File

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

View File

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

View File

@ -1 +1 @@
3.1.0rc1
3.1.2

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -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',
@ -313,6 +317,8 @@ def set_up_logging(log_path):
logfile = logging.FileHandler(file_path, 'w', encoding='UTF-8')
logfile.setFormatter(logging.Formatter('%(asctime)s %(threadName)s %(name)-55s %(levelname)-8s %(message)s'))
log.addHandler(logfile)
# Send warnings to the log file
logging.captureWarnings(True)
print(f'Logging to: {file_path} and level {log.level}')
@ -393,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
@ -415,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
@ -476,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'])
@ -501,8 +578,6 @@ def main():
else:
set_webview_display_path(args.display_custom_path)
Registry().set_flag('no_web_server', args.no_web_server)
# Upgrade settings.
app.settings = settings
application.setApplicationVersion(get_version()['version'])
# Check if an instance of OpenLP is already running. Quit if there is a running instance and the user only wants one
server = Server()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -23,7 +23,6 @@ Provide Error Handling and login Services
"""
import inspect
import logging
from typing import Any
from openlp.core.common import trace_error_handler
from openlp.core.common.platform import is_win
@ -128,13 +127,6 @@ class RegistryProperties(object):
_projector_manager = None
_settings = None
def _get_object(self, name: str) -> Any:
"""Get an object, or return None"""
try:
return Registry().get(name)
except KeyError:
return None
@property
def application(self):
"""
@ -142,10 +134,10 @@ class RegistryProperties(object):
Windows needs to access the application in a dynamic manner.
"""
if is_win():
return self._get_object('application')
return Registry().get('application')
else:
if not hasattr(self, '_application') or not self._application:
self._application = self._get_object('application')
self._application = Registry().get('application')
return self._application
@property
@ -154,7 +146,7 @@ class RegistryProperties(object):
Adds the plugin manager to the class dynamically
"""
if not hasattr(self, '_plugin_manager') or not self._plugin_manager:
self._plugin_manager = self._get_object('plugin_manager')
self._plugin_manager = Registry().get('plugin_manager')
return self._plugin_manager
@property
@ -163,7 +155,7 @@ class RegistryProperties(object):
Adds the media controller to the class dynamically
"""
if not hasattr(self, '_media_controller') or not self._media_controller:
self._media_controller = self._get_object('media_controller')
self._media_controller = Registry().get('media_controller')
return self._media_controller
@property
@ -172,7 +164,7 @@ class RegistryProperties(object):
Adds the service manager to the class dynamically
"""
if not hasattr(self, '_service_manager') or not self._service_manager:
self._service_manager = self._get_object('service_manager')
self._service_manager = Registry().get('service_manager')
return self._service_manager
@property
@ -181,7 +173,7 @@ class RegistryProperties(object):
Adds the preview controller to the class dynamically
"""
if not hasattr(self, '_preview_controller') or not self._preview_controller:
self._preview_controller = self._get_object('preview_controller')
self._preview_controller = Registry().get('preview_controller')
return self._preview_controller
@property
@ -190,7 +182,7 @@ class RegistryProperties(object):
Adds the live controller to the class dynamically
"""
if not hasattr(self, '_live_controller') or not self._live_controller:
self._live_controller = self._get_object('live_controller')
self._live_controller = Registry().get('live_controller')
return self._live_controller
@property
@ -199,7 +191,7 @@ class RegistryProperties(object):
Adds the main window to the class dynamically
"""
if not hasattr(self, '_main_window') or not self._main_window:
self._main_window = self._get_object('main_window')
self._main_window = Registry().get('main_window')
return self._main_window
@property
@ -208,7 +200,7 @@ class RegistryProperties(object):
Adds the Renderer to the class dynamically
"""
if not hasattr(self, '_renderer') or not self._renderer:
self._renderer = self._get_object('renderer')
self._renderer = Registry().get('renderer')
return self._renderer
@property
@ -217,7 +209,7 @@ class RegistryProperties(object):
Adds the theme manager to the class dynamically
"""
if not hasattr(self, '_theme_manager') or not self._theme_manager:
self._theme_manager = self._get_object('theme_manager')
self._theme_manager = Registry().get('theme_manager')
return self._theme_manager
@property
@ -226,7 +218,7 @@ class RegistryProperties(object):
Adds the settings form to the class dynamically
"""
if not hasattr(self, '_settings_form') or not self._settings_form:
self._settings_form = self._get_object('settings_form')
self._settings_form = Registry().get('settings_form')
return self._settings_form
@property
@ -235,7 +227,7 @@ class RegistryProperties(object):
Adds the alerts manager to the class dynamically
"""
if not hasattr(self, '_alerts_manager') or not self._alerts_manager:
self._alerts_manager = self._get_object('alerts_manager')
self._alerts_manager = Registry().get('alerts_manager')
return self._alerts_manager
@property
@ -244,7 +236,7 @@ class RegistryProperties(object):
Adds the projector manager to the class dynamically
"""
if not hasattr(self, '_projector_manager') or not self._projector_manager:
self._projector_manager = self._get_object('projector_manager')
self._projector_manager = Registry().get('projector_manager')
return self._projector_manager
@property
@ -253,5 +245,5 @@ class RegistryProperties(object):
Adds the settings object to the class dynamically
"""
if not hasattr(self, '_settings') or not self._settings:
self._settings = self._get_object('settings')
self._settings = Registry().get('settings')
return self._settings

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -102,6 +102,8 @@ def str_to_path(string):
:return: None if :param:`string` is empty, or a Path object representation of :param:`string`
:rtype: Path | None
"""
if isinstance(string, Path):
return string
if not isinstance(string, str):
log.error('parameter \'string\' must be of type str, got {} which is a {} instead'.format(string, type(string)))
return None

View File

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

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -22,8 +22,8 @@
Provide Registry Services
"""
import logging
from contextlib import contextmanager
from typing import Any, Callable
from warnings import warn
from openlp.core.common import Singleton, de_hump, trace_error_handler
@ -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':
"""
@ -51,13 +54,6 @@ class Registry(metaclass=Singleton):
registry._is_suppressing = False
return registry
@contextmanager
def suppress_error(self):
"""Suppress errors temporarily"""
self._is_suppressing = True
yield
self._is_suppressing = False
def get(self, key: str) -> Any | None:
"""
Extracts the registry value from the list based on the key passed in
@ -67,12 +63,8 @@ class Registry(metaclass=Singleton):
if key in self.service_list:
return self.service_list[key]
else:
if self._is_suppressing:
return None
else:
trace_error_handler(log)
log.error('Service {key} not found in list'.format(key=key))
raise KeyError('Service {key} not found in list'.format(key=key))
warn(f'Service "{key}" not found in list', stacklevel=2)
return None
def register(self, key: str, reference: Any):
"""

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -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
@ -590,8 +590,6 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties, LogMixin):
translate('OpenLP.MediaManagerItem',
'You must select one or more items to add.'))
else:
# Is it possible to process multiple list items to generate
# multiple service items?
if self.single_service_item:
self.log_debug('{plugin} Add requested'.format(plugin=self.plugin.name))
self.add_to_service(remote=self.remote_triggered)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -22,7 +22,6 @@
The :mod:`~openlp.core.loader` module provides a bootstrap for the singleton classes
"""
from openlp.core.common.registry import Registry
from openlp.core.display.render import Renderer
from openlp.core.lib.pluginmanager import PluginManager
from openlp.core.state import State
@ -33,17 +32,15 @@ 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
"""
# Suppress errors when calling logging due initialisation due to incomplete plugin initialization.
with Registry().suppress_error():
State().load_settings()
MediaController()
PluginManager()
# Set up the path with plugins
Renderer(window_title='Renderer')
# Create slide controllers
PreviewController()
LiveController()
State().load_settings()
MediaController()
PluginManager()
# Set up the path with plugins
Renderer(window_title='Renderer')
# Create slide controllers
PreviewController()
LiveController()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
##########################################################################
# OpenLP - Open Source Lyrics Projection #
# ---------------------------------------------------------------------- #
# Copyright (c) 2008-2023 OpenLP Developers #
# Copyright (c) 2008-2024 OpenLP Developers #
# ---------------------------------------------------------------------- #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@ -52,11 +52,7 @@ def run_thread(worker, thread_name, can_start=True):
if not thread_name:
raise ValueError('A thread_name is required when calling the "run_thread" function')
application = Registry().get('application')
try:
# In some cases (see First Time Form), the main window does not exist yet
main_window = Registry().get('main_window')
except KeyError:
main_window = None
main_window = Registry().get('main_window')
if thread_name in application.worker_threads:
raise KeyError('A thread with the name "{}" has already been created, please use another'.format(thread_name))
# Create the thread and add the thread and the worker to the parent
@ -121,8 +117,7 @@ def make_remove_thread(thread_name):
:param str thread_name: The name of the thread to stop and remove
"""
with Registry().suppress_error():
application = Registry().get('application')
application = Registry().get('application')
if application and thread_name in application.worker_threads:
del application.worker_threads[thread_name]
return remove_thread

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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