Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WTrackMenu: show 'Update ReplayGain' only in decks' menus #4719

Merged
merged 5 commits into from
Apr 14, 2022

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented Apr 8, 2022

It's confusing that the "Update ReplayGain" action is shown in the track table menu but always greyed out (and it's pointless there anyway because the menu is not related to a deck).

This also reverts 576e2cf
It's okay to debug assert if a model is asked about a unsupported feature -- that line is never reached if we check for !m_pTrackModel when creating the "Update ReplayGain" action

@ywwg What do you think?

  • improve "Update ReplayGain" discoverability by mentioning it in the gain tooltip?

@github-actions github-actions bot added the ui label Apr 8, 2022
@ronso0 ronso0 changed the title WTrackmenu: show 'Update ReplayGain" only in decks' menus WTrackMenu: show 'Update ReplayGain' only in decks' menus Apr 11, 2022
// This action is only usable when m_deckGroup is set. That is true only
// for WTrackmenu instantiated by WTrackProperty and other deck widgets, thus
// don't create it if a track model is set.
if (!m_pTrackModel && featureIsEnabled(Feature::UpdateReplayGain)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about renaming the enum also to "UpdateReplayGainFromDeckGain"? I was unital confused why a deck is required for updating the replay gain form metadata.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, if it helps avoiding confusion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The respective slot is slotUpdateReplayGainFromPregain so I'd adopt that for the enum.
Is this more clear?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that helps.

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks sensible. Thank you.
@ywwg, do you want to have a look as well.

@ronso0 ronso0 requested a review from ywwg April 13, 2022 19:54
@ronso0 ronso0 added the library label Apr 13, 2022
@daschuer
Copy link
Member

Thank you!

@daschuer
Copy link
Member

I think it is save to merge even without @ywwg having a look.

@daschuer daschuer merged commit 6eb12c0 into mixxxdj:main Apr 14, 2022
@daschuer daschuer added the changelog This PR should be included in the changelog label Apr 14, 2022
@ronso0
Copy link
Member Author

ronso0 commented Apr 14, 2022

I'm still curious why it was implemented this way.

@ronso0 ronso0 added this to the 2.4.0 milestone Aug 5, 2022
@ronso0 ronso0 deleted the updategain-trackmenu branch August 26, 2022 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog This PR should be included in the changelog library ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants