mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-08 11:11:51 +00:00
GUI: merge: option »one new merge tab for each dropped input file«
Implements #1380.
This commit is contained in:
parent
f160324250
commit
deb76a6364
@ -1,3 +1,10 @@
|
||||
2015-09-18 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* MKVToolNix GUI: merge tool enhancement: when dragging & dropping
|
||||
files onto merge settings already containing a file the dialog
|
||||
asking the user what to do has received a new option for creating
|
||||
one new merge tab for each of the dropped files. Implements #1380.
|
||||
|
||||
2015-09-17 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: bug fix: the pixel dimensions reported for VC-1 in
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>485</width>
|
||||
<height>303</height>
|
||||
<width>560</width>
|
||||
<height>315</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -76,6 +76,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbAddEachToNew">
|
||||
<property name="text">
|
||||
<string>Create new merge settings for &each file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
|
@ -35,11 +35,12 @@ AddingAppendingFilesDialog::~AddingAppendingFilesDialog() {
|
||||
AddingAppendingFilesDialog::Decision
|
||||
AddingAppendingFilesDialog::decision()
|
||||
const {
|
||||
return ui->rbAdd->isChecked() ? Decision::Add
|
||||
: ui->rbAlwaysAdd->isChecked() ? Decision::AlwaysAdd
|
||||
: ui->rbAppend->isChecked() ? Decision::Append
|
||||
: ui->rbAddToNew->isChecked() ? Decision::AddToNew
|
||||
: Decision::AddAdditionalParts;
|
||||
return ui->rbAdd->isChecked() ? Decision::Add
|
||||
: ui->rbAlwaysAdd->isChecked() ? Decision::AlwaysAdd
|
||||
: ui->rbAppend->isChecked() ? Decision::Append
|
||||
: ui->rbAddToNew->isChecked() ? Decision::AddToNew
|
||||
: ui->rbAddEachToNew->isChecked() ? Decision::AddEachToNew
|
||||
: Decision::AddAdditionalParts;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -22,6 +22,7 @@ public:
|
||||
Append,
|
||||
AddAdditionalParts,
|
||||
AddToNew,
|
||||
AddEachToNew,
|
||||
};
|
||||
|
||||
protected:
|
||||
|
@ -1145,7 +1145,10 @@ Tab::addOrAppendDroppedFiles(QStringList const &fileNames) {
|
||||
m_filesModel->addAdditionalParts(fileIdx, fileNames);
|
||||
|
||||
else if (AddingAppendingFilesDialog::Decision::AddToNew == decision)
|
||||
MainWindow::mergeTool()->addMultipleFilesToNewSettings(fileNames);
|
||||
MainWindow::mergeTool()->addMultipleFilesToNewSettings(fileNames, false);
|
||||
|
||||
else if (AddingAppendingFilesDialog::Decision::AddEachToNew == decision)
|
||||
MainWindow::mergeTool()->addMultipleFilesToNewSettings(fileNames, true);
|
||||
|
||||
else {
|
||||
if (AddingAppendingFilesDialog::Decision::AlwaysAdd == decision) {
|
||||
|
@ -309,13 +309,28 @@ Tool::openMultipleConfigFilesFromCommandLine(QStringList const &fileNames) {
|
||||
}
|
||||
|
||||
void
|
||||
Tool::addMultipleFilesToNewSettings(QStringList const &fileNames) {
|
||||
newConfig();
|
||||
Tool::addMultipleFilesToNewSettings(QStringList const &fileNames,
|
||||
bool newSettingsForEachFile) {
|
||||
auto toProcess = fileNames;
|
||||
|
||||
auto tab = currentTab();
|
||||
Q_ASSERT(!!tab);
|
||||
while (!toProcess.isEmpty()) {
|
||||
auto fileNamesToAdd = QStringList{};
|
||||
|
||||
tab->addFilesToBeAddedOrAppendedDelayed(fileNames);
|
||||
if (newSettingsForEachFile)
|
||||
fileNamesToAdd << toProcess.takeFirst();
|
||||
|
||||
else {
|
||||
fileNamesToAdd = toProcess;
|
||||
toProcess.clear();
|
||||
}
|
||||
|
||||
newConfig();
|
||||
|
||||
auto tab = currentTab();
|
||||
Q_ASSERT(!!tab);
|
||||
|
||||
tab->addFilesToBeAddedOrAppendedDelayed(fileNamesToAdd);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -63,7 +63,7 @@ public slots:
|
||||
virtual void addMultipleFiles(QStringList const &fileNames);
|
||||
virtual void addMultipleFilesFromCommandLine(QStringList const &fileNames);
|
||||
virtual void openMultipleConfigFilesFromCommandLine(QStringList const &fileNames);
|
||||
virtual void addMultipleFilesToNewSettings(QStringList const &fileNames);
|
||||
virtual void addMultipleFilesToNewSettings(QStringList const &fileNames, bool newSettingsForEachFile);
|
||||
|
||||
virtual void setupTabPositions();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user