Commit Graph

11073 Commits

Author SHA1 Message Date
Laurent Monin
2ec8248ea0 PicardDialog.__init__(): call parent class __init__() before anything 2024-05-29 22:12:21 +02:00
Laurent Monin
6b5d673e11 HashableItem: cache the hash() result 2024-05-29 18:39:48 +02:00
Laurent Monin
70ee6d818c HashableItem: no need to convert uuid4 to str, it can be hashed directly
5130731c9e/Lib/uuid.py (L268)
2024-05-29 18:38:32 +02:00
Laurent Monin
4ccb1c14f4 HashableItem: id -> __id 2024-05-29 18:33:16 +02:00
Laurent Monin
5b4ecfca79 HashableTreeWidgetItem, HashableTreeWidgetItem: inherit from HashableItem 2024-05-29 18:29:17 +02:00
Laurent Monin
aed4885e26 Introduce HashableItem class 2024-05-29 18:27:31 +02:00
Laurent Monin
8bff6a2425 BaseAction: match proto, pass parent to parent class if provided 2024-05-29 17:45:37 +02:00
Laurent Monin
ab9e7ff5d9 Move CheckboxListItem to ui/widgets 2024-05-29 17:41:03 +02:00
Laurent Monin
06b9af1511 CheckboxListItem: accept parent parameter
- change imports to match the style we have elsewhere
2024-05-29 17:35:20 +02:00
Laurent Monin
7492d608bc Merge pull request #2502 from zas/parents
Review and pass proper arguments to parent classes (mainly Qt*)
2024-05-29 11:13:18 +02:00
Laurent Monin
c796280a5a QFileDialog: use keyword arguments
Note: I dropped caption="" in most places, because that's the default, though I think we should set one in most cases, this will need further work.
2024-05-29 10:30:55 +02:00
Laurent Monin
b67b606946 Pass arguments explicitly to parent Qt classes 2024-05-29 10:30:55 +02:00
Laurent Monin
579f453a50 OptionsPage: make parent keyword argument explicit 2024-05-29 10:30:55 +02:00
Laurent Monin
1dc87518d7 SearchBox: pass parent as keyword arg 2024-05-29 10:30:55 +02:00
Laurent Monin
e488054cac TagListEditor: parent as keyword arg
Actually callers already used a keyword argument
2024-05-29 10:30:55 +02:00
Laurent Monin
373370bfa9 RatingWidget: pass parent as keyword arg 2024-05-29 10:30:55 +02:00
Laurent Monin
ff8b23d6cd PlaybackProgressSlider: pass parent as keyword arg to QWidget 2024-05-29 10:30:55 +02:00
Laurent Monin
e5461b0515 CollectionMenuItem: parent as optional keyword argument 2024-05-29 10:30:55 +02:00
Laurent Monin
fccfb7b9be CollectionCheckBox: pass explicit keyword arguments 2024-05-29 10:30:55 +02:00
Laurent Monin
1429b17b2a CoverWidget: pass parent as keyword arg 2024-05-29 10:30:55 +02:00
Laurent Monin
310014f032 Pass parent via keyword argument to PicardDialog
It will help if we want to add more arguments to this class
2024-05-29 10:30:55 +02:00
Laurent Monin
32c6d7268d ScriptingDocumentationWidget: pass parent via keyword argument
Drop reference to parent() to get text direction.
2024-05-29 10:30:18 +02:00
Laurent Monin
33018d471c ScriptDetailsEditor: parent isn't actually mandatory 2024-05-28 14:56:57 +02:00
Laurent Monin
e07834ef09 AddActionDialog: it inherits PicardDialog, pass parent via keyword arg 2024-05-28 14:48:44 +02:00
Laurent Monin
0565a8cd8c Highlighter: QSyntaxHighlighter parent isn't optional 2024-05-28 14:47:53 +02:00
Laurent Monin
c76f8bb128 EditTagDialog: drop window and pass metadata box object instead 2024-05-28 14:42:43 +02:00
Laurent Monin
39f586fa47 No need to inherit object explicitly 2024-05-28 14:24:29 +02:00
Laurent Monin
fd2b2c5667 AcoustIDManager: no need to inherit QObject 2024-05-28 14:16:25 +02:00
Laurent Monin
4f5c088202 Submission: no need to explicitly inherit object 2024-05-28 14:16:25 +02:00
Laurent Monin
c7ba39068a Disc: no need to subclass QObject 2024-05-28 14:06:29 +02:00
Laurent Monin
037128a88c Collection: defined as subclass of QObject but QObject.__init__() is not called
Just make it a normal Python object
2024-05-28 13:40:41 +02:00
Laurent Monin
2d05dc7dd9 ScriptingDocumentationDialog: pass parent as keyword argument
- PreserveGeometry needs to accept arguments (even if they are unused) because __init__() is called from PicardDialog via super()
- PicardDialog calls also QtWidgets.QDialog.__init__(), use proper keyword arguments for it
2024-05-28 13:21:43 +02:00
Laurent Monin
38e0174834 MetadataBox(): pass parent by keyword argument and do not redefine a parent property
- do not use parent as main window object, use self.tagger.window
- it reveals an chicken-egg issue: we try to update metadata even before the main window is initialized
2024-05-28 13:00:07 +02:00
Laurent Monin
325e887edc ActiveLabel/CoverArtThumbnail: fix funky parameters, pass parent via keyword argument 2024-05-28 12:31:15 +02:00
Laurent Monin
3c052c9982 Merge pull request #2500 from zas/update_metadata_images_context
Introduce MetadataItem.suspend_metadata_images_update context manager
2024-05-27 21:49:25 +02:00
Laurent Monin
3ad7a5a90b Introduce MetadataItem.suspend_metadata_images_update context manager
It just enable/disable update_metadata_images_enabled
2024-05-27 21:23:42 +02:00
Laurent Monin
79c227c4d4 Merge pull request #2501 from zas/color_groups
Options > Interface > Colors: Separate colors in different groups
2024-05-27 19:09:39 +02:00
Laurent Monin
f191de9bef Options > Interface > Colors: Separate colors in different groups
- properly sort colors in each group (locale-aware)
- use group boxes
- add ColorDescription class with 2 fields: title & group
2024-05-27 15:05:32 +02:00
Laurent Monin
5e24e8047d Merge pull request #2496 from zas/list_of_scripts
Introduce TaggingScriptSetting and few associated methods
2024-05-27 12:32:34 +02:00
Laurent Monin
40ca58436a Merge pull request #2499 from zas/script_syntax_style
Script syntax style adjustements
2024-05-27 12:32:03 +02:00
Laurent Monin
b1f327252d Move iter_active_tagging_scripts() generator near over iter_*() methods 2024-05-27 12:17:03 +02:00
Laurent Monin
a5a13e01a2 unicode -> drop italic, it can now have its own color if needed 2024-05-27 12:13:46 +02:00
Laurent Monin
145b5e0949 syntax_hl_error -> red / light red for light/dark theme 2024-05-27 12:12:30 +02:00
Laurent Monin
9548b75293 PicardFileNamingScript -> FileNamingScriptInfo 2024-05-27 12:06:17 +02:00
Laurent Monin
10160b5848 PicardTaggingScript -> TaggingScriptInfo 2024-05-27 12:04:35 +02:00
Laurent Monin
d9e89bf5a9 PicardScript -> ScriptSerializer 2024-05-27 12:03:04 +02:00
Laurent Monin
929214b3f7 FileNamingScript -> PicardFileNamingScript 2024-05-27 11:59:07 +02:00
Laurent Monin
e95665d704 Introduce PicardScriptImportError/PicardScriptExportError
They are subclassing PicardScriptImportExportError
2024-05-27 11:59:07 +02:00
Laurent Monin
f1c5bb4e48 Introduce a base exception class PicardScriptError 2024-05-27 11:59:07 +02:00
Laurent Monin
e46428c3a4 ScriptImportExportError -> PicardScriptImportExportError 2024-05-27 11:59:07 +02:00