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: add Remove From Disk action #3212

Merged
merged 29 commits into from
Nov 23, 2021
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0e16a27
WTrackMenu: add capabilty RemoveFromDisk, add to Tracks, Hidden, Crates
ronso0 Oct 28, 2020
00b64fb
WTrackMenu > Remove from disk: add action, slot and TrackPointerOpera…
ronso0 Oct 28, 2020
836313c
Merge remote-tracking branch 'mixxx/main' into remove-from-disk
ronso0 Oct 30, 2020
7688b29
WTrackMenu: use QListWidget for track file deletion dialogs
ronso0 Nov 23, 2020
0511df7
Merge remote-tracking branch 'mixxx/main' into remove-from-disk
ronso0 Feb 17, 2021
a5b509d
WTrackMenu: allow Remove From Disk in Browse & Recording
ronso0 Feb 20, 2021
a4e9f71
WTrackMenu: improve format of Delete warning
ronso0 Feb 20, 2021
7300104
Remove from disk: rename variables
ronso0 Jun 14, 2021
4769018
widgethelper: add method to stretch QListWidget to show all content
ronso0 Jun 14, 2021
ac6c35f
Remove from disk: stretch dialog to show all files
ronso0 Jun 14, 2021
c739434
Merge remote-tracking branch 'mixxx/main' into remove-from-disk
ronso0 Jun 14, 2021
42952ad
Remove from disk: clean up comments
ronso0 Aug 31, 2021
d3c089d
Merge remote-tracking branch 'mixxx/main' into remove-from-disk
ronso0 Aug 31, 2021
7fb7783
WTrackMenu: move Delete Files into own submenu, rename Remove > Delete
ronso0 Aug 31, 2021
5227e9e
Hidden Tracks: add 'Delete & Purge' button
ronso0 Aug 31, 2021
c066ac7
Merge remote-tracking branch 'mixxx/main' into remove-from-disk
ronso0 Sep 20, 2021
8a59dbf
reword track delete dialogs
ronso0 Oct 1, 2021
2250522
move setMinimumSize() to widgethelper
ronso0 Oct 1, 2021
0f59bd8
make purged/keep list members of TrackPointerOperation
ronso0 Oct 1, 2021
394e338
explain why we must purge tracks AFTER the batch operation
ronso0 Oct 1, 2021
f92d287
Merge remote-tracking branch 'mixxx/main' into remove-from-disk
ronso0 Nov 14, 2021
d84c8a3
create QDialogs on the stack
ronso0 Nov 14, 2021
3a06d9c
refine comment in RemoveTrackFilesFromDiskTrackPointerOperation
ronso0 Nov 14, 2021
8a2130f
instantiate dialog ingredients just before they're needed
ronso0 Nov 14, 2021
9187e38
remove files from disk: de-duplicate file list
ronso0 Nov 23, 2021
f1b20af
remove files from disk: fix comment typo
ronso0 Nov 23, 2021
e9b70a6
remove files from disk: replace length() > 0 with isEmpty()
ronso0 Nov 23, 2021
ed79726
WTrackTableView: use QModelIndexList::isEmpty(), return early
ronso0 Nov 23, 2021
ab31361
const ref purge/keep track lists, more const
ronso0 Nov 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove from disk: stretch dialog to show all files
  • Loading branch information
ronso0 committed Jun 14, 2021
commit ac6c35f3514f39ccc9b300ce4b14d762e56a52f3
11 changes: 9 additions & 2 deletions src/widget/wtrackmenu.cpp
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
#include <QCheckBox>
#include <QDialogButtonBox>
#include <QInputDialog>
#include <QListView>
#include <QListWidget>
#include <QModelIndex>
#include <QVBoxLayout>
@@ -33,6 +32,7 @@
#include "util/desktophelper.h"
#include "util/parented_ptr.h"
#include "util/qt.h"
#include "util/widgethelper.h"
#include "widget/wcolorpickeraction.h"
#include "widget/wcoverartlabel.h"
#include "widget/wcoverartmenu.h"
@@ -1645,7 +1645,6 @@ void WTrackMenu::slotRemoveFromDisk() {
locations.append(location);
}

// TODO Resize the dialog appropriately.
// TODO Should each item may have a checkbox to allow removing it from the delete list
// or is it okay for the user to Cancel and adjust the selection in the tracks table?
{
@@ -1662,8 +1661,14 @@ void WTrackMenu::slotRemoveFromDisk() {
delWarning->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,
QSizePolicy::Minimum));

// TODO (ronso0) We could also make this a table to allow showing
// artist and title if file names don't suffice to identify tracks.
QListWidget* delListWidget = new QListWidget;
ronso0 marked this conversation as resolved.
Show resolved Hide resolved
delListWidget->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,
QSizePolicy::MinimumExpanding));
delListWidget->addItems(locations);
delListWidget->setMinimumSize(
mixxx::widgethelper::adjustedListWidgetSize(*delListWidget, *this));

QDialogButtonBox* delButtons = new QDialogButtonBox();
QPushButton* cancelBtn = delButtons->addButton(
@@ -1737,6 +1742,8 @@ void WTrackMenu::slotRemoveFromDisk() {

QListWidget* notDeletedListWidget = new QListWidget;
notDeletedListWidget->addItems(trackOperator.tr_tracksToKeep);
notDeletedListWidget->setMinimumSize(
ronso0 marked this conversation as resolved.
Show resolved Hide resolved
mixxx::widgethelper::adjustedListWidgetSize(*notDeletedListWidget, *this));

QDialogButtonBox* notDeletedButtons = new QDialogButtonBox(QDialogButtonBox::Ok);