Commit Graph

10881 Commits

Author SHA1 Message Date
Laurent Monin
be261bb9d3 _update_items(): regroup code per column
- alignment never changes, move it outside the loop
- set new_item flags once at object creation
- it makes the code a bit easier to read imho
2024-05-17 18:18:37 +02:00
Laurent Monin
4e1ff55274 Consistency: we use tag instead of name everywhere else in the file 2024-05-17 17:52:13 +02:00
Laurent Monin
43a11032df Minor code redundancy reduction 2024-05-17 17:48:59 +02:00
Laurent Monin
f82c5ac1dd Use self.tag_diff after it was set to result
It will make it easier to move code
2024-05-17 17:46:03 +02:00
Laurent Monin
6ed7802777 Use if/continue instead of filter(lambda...), more readable 2024-05-17 17:40:53 +02:00
Laurent Monin
6157063671 name -> tag (as we iterate among tags) 2024-05-17 17:36:58 +02:00
Laurent Monin
1d06036d1b Use named columns instead of numerical values 2024-05-17 17:30:16 +02:00
Laurent Monin
6a1d568152 Test if methods listed in MetadataBox.LOOKUP_TAGS are valid FileLookup methods 2024-05-17 17:11:00 +02:00
Laurent Monin
94ff51ec37 Drop _lookup_tags() in favor of new _lookup_tag(tag)
- define methods to use as strings and use getattr()
2024-05-17 16:43:48 +02:00
Laurent Monin
953bdbcbbc set_item_value() -> _set_item_value() 2024-05-17 16:31:05 +02:00
Laurent Monin
7a620f0fbd _selected_tags(): make it a generator 2024-05-17 16:31:05 +02:00
Laurent Monin
888df2349e selected_tags() -> _selected_tags() 2024-05-17 16:31:05 +02:00
Laurent Monin
03968083c4 remove_selected_tags(): no need to check if tag is removable, as the list is filtered already 2024-05-17 16:31:05 +02:00
Laurent Monin
8e53ebbd05 tag_is_(removable|editable)() -> _tag_is_(removable|editable)() 2024-05-17 16:31:05 +02:00
Laurent Monin
901acc91a5 remove_tag() -> _remove_tag() 2024-05-17 16:31:05 +02:00
Laurent Monin
d1a9f0d519 set_tag_values() -> _set_tag_values() 2024-05-17 16:20:53 +02:00
Laurent Monin
02d191d2d7 toggle_changes_first() -> _toggle_changes_first() 2024-05-17 16:20:53 +02:00
Laurent Monin
a106bc97ee edit_selected_tag() -> _edit_selected_tag() 2024-05-17 16:20:53 +02:00
Laurent Monin
903d3dc07a edit_tag() -> _edit_tag()
# Conflicts:
#	picard/ui/metadatabox.py
2024-05-17 16:20:43 +02:00
Laurent Monin
385bd3c2c4 update_clipboard() -> _update_clipboard() 2024-05-17 16:19:45 +02:00
Laurent Monin
c945991087 copy/paste_value() -> _copy/_paste_value() 2024-05-17 16:19:45 +02:00
Laurent Monin
74eb110524 open_link() -> _open_link() 2024-05-17 16:19:45 +02:00
Laurent Monin
bb8091c5cd get_file_lookup() -> _get_file_lookup() 2024-05-17 16:19:45 +02:00
Laurent Monin
e9f90e61aa lookup_tags() -> _lookup_tags() 2024-05-17 16:19:45 +02:00
Laurent Monin
6c837327a4 MetadataBox: use self as parent of QtGui.QAction actions 2024-05-17 16:19:45 +02:00
Laurent Monin
ab8684325f PICARD-2901: Only try to open edit tag dialog if there are tags to edit
Properly initialize `tag_diff` and check if it's `None`.
2024-05-17 15:58:11 +02:00
Laurent Monin
20add75b34 Merge pull request #2475 from zas/move_ui_files
Move ui_*.py to ui/forms/
2024-05-16 15:00:16 +02:00
Laurent Monin
07727e367e Use ignore-paths and reset ignore-patterns to default 2024-05-16 14:52:20 +02:00
Laurent Monin
9037f51dd3 Update .pylintrc to match recent versions of pylint 2024-05-16 13:35:48 +02:00
Laurent Monin
aaf3420a7e Fix trailing blankline 2024-05-16 12:44:11 +02:00
Laurent Monin
67766d4c01 Update third-party tools exclusions related to ui/forms 2024-05-16 12:39:05 +02:00
Laurent Monin
7f942df8da Move ui_*.py to ui/forms/ 2024-05-16 12:08:47 +02:00
Laurent Monin
b02c0a8ecf Merge pull request #2474 from phw/fix-QListWidget-click-slot
Fixed callback for click signal in CAATypesSelectorDialog
2024-05-16 11:41:53 +02:00
Philipp Wolfer
4f15d262e9 Renamed CAATypesSelectorDialog.clear_focus to _on_list_clicked
This makes the usage of the function clearer, as this is being used
as a Qt slot.
2024-05-16 10:59:53 +02:00
Philipp Wolfer
89330073b7 Fixed callback for click signal in CAATypesSelectorDialog 2024-05-16 10:56:56 +02:00
Philipp Wolfer
5350b2cc8c Fixed CheckboxListItem hiding QListWidgetItem.data() 2024-05-16 10:48:37 +02:00
Laurent Monin
6c08a62775 Merge pull request #2472 from zas/update_precommit
Update pre-commit example
2024-05-15 09:47:17 +02:00
Laurent Monin
8b0766d488 Update pre-commit example
- some files were ignored, but there's no reason anymore
- use git diff --diff-filter=ACM to avoid to check removed files or so
2024-05-14 21:18:19 +02:00
Philipp Wolfer
5c366fd387 Simplified formats.open_ 2024-05-14 13:57:37 +02:00
Philipp Wolfer
52635c7782 PICARD-2897: Try to guess format for files with unknown extension 2024-05-14 13:57:37 +02:00
Laurent Monin
3048c58b00 Add a DebugOpt for POST data
POST DATA was logged in debug mode unconditionally, now it can be enabled if needed.
2024-05-14 09:30:10 +02:00
Laurent Monin
f57bc89db7 Merge pull request #2469 from zas/move_basetreeview
Move BaseTreeView and associated methods to its own file
2024-05-13 20:24:23 +02:00
Laurent Monin
b2faba6708 Move BaseTreeView and associated methods to its own file 2024-05-13 18:32:01 +02:00
Laurent Monin
f59e4efb5e Merge pull request #2468 from zas/release_count
PICARD-2899: Other versions: display the actual number of versions from release-count
2024-05-13 18:21:51 +02:00
Laurent Monin
6133c03eac Other versions: display the actual number of versions from release-count 2024-05-13 18:01:19 +02:00
Laurent Monin
4fe15e0dc5 Merge pull request #2466 from zas/itemviews_columns
Itemviews: Introduce new classes Columns & Column, simplfify code
2024-05-13 17:50:45 +02:00
Laurent Monin
03914b2d0f show_column(): minor simplification using set.discard() instead of set.remove() 2024-05-13 17:40:13 +02:00
Laurent Monin
4dc268c65e ConfigurableColumnsHeader: No point in calling setSectionsMovable/Clickable
Those will be called anyway in TristateSortHeaderView.lock() called from TristateSortHeaderView.__init__()
2024-05-13 17:40:13 +02:00
Laurent Monin
393e677025 Drop (now) unused MainPanel columns-related properties 2024-05-13 17:40:13 +02:00
Laurent Monin
5d4bca12c0 Use ColumnSortType and Column.sortkey(), get rid of few more MainPanel references 2024-05-13 17:40:13 +02:00