Commit Graph

10838 Commits

Author SHA1 Message Date
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
Laurent Monin
38893b0528 Use Column properties, get rid of a bunch of MainPanel references 2024-05-13 17:40:13 +02:00
Laurent Monin
c4c89fa43a on_sort_indicator_changed(): this applies to all icon columns, not only fingerprint 2024-05-13 17:40:13 +02:00
Laurent Monin
5fe6963ed6 Use IconColumn.paint_icon() 2024-05-13 17:40:13 +02:00
Laurent Monin
c7da29c771 Ensure first column is always visible 2024-05-13 17:40:13 +02:00
Laurent Monin
a05a90fb6a Move column/header resizing code to parent of ConfigurableColumnsHeader 2024-05-13 17:40:13 +02:00
Laurent Monin
b04d7469d8 Move default header formatting outside ConfigurableColumnsHeader 2024-05-13 17:40:13 +02:00
Laurent Monin
a9e7f4542d Get header labels from DEFAULT_COLUMNS 2024-05-13 17:40:13 +02:00
Laurent Monin
74e15d4162 Partially replace MainPanel.FINGERPRINT_COLUMN by DEFAULT_COLUMNS.pos('~fingerprint') 2024-05-13 17:40:13 +02:00
Laurent Monin
9738be7fa3 Introduce TreeItem.update_colums_text() and reduce code redundancy 2024-05-13 17:40:13 +02:00
Laurent Monin
ecf57f6781 Use DEFAULT_COLUMNS, and key/title Column properties 2024-05-13 17:40:13 +02:00
Laurent Monin
e2957c331e MainPanel.TITLE_COLUMN -> ITEM_ICON_COLUMN 2024-05-13 17:40:13 +02:00
Laurent Monin
e06667dad6 Introduce Columns, Column, IconColumn, and more classes 2024-05-13 17:40:13 +02:00
Laurent Monin
4fe0b18d65 Move itemviews.py to itemviews/__init__.py 2024-05-13 13:52:00 +02:00
Laurent Monin
c9174a7772 Merge pull request #2467 from phw/PICARD-2896
PICARD-2896: Support .ogx extension for Ogg container
2024-05-13 09:34:58 +02:00
Philipp Wolfer
d61e10b26f PICARD-2896: Support .ogx extension for Ogg container 2024-05-13 08:21:58 +02:00
Laurent Monin
5bb313a36f Merge pull request #2464 from zas/itemviews_basetreeview_cleanup
Itemviews basetreeview cleanup
2024-05-12 20:36:23 +02:00
Laurent Monin
169ed965ee Merge pull request #2465 from phw/PICARD-2895
PICARD-2895: Web service requests must set Authorization header only when required
2024-05-12 15:01:36 +02:00
Laurent Monin
b83c0e3585 Move _add_other_versions outside BaseTreeView 2024-05-12 15:00:16 +02:00
Laurent Monin
2c47d34025 Move code from BaseTreeView to module level
Those methods don't depend on anything
2024-05-12 15:00:16 +02:00
Laurent Monin
8bbdf93d38 Split _add_other_versions() in smaller bits 2024-05-12 15:00:16 +02:00
Laurent Monin
d8a055e560 Insert actions before loading action instead of adding and removing action_more_details 2024-05-12 15:00:16 +02:00
Laurent Monin
311980866d Create actions then add them (step to insert) 2024-05-12 15:00:16 +02:00
Laurent Monin
2e265791e3 loading, action_more -> action_loading, action_more_details 2024-05-12 15:00:16 +02:00
Laurent Monin
b9c1f0d31f BaseTreeView: minor stylistic change (to be on par with the rest of the code) 2024-05-12 15:00:16 +02:00
Laurent Monin
f15f735b34 BaseTreeView: remove dependency on MainPanel, set icon_plugins locally 2024-05-12 15:00:16 +02:00
Laurent Monin
64a0a68dda FileTreeView, AlbumTreeView: pass all arguments to parent class (BaseTreeView) 2024-05-12 15:00:15 +02:00
Philipp Wolfer
c9c980ee53 PICARD-2895: Web service requests must set Authorization header only when required
Setting an empty authorization header can lead to request errors if the
server tries to validate the header if present.
2024-05-12 12:55:33 +02:00
salo.rock
3970a612b4 Translated using Weblate (Italian)
Currently translated at 100.0% (1208 of 1208 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-05-11 10:42:36 +00:00
Laurent Monin
92de44e1e0 Merge pull request #2463 from zas/itemviews_headers
Itemviews headers refactoring
2024-05-11 10:48:33 +02:00
Laurent Monin
f0d379ab46 Log save/restore file/album's view header state in debug mode 2024-05-10 22:06:55 +02:00
Laurent Monin
96e7f1bc84 Introduce DEFAULT_SECTION_SIZE (=100) 2024-05-10 21:55:55 +02:00
Laurent Monin
a406ac9267 Add a config upgrade hook to avoid any issue with saved header state and lock
- if the header state was saved during lock it was actually saving the state sets by locking itself
- new code avoids this, and always save the state before locking
2024-05-10 21:53:15 +02:00
Laurent Monin
5bb29c4880 Rework save/restore/init/defaults headers
- Drop now unneeded _restore_state()
- on restore state, always set columns to defaults before trying to restore previous state
- ensure _init_header() always set columns to defaults and try to restore previous state
2024-05-10 21:53:15 +02:00
Laurent Monin
6a89aab55e Move parts of __init__() to _init_header() 2024-05-10 12:17:02 +02:00
Laurent Monin
b8b23bda0a Introduce new BaseTreeView._init_header() 2024-05-10 12:09:20 +02:00
Laurent Monin
b775b5e516 BaseTreeView._restore_state(): if restoring header failed, fallback on defaults
https://doc.qt.io/qt-6/qheaderview.html#restoreState says:
This function returns true if the state was restored; otherwise returns false.
2024-05-10 12:04:21 +02:00
Laurent Monin
9d93e38daa BaseTreeView: save header's prelock state if locked 2024-05-10 12:01:21 +02:00
Laurent Monin
5e9af33492 TristateSortHeaderView: save pre-lock state and restore on unlock
We do not want to loose initial state when locking.
2024-05-10 12:00:12 +02:00
Laurent Monin
c79264ca4a self.count() > column_index is always True
This was meant to ensure last column hasn't fixed size, but it never worked as intended.
Also header `setStretchLastSection(True)` should prevent the issue anyway so this code isn't needed.
2024-05-10 11:31:07 +02:00
Laurent Monin
8954011f29 ConfigurableColumnsHeader: define __str__() method
It will help with logging
2024-05-10 11:26:05 +02:00
Laurent Monin
7586cffb73 Add properties NAME & DESCRIPTION to BaseTreeView subclasses 2024-05-10 11:22:05 +02:00
Laurent Monin
a40a133656 BaseTreeView, FileTreeView: introduce property default_drop_target
It removes dependency on subclass FileTreeView
2024-05-10 11:19:01 +02:00
Laurent Monin
669aee9676 Merge pull request #2461 from zas/group_extension_points
Group extension points
2024-05-10 11:06:12 +02:00