Make it possible to select *multiple* items on the source files tab (only contiguous items, at this time).
This commit is contained in:
parent
6f751b516c
commit
c7be996b47
@ -92,6 +92,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+e+'<\/'+'a'+'>');
|
|||||||
<li>Added detection of the <em>64-Bit</em> version of QAAC encoder, requires 64-Bit Apple Application Support<br /></li>
|
<li>Added detection of the <em>64-Bit</em> version of QAAC encoder, requires 64-Bit Apple Application Support<br /></li>
|
||||||
<li>Added enhanced file renaming option: Default file extensions can now be overwritten<br /></li>
|
<li>Added enhanced file renaming option: Default file extensions can now be overwritten<br /></li>
|
||||||
<li>Added enhanced file renaming option: Files can now be renamed via the <a href="http://www.regular-expressions.info/quickstart.html">regular expression</a> engine<br /></li>
|
<li>Added enhanced file renaming option: Files can now be renamed via the <a href="http://www.regular-expressions.info/quickstart.html">regular expression</a> engine<br /></li>
|
||||||
|
<li>Added capability to select <em>multiple</em> files on "Source Files" tab<br /></li>
|
||||||
<li>Updated MediaInfo to v0.7.73 (2015-04-09), compiled with ICL 15.0 and MSVC 12.0<br /></li>
|
<li>Updated MediaInfo to v0.7.73 (2015-04-09), compiled with ICL 15.0 and MSVC 12.0<br /></li>
|
||||||
<li>Updated ALAC decoder to refalac v1.47 (2015-02-15), based on reference implementation by Apple<br /></li>
|
<li>Updated ALAC decoder to refalac v1.47 (2015-02-15), based on reference implementation by Apple<br /></li>
|
||||||
<li>Updated GnuPG to v1.4.19 (2015-02-27), compiled with GCC 4.9.2<br /></li>
|
<li>Updated GnuPG to v1.4.19 (2015-02-27), compiled with GCC 4.9.2<br /></li>
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
* Added detection of the *64-Bit* version of QAAC encoder, requires 64-Bit Apple Application Support
|
* Added detection of the *64-Bit* version of QAAC encoder, requires 64-Bit Apple Application Support
|
||||||
* Added enhanced file renaming option: Default file extensions can now be overwritten
|
* Added enhanced file renaming option: Default file extensions can now be overwritten
|
||||||
* Added enhanced file renaming option: Files can now be renamed via the [regular expression](http://www.regular-expressions.info/quickstart.html) engine
|
* Added enhanced file renaming option: Files can now be renamed via the [regular expression](http://www.regular-expressions.info/quickstart.html) engine
|
||||||
|
* Added capability to select *multiple* files on "Source Files" tab
|
||||||
* Updated MediaInfo to v0.7.73 (2015-04-09), compiled with ICL 15.0 and MSVC 12.0
|
* Updated MediaInfo to v0.7.73 (2015-04-09), compiled with ICL 15.0 and MSVC 12.0
|
||||||
* Updated ALAC decoder to refalac v1.47 (2015-02-15), based on reference implementation by Apple
|
* Updated ALAC decoder to refalac v1.47 (2015-02-15), based on reference implementation by Apple
|
||||||
* Updated GnuPG to v1.4.19 (2015-02-27), compiled with GCC 4.9.2
|
* Updated GnuPG to v1.4.19 (2015-02-27), compiled with GCC 4.9.2
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -31,7 +31,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../src/Dialog_MainWindow.cpp" line="811"/>
|
<location filename="../../src/Dialog_MainWindow.cpp" line="822"/>
|
||||||
<source>%n file(s) have been rejected, because read access was not granted!</source>
|
<source>%n file(s) have been rejected, because read access was not granted!</source>
|
||||||
<translation>
|
<translation>
|
||||||
<numerusform>%n file have been rejected, because read access was not granted!</numerusform>
|
<numerusform>%n file have been rejected, because read access was not granted!</numerusform>
|
||||||
@ -39,7 +39,7 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../src/Dialog_MainWindow.cpp" line="815"/>
|
<location filename="../../src/Dialog_MainWindow.cpp" line="826"/>
|
||||||
<source>%n file(s) have been rejected, because they are dummy CDDA files!</source>
|
<source>%n file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||||
<translation>
|
<translation>
|
||||||
<numerusform>%n file have been rejected, because they are dummy CDDA files!</numerusform>
|
<numerusform>%n file have been rejected, because they are dummy CDDA files!</numerusform>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../src/Dialog_MainWindow.cpp" line="819"/>
|
<location filename="../../src/Dialog_MainWindow.cpp" line="830"/>
|
||||||
<source>%n file(s) have been rejected, because they appear to be Cue Sheet images!</source>
|
<source>%n file(s) have been rejected, because they appear to be Cue Sheet images!</source>
|
||||||
<translation>
|
<translation>
|
||||||
<numerusform>%n file have been rejected, because they appear to be Cue Sheet images!</numerusform>
|
<numerusform>%n file have been rejected, because they appear to be Cue Sheet images!</numerusform>
|
||||||
@ -55,7 +55,7 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../src/Dialog_MainWindow.cpp" line="823"/>
|
<location filename="../../src/Dialog_MainWindow.cpp" line="834"/>
|
||||||
<source>%n file(s) have been rejected, because the file format could not be recognized!</source>
|
<source>%n file(s) have been rejected, because the file format could not be recognized!</source>
|
||||||
<translation>
|
<translation>
|
||||||
<numerusform>%n file have been rejected, because the file format could not be recognized!</numerusform>
|
<numerusform>%n file have been rejected, because the file format could not be recognized!</numerusform>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../src/Dialog_MainWindow.cpp" line="4143"/>
|
<location filename="../../src/Dialog_MainWindow.cpp" line="4203"/>
|
||||||
<source>%n Instance(s)</source>
|
<source>%n Instance(s)</source>
|
||||||
<translation>
|
<translation>
|
||||||
<numerusform>%n Instance</numerusform>
|
<numerusform>%n Instance</numerusform>
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTableView" name="sourceFileView">
|
<widget class="QTableView" name="sourceFileView">
|
||||||
<property name="selectionMode">
|
<property name="selectionMode">
|
||||||
<enum>QAbstractItemView::SingleSelection</enum>
|
<enum>QAbstractItemView::ContiguousSelection</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="selectionBehavior">
|
<property name="selectionBehavior">
|
||||||
<enum>QAbstractItemView::SelectRows</enum>
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
@ -1509,8 +1509,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>613</width>
|
<width>602</width>
|
||||||
<height>1849</height>
|
<height>1840</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_22">
|
<layout class="QGridLayout" name="gridLayout_22">
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 2
|
#define VER_LAMEXP_MINOR_LO 2
|
||||||
#define VER_LAMEXP_TYPE Alpha
|
#define VER_LAMEXP_TYPE Alpha
|
||||||
#define VER_LAMEXP_PATCH 5
|
#define VER_LAMEXP_PATCH 5
|
||||||
#define VER_LAMEXP_BUILD 1750
|
#define VER_LAMEXP_BUILD 1753
|
||||||
#define VER_LAMEXP_CONFG 1700
|
#define VER_LAMEXP_CONFG 1700
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -202,6 +202,17 @@ static inline void MAKE_TRANSPARENT(QWidget *const widget, const bool &flag)
|
|||||||
widget->setPalette(flag ? _p : QPalette());
|
widget->setPalette(flag ? _p : QPalette());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
static QList<T>& INVERT_LIST(QList<T> &list)
|
||||||
|
{
|
||||||
|
if(!list.isEmpty())
|
||||||
|
{
|
||||||
|
const int limit = list.size() / 2, maxIdx = list.size() - 1;
|
||||||
|
for(int k = 0; k < limit; k++) list.swap(k, maxIdx - k);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Helper Classes
|
// Helper Classes
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
@ -1027,6 +1038,43 @@ void MainWindow::openDocumentLink(QAction *const action)
|
|||||||
QDesktopServices::openUrl(url);
|
QDesktopServices::openUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Move selected files up/down
|
||||||
|
*/
|
||||||
|
void MainWindow::moveSelectedFiles(const bool &up)
|
||||||
|
{
|
||||||
|
QItemSelectionModel *const selection = ui->sourceFileView->selectionModel();
|
||||||
|
if(selection && selection->hasSelection())
|
||||||
|
{
|
||||||
|
const QModelIndexList selectedRows = up ? selection->selectedRows() : INVERT_LIST(selection->selectedRows());
|
||||||
|
if((up && (selectedRows.first().row() > 0)) || ((!up) && (selectedRows.first().row() < m_fileListModel->rowCount() - 1)))
|
||||||
|
{
|
||||||
|
const int delta = up ? (-1) : 1;
|
||||||
|
const int firstIndex = (up ? selectedRows.first() : selectedRows.last()).row() + delta;
|
||||||
|
const int selectionCount = selectedRows.count();
|
||||||
|
if(abs(delta) > 0)
|
||||||
|
{
|
||||||
|
FileListBlockHelper fileListBlocker(m_fileListModel);
|
||||||
|
for(QModelIndexList::ConstIterator iter = selectedRows.constBegin(); iter != selectedRows.constEnd(); iter++)
|
||||||
|
{
|
||||||
|
if(!m_fileListModel->moveFile((*iter), delta))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
selection->clearSelection();
|
||||||
|
for(int i = 0; i < selectionCount; i++)
|
||||||
|
{
|
||||||
|
const QModelIndex item = m_fileListModel->index(firstIndex + i, 0);
|
||||||
|
selection->select(QItemSelection(item, item), QItemSelectionModel::Select | QItemSelectionModel::Rows);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show banner popup dialog
|
* Show banner popup dialog
|
||||||
*/
|
*/
|
||||||
@ -2305,7 +2353,7 @@ void MainWindow::addFilesButtonClicked(void)
|
|||||||
ABORT_IF_BUSY;
|
ABORT_IF_BUSY;
|
||||||
WidgetHideHelper hiderHelper(m_dropBox.data());
|
WidgetHideHelper hiderHelper(m_dropBox.data());
|
||||||
|
|
||||||
if(MUtils::GUI::themes_enabled())
|
if(MUtils::GUI::themes_enabled() && (!MUTILS_DEBUG))
|
||||||
{
|
{
|
||||||
QStringList fileTypeFilters = DecoderRegistry::getSupportedTypes();
|
QStringList fileTypeFilters = DecoderRegistry::getSupportedTypes();
|
||||||
QStringList selectedFiles = QFileDialog::getOpenFileNames(this, tr("Add file(s)"), m_settings->mostRecentInputPath(), fileTypeFilters.join(";;"));
|
QStringList selectedFiles = QFileDialog::getOpenFileNames(this, tr("Add file(s)"), m_settings->mostRecentInputPath(), fileTypeFilters.join(";;"));
|
||||||
@ -2395,11 +2443,28 @@ void MainWindow::openFolderActionActivated(void)
|
|||||||
*/
|
*/
|
||||||
void MainWindow::removeFileButtonClicked(void)
|
void MainWindow::removeFileButtonClicked(void)
|
||||||
{
|
{
|
||||||
if(ui->sourceFileView->currentIndex().isValid())
|
const QModelIndex current = ui->sourceFileView->currentIndex();
|
||||||
|
if(current.isValid())
|
||||||
{
|
{
|
||||||
int iRow = ui->sourceFileView->currentIndex().row();
|
const QItemSelectionModel *const selection = ui->sourceFileView->selectionModel();
|
||||||
m_fileListModel->removeFile(ui->sourceFileView->currentIndex());
|
if(selection && selection->hasSelection())
|
||||||
ui->sourceFileView->selectRow(iRow < m_fileListModel->rowCount() ? iRow : m_fileListModel->rowCount()-1);
|
{
|
||||||
|
const QModelIndexList selectedRows = INVERT_LIST(selection->selectedRows());
|
||||||
|
FileListBlockHelper fileListBlocker(m_fileListModel);
|
||||||
|
for(QModelIndexList::ConstIterator iter = selectedRows.constBegin(); iter != selectedRows.constEnd(); iter++)
|
||||||
|
{
|
||||||
|
m_fileListModel->removeFile(*iter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(m_fileListModel->rowCount() > 0)
|
||||||
|
{
|
||||||
|
ui->sourceFileView->selectRow((current.row() < m_fileListModel->rowCount()) ? current.row() : (m_fileListModel->rowCount() - 1));
|
||||||
|
ui->sourceFileView->scrollTo(ui->sourceFileView->currentIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2416,12 +2481,7 @@ void MainWindow::clearFilesButtonClicked(void)
|
|||||||
*/
|
*/
|
||||||
void MainWindow::fileUpButtonClicked(void)
|
void MainWindow::fileUpButtonClicked(void)
|
||||||
{
|
{
|
||||||
if(ui->sourceFileView->currentIndex().isValid())
|
moveSelectedFiles(true);
|
||||||
{
|
|
||||||
int iRow = ui->sourceFileView->currentIndex().row() - 1;
|
|
||||||
m_fileListModel->moveFile(ui->sourceFileView->currentIndex(), -1);
|
|
||||||
ui->sourceFileView->selectRow(iRow >= 0 ? iRow : 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2429,12 +2489,7 @@ void MainWindow::fileUpButtonClicked(void)
|
|||||||
*/
|
*/
|
||||||
void MainWindow::fileDownButtonClicked(void)
|
void MainWindow::fileDownButtonClicked(void)
|
||||||
{
|
{
|
||||||
if(ui->sourceFileView->currentIndex().isValid())
|
moveSelectedFiles(false);
|
||||||
{
|
|
||||||
int iRow = ui->sourceFileView->currentIndex().row() + 1;
|
|
||||||
m_fileListModel->moveFile(ui->sourceFileView->currentIndex(), 1);
|
|
||||||
ui->sourceFileView->selectRow(iRow < m_fileListModel->rowCount() ? iRow : m_fileListModel->rowCount()-1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2445,38 +2500,43 @@ void MainWindow::showDetailsButtonClicked(void)
|
|||||||
ABORT_IF_BUSY;
|
ABORT_IF_BUSY;
|
||||||
|
|
||||||
int iResult = 0;
|
int iResult = 0;
|
||||||
MetaInfoDialog *metaInfoDialog = new MetaInfoDialog(this);
|
|
||||||
QModelIndex index = ui->sourceFileView->currentIndex();
|
QModelIndex index = ui->sourceFileView->currentIndex();
|
||||||
|
|
||||||
while(index.isValid())
|
if(index.isValid())
|
||||||
{
|
{
|
||||||
if(iResult > 0)
|
ui->sourceFileView->selectRow(index.row());
|
||||||
|
QScopedPointer<MetaInfoDialog> metaInfoDialog(new MetaInfoDialog(this));
|
||||||
|
forever
|
||||||
{
|
{
|
||||||
index = m_fileListModel->index(index.row() + 1, index.column());
|
AudioFileModel &file = (*m_fileListModel)[index];
|
||||||
ui->sourceFileView->selectRow(index.row());
|
WidgetHideHelper hiderHelper(m_dropBox.data());
|
||||||
}
|
iResult = metaInfoDialog->exec(file, index.row() > 0, index.row() < m_fileListModel->rowCount() - 1);
|
||||||
if(iResult < 0)
|
|
||||||
{
|
|
||||||
index = m_fileListModel->index(index.row() - 1, index.column());
|
|
||||||
ui->sourceFileView->selectRow(index.row());
|
|
||||||
}
|
|
||||||
|
|
||||||
AudioFileModel &file = (*m_fileListModel)[index];
|
|
||||||
WidgetHideHelper hiderHelper(m_dropBox.data());
|
|
||||||
iResult = metaInfoDialog->exec(file, index.row() > 0, index.row() < m_fileListModel->rowCount() - 1);
|
|
||||||
|
|
||||||
//Copy all info to Meta Info tab
|
//Copy all info to Meta Info tab
|
||||||
if(iResult == INT_MAX)
|
if(iResult == INT_MAX)
|
||||||
{
|
{
|
||||||
m_metaInfoModel->assignInfoFrom(file);
|
m_metaInfoModel->assignInfoFrom(file);
|
||||||
ui->tabWidget->setCurrentIndex(ui->tabWidget->indexOf(ui->tabMetaData));
|
ui->tabWidget->setCurrentIndex(ui->tabWidget->indexOf(ui->tabMetaData));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!iResult) break;
|
if(iResult > 0)
|
||||||
|
{
|
||||||
|
index = m_fileListModel->index(index.row() + 1, index.column());
|
||||||
|
ui->sourceFileView->selectRow(index.row());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if(iResult < 0)
|
||||||
|
{
|
||||||
|
index = m_fileListModel->index(index.row() - 1, index.column());
|
||||||
|
ui->sourceFileView->selectRow(index.row());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
break; /*close dilalog now*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MUTILS_DELETE(metaInfoDialog);
|
|
||||||
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||||
sourceFilesScrollbarMoved(0);
|
sourceFilesScrollbarMoved(0);
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,8 @@ private:
|
|||||||
void initializeTranslation(void);
|
void initializeTranslation(void);
|
||||||
void refreshFavorites(void);
|
void refreshFavorites(void);
|
||||||
void openDocumentLink(QAction *const action);
|
void openDocumentLink(QAction *const action);
|
||||||
|
void moveSelectedFiles(const bool &up);
|
||||||
|
|
||||||
void showBanner(const QString &text);
|
void showBanner(const QString &text);
|
||||||
void showBanner(const QString &text, QThread *const thread);
|
void showBanner(const QString &text, QThread *const thread);
|
||||||
void showBanner(const QString &text, QEventLoop *const eventLoop);
|
void showBanner(const QString &text, QEventLoop *const eventLoop);
|
||||||
|
@ -171,18 +171,16 @@ void FileListModel::addFile(const AudioFileModel &file)
|
|||||||
|
|
||||||
bool FileListModel::removeFile(const QModelIndex &index)
|
bool FileListModel::removeFile(const QModelIndex &index)
|
||||||
{
|
{
|
||||||
if(index.row() >= 0 && index.row() < m_fileList.count())
|
const int row = index.row();
|
||||||
|
if(row >= 0 && row < m_fileList.count())
|
||||||
{
|
{
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
m_fileStore.remove(m_fileList.at(index.row()));
|
m_fileStore.remove(m_fileList.at(row));
|
||||||
m_fileList.removeAt(index.row());
|
m_fileList.removeAt(row);
|
||||||
endResetModel();
|
endResetModel();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
return false;
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileListModel::clearFiles(void)
|
void FileListModel::clearFiles(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user