Philipp Wolfer
ef139c17e3
Make Tagger available in itemviews MainPanel
2024-05-03 08:54:26 +02:00
Philipp Wolfer
1b9ae4a914
Fixed Track.tagger not being set
2024-05-03 08:35:02 +02:00
Philipp Wolfer
6b0933f7fa
PICARD-2880: Ensure ratecontrol.set_minimum_delay stores the delay as int
2024-05-01 12:13:42 +02:00
Philipp Wolfer
5d7295057c
Run Windows-1251 EAC log test only if charset-normalizer or chardet are available
2024-05-01 11:59:53 +02:00
Philipp Wolfer
e345b0b044
Run tests with specific combination of required packages
...
This tests for tests passing with optional packages and alternative
packages like discid|libdiscid or charset-normalizer|chardet
2024-05-01 11:59:53 +02:00
Laurent Monin
8227a973ee
QTextCharFormat.setFontFamily() is deprecated since Qt6.1
...
Use setFontFamilies() instead.
https://doc.qt.io/qt-6/qtextcharformat-obsolete.html#setFontFamily
https://doc.qt.io/qt-6/qtextcharformat.html#setFontFamilies
2024-04-30 17:31:51 +02:00
Laurent Monin
6aa68cfd0e
Merge pull request #2442 from phw/datetime-utcnow-deprecation
...
Replace deprecated datetime.utcnow() with datetime.now(datetime.UTC)
2024-04-30 12:36:21 +02:00
Philipp Wolfer
5f76d9285c
Always detect_file_encoding ASCII as UTF-8
...
This ensures partially analyzed documents that are detected as ASCII
but contain UTF-8 encodings later in the file still get loaded. Also
it standardizes charset detection between chardet and charset_normalizers,
which previously differed on the \00 test case.
2024-04-30 11:38:49 +02:00
Philipp Wolfer
0cf178cd5d
PICARD-2879: macOS: Extend all paths in filebrowser with /Volumes/
...
This ensures that selected starting directory gets resolved correctly,
as the filebrowser only supports paths under /Volumes/, not directly under
/. On saving drop the /Volumes/ prefix for paths on the root volume.
2024-04-30 11:37:41 +02:00
Philipp Wolfer
8891f9cea2
Replace deprecated datetime.utcnow() with datetime.now(datetime.UTC)
...
datetime.utcnow is deprecated since Python 3.12
2024-04-30 11:30:51 +02:00
Philipp Wolfer
52656c7cb5
Merge pull request #2438 from zas/cleanup_defaults
...
Cleanup defaults
2024-04-30 07:36:21 +02:00
Laurent Monin
fbab1f1884
Add tests for picard.util.macos functions
...
Suggested by phw
2024-04-29 17:44:12 +02:00
Laurent Monin
fbb3a1f8cd
Add a note about Qt6 installed from pip and libxcb errors
2024-04-29 16:48:59 +02:00
Laurent Monin
79776a3b9a
Move code from consts.defaults to picard.util.cdrom, introduce get_default_cdrom_drives()
2024-04-29 11:45:25 +02:00
Laurent Monin
da8367c5a2
Move macos-specific functions to new picard.util.macos
2024-04-29 11:41:32 +02:00
Laurent Monin
4af62cc88b
Merge pull request #2437 from phw/avoid-double-crash-dialog
...
PICARD-2869: Avoid double crash dialog
2024-04-29 09:29:24 +02:00
Laurent Monin
ed67ef6e56
Merge pull request #2436 from zas/handle_failed_option_page
...
Better handling of exceptions while loading option pages
2024-04-29 09:23:55 +02:00
Philipp Wolfer
9393da348c
PICARD-2869: Run register_excepthook early
...
Don't separately catch exceptions around main but rely on the new excepthook.
This prevents the crash dialog to be shown twice for exceptions which
are catched by the exception handler already.
2024-04-29 08:22:11 +02:00
Laurent Monin
b10efe3c73
No need to check profile_page here, the button leading here will be disabled
2024-04-28 23:46:15 +02:00
Laurent Monin
26c566573a
Do not try to check profiles page if the current page isn't loaded
2024-04-28 23:45:25 +02:00
Laurent Monin
a20b71df1a
Split show_attached_profiles_dialog() in smaller bits
2024-04-28 23:44:41 +02:00
Laurent Monin
c482b2e122
Do not create a OptionsDialog.profile_page property, use get_page() instead
2024-04-28 23:04:51 +02:00
Laurent Monin
0411483d1c
OptionsDialog.maintenance_page is used nowhere, use a local variable instead
2024-04-28 23:00:53 +02:00
Laurent Monin
99a059e53d
Minor change in try/except, add debug output if restoring expanded state fails
2024-04-28 19:40:25 +02:00
Laurent Monin
25964df99a
Use a tuple instead of a generator
...
Suggested by phw
2024-04-28 19:26:31 +02:00
Laurent Monin
14c145dda4
Reduce code redundancy a bit as switch_page calls set_profiles_button_and_highlight
...
- ensure signal is connected before setting the current item
- ensure profiles stuff is ready before setting current item
2024-04-28 19:17:49 +02:00
Laurent Monin
07e6efac00
Use pagename for ... page's names
...
page was referring either to a page object or its name
2024-04-28 18:59:26 +02:00
Laurent Monin
499fe18cfb
Use existing method get_page()
2024-04-28 18:50:21 +02:00
Laurent Monin
7152db11cb
Rename page_to_item to pagename_to_item
...
That's clearer, as we use `page` for `OptionsPage`, but also for `OptionsPage.NAME`.
This dict clearly converts a page's name to an item.
2024-04-28 18:48:20 +02:00
Laurent Monin
dd91bddd3b
add_pages(): drop unused variables foo & bar
...
- create a generator
- use sorted() key property to define order
2024-04-28 18:43:07 +02:00
Laurent Monin
b80f4d698e
Replace OptionsPage error property with clearer initialized property
...
- drop tooltip, as error is clear displayed in the page anyway
- technically those exceptions happen during `__init__()` not `load()`, so that's less ambiguous
2024-04-28 18:32:43 +02:00
Dimlbur
ff2f899c7e
Translated using Weblate (Russian)
...
Currently translated at 56.9% (676 of 1188 strings)
Co-authored-by: Dimlbur <Dimlbur@users.noreply.translations.metabrainz.org >
Translate-URL: https://translations.metabrainz.org/projects/picard/3/app/ru/
Translation: Picard/App
2024-04-28 11:42:31 +00:00
salo.rock
28e65f404d
Translated using Weblate (Italian)
...
Currently translated at 100.0% (1188 of 1188 strings)
Co-authored-by: salo.rock <salo.rock@users.noreply.translations.metabrainz.org >
Translate-URL: https://translations.metabrainz.org/projects/picard/3/app/it/
Translation: Picard/App
2024-04-28 11:42:31 +00:00
Laurent Monin
200028f2c7
Improve ErrorOptionsPage display
2024-04-28 13:33:10 +02:00
Laurent Monin
b387c91468
Run page.set_dialog() in the try/except block as it may be redefined
...
And add a parameter to pass it to `ErrorOptionsPage`.
It looks code duplication, but it isn't, as an `OptionsPage` subclass can redefine `set_dialog()`.
2024-04-28 11:43:41 +02:00
Laurent Monin
e9ef17f332
Simplify code, no need to make a special case of profile_page.save()
2024-04-28 11:29:07 +02:00
Laurent Monin
054ba32d6c
Introduce generator properties to iterate initialized and loaded pages
2024-04-28 11:27:29 +02:00
Laurent Monin
25a36ee281
Disable Restore Defaults for pages that failed to load
2024-04-28 11:17:17 +02:00
Laurent Monin
d47968bce1
Do not try to use profiles if profiles option page failed to load
2024-04-28 11:07:46 +02:00
Laurent Monin
063e2cc538
Call setCurrentWidget() from switch_page(), it makes more sense
2024-04-28 11:06:06 +02:00
Laurent Monin
4346b77152
Link to Troubleshooting documentation instead of Bug Tracker
...
Suggested by rdswift
2024-04-28 10:37:04 +02:00
Laurent Monin
a7c172e6c1
Introduce OptionsPage.loaded and make code more resistant to page loading failures
...
- if the page fails during initialization `error` property is set
- if the page fails during `load()` `loaded` property is False
- test `page.loaded` before trying to use it or call methods from it
2024-04-27 22:55:26 +02:00
Laurent Monin
866c0bd7af
Improve error message and add a link to bug tracker
2024-04-27 22:28:25 +02:00
Laurent Monin
b26d5608eb
Avoid a possible exception if the current item is an inactive page
...
To replicate the issue:
- select a page
- exit Picard
- set the page ACTIVE attribute to False
- load Picard
- open Options again
2024-04-27 19:07:20 +02:00
Laurent Monin
b892157d86
Append (error) to page title and add a tooltip indicating it failed to load
2024-04-27 18:54:11 +02:00
Laurent Monin
a48d1cf356
No need to add widget to pages_stack in add_pages(), as it is done before it is called
...
- not sure why we had this, but removing one or the other doesn't change anything and works
2024-04-27 18:36:28 +02:00
Laurent Monin
64710d0aea
Better handling of exceptions while loading option pages
...
- without this patch, Picard crashes, and/or the options display gets corrupted
- with this patch, a fake page is loaded instead, displaying the message, but avoiding a crash
- it will be important for pages created by plugins
2024-04-27 18:10:21 +02:00
Dimlbur
b13f2064bb
Translated using Weblate (Russian)
...
Currently translated at 56.9% (676 of 1188 strings)
Co-authored-by: Dimlbur <Dimlbur@users.noreply.translations.metabrainz.org >
Translate-URL: https://translations.metabrainz.org/projects/picard/3/app/ru/
Translation: Picard/App
2024-04-27 10:42:27 +00:00
Laurent Monin
559f364fcc
Add missing header to const/defaults.py
...
Copied from const/__init__.py where most entries were before
2024-04-26 22:43:01 +02:00
Laurent Monin
ce5ed9dbcf
Merge pull request #2435 from zas/comment_options
...
Add header & comment to new options.py
2024-04-26 22:38:41 +02:00