~ubuntu-branches/ubuntu/feisty/kid3/feisty

« back to all changes in this revision

Viewing changes to kid3/kid3.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Aurelien Jarno
  • Date: 2004-09-26 00:22:06 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040926002206-ynj1sr1mjdqnd2x5
Tags: 0.5-1
New upstream version (closes: bug#273073).

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#include <qtextstream.h>
16
16
#include <qcursor.h>
17
17
#include <qprogressbar.h>
 
18
#include <qmessagebox.h>
18
19
 
19
20
#ifdef CONFIG_USE_KDE
20
21
#include <kapp.h>
27
28
#include <kaction.h>
28
29
#include <kmessagebox.h>
29
30
#include <kfiledialog.h>
 
31
#include <kkeydialog.h>
30
32
#else
31
33
#include <qapplication.h>
32
34
#include <qmenubar.h>
52
54
#include "miscconfig.h"
53
55
#include "freedbconfig.h"
54
56
#include "standardtags.h"
 
57
#include "rendirdialog.h"
55
58
 
56
59
#ifndef CONFIG_USE_KDE
57
60
#include <qdialog.h>
133
136
        framelist = new FrameList();
134
137
        copytags = new StandardTags();
135
138
        initStatusBar();
136
 
        initActions();
137
139
        setModified(false);
138
140
        doc_dir = QString::null;
139
141
        initView();
 
142
        initActions();
140
143
        framelist->setListBox(view->framesListBox);
141
144
        fnFormatCfg->setAsFilenameFormatter();
142
145
 
180
183
            this, SLOT(slotViewToolBar()), actionCollection());
181
184
        viewStatusBar = KStdAction::showStatusbar(
182
185
            this, SLOT(slotViewStatusBar()), actionCollection());
 
186
    settingsShortcuts = KStdAction::keyBindings(
 
187
                this, SLOT(slotSettingsShortcuts()), actionCollection());
183
188
        settingsConfigure = KStdAction::preferences(
184
189
            this, SLOT(slotSettingsConfigure()), actionCollection());
185
190
 
191
196
        fileQuit->setStatusText(i18n("Quits the application"));
192
197
        viewToolBar->setStatusText(i18n("Enables/disables the toolbar"));
193
198
        viewStatusBar->setStatusText(i18n("Enables/disables the statusbar"));
 
199
        settingsShortcuts->setStatusText(i18n("Configure Shortcuts"));
194
200
        settingsConfigure->setStatusText(i18n("Preferences dialog"));
195
201
 
196
202
        new KAction(i18n("&Import..."), 0, this,
202
208
        new KAction(i18n("&Apply Format"), 0, this,
203
209
                    SLOT(slotApplyFormat()), actionCollection(),
204
210
                    "apply_format");
 
211
        new KAction(i18n("&Rename Directory..."), 0, this,
 
212
                    SLOT(slotRenameDirectory()), actionCollection(),
 
213
                    "rename_directory");
 
214
 
 
215
        new KAction(i18n("Select &All"), KShortcut("Alt+A"), this,
 
216
                    SLOT(slotSelectAll()), actionCollection(),
 
217
                    "select_all");
 
218
        new KAction(i18n("&Next File"), KShortcut("Alt+Down"), this,
 
219
                    SLOT(slotNextFile()), actionCollection(),
 
220
                    "next_file");
 
221
        new KAction(i18n("&Previous File"), KShortcut("Alt+Up"), this,
 
222
                    SLOT(slotPreviousFile()), actionCollection(),
 
223
                    "previous_file");
 
224
        new KAction("ID3v1: " + i18n("From Filename"), 0, view, SLOT(fromFilenameV1()),
 
225
                                actionCollection(), "v1_from_filename");
 
226
        new KAction("ID3v1: " + i18n("From ID3v2"), 0, view, SLOT(fromID3V1()),
 
227
                                actionCollection(), "v1_from_v2");
 
228
        new KAction("ID3v1: " + i18n("Copy"), 0, view, SLOT(copyV1()),
 
229
                                actionCollection(), "v1_copy");
 
230
        new KAction("ID3v1: " + i18n("Paste"), 0, view, SLOT(pasteV1()),
 
231
                                actionCollection(), "v1_paste");
 
232
        new KAction("ID3v1: " + i18n("Remove"), 0, view, SLOT(removeV1()),
 
233
                                actionCollection(), "v1_remove");
 
234
        new KAction("ID3v2: " + i18n("From Filename"), 0, view, SLOT(fromFilenameV2()),
 
235
                                actionCollection(), "v2_from_filename");
 
236
        new KAction("ID3v2: " + i18n("From ID3v1"), 0, view, SLOT(fromID3V2()),
 
237
                                actionCollection(), "v2_from_v1");
 
238
        new KAction("ID3v2: " + i18n("Copy"), 0, view, SLOT(copyV2()),
 
239
                                actionCollection(), "v2_copy");
 
240
        new KAction("ID3v2: " + i18n("Paste"), 0, view, SLOT(pasteV2()),
 
241
                                actionCollection(), "v2_paste");
 
242
        new KAction("ID3v2: " + i18n("Remove"), 0, view, SLOT(removeV2()),
 
243
                                actionCollection(), "v2_remove");
 
244
        new KAction(i18n("Frames:") + " " + i18n("Edit"), 0, view, SLOT(editFrame()),
 
245
                                actionCollection(), "frames_edit");
 
246
        new KAction(i18n("Frames:") + " " + i18n("Add"), 0, view, SLOT(addFrame()),
 
247
                                actionCollection(), "frames_add");
 
248
        new KAction(i18n("Frames:") + " " + i18n("Delete"), 0, view, SLOT(deleteFrame()),
 
249
                                actionCollection(), "frames_delete");
 
250
        new KAction(i18n("Filename") + ": " + i18n("From ID3v1"), 0, view, SLOT(fnFromID3V1()),
 
251
                                actionCollection(), "filename_from_v1");
 
252
        new KAction(i18n("Filename") + ": " + i18n("From ID3v2"), 0, view, SLOT(fnFromID3V2()),
 
253
                                actionCollection(), "filename_from_v2");
 
254
        new KAction(i18n("Filename") + ": " + i18n("Focus"), 0, view->nameLineEdit, SLOT(setFocus()),
 
255
                                actionCollection(), "filename_focus");
 
256
        new KAction("ID3v1: " + i18n("Focus"), 0, view->titleV1LineEdit, SLOT(setFocus()),
 
257
                                actionCollection(), "v1_focus");
 
258
        new KAction("ID3v2: " + i18n("Focus"), 0, view->titleV2LineEdit, SLOT(setFocus()),
 
259
                                actionCollection(), "v2_focus");
205
260
 
206
261
        createGUI();
207
262
 
280
335
                connect(toolsApplyFormat, SIGNAL(activated()),
281
336
                        this, SLOT(slotApplyFormat()));
282
337
        }
 
338
        toolsRenameDirectory = new QAction(this);
 
339
        if (toolsRenameDirectory) {
 
340
                toolsRenameDirectory->setText(i18n("Rename Directory"));
 
341
                toolsRenameDirectory->setMenuText(i18n("&Rename Directory..."));
 
342
                connect(toolsRenameDirectory, SIGNAL(activated()),
 
343
                        this, SLOT(slotRenameDirectory()));
 
344
        }
283
345
        settingsConfigure = new QAction(this);
284
346
        if (settingsConfigure) {
285
347
                settingsConfigure->setText(i18n("Configure Kid3"));
305
367
                menubar->insertItem((i18n("&File")), fileMenu);
306
368
 
307
369
                toolsApplyFormat->addTo(toolsMenu);
 
370
                toolsRenameDirectory->addTo(toolsMenu);
308
371
                menubar->insertItem((i18n("&Tools")), toolsMenu);
309
372
 
310
373
                settingsConfigure->addTo(settingsMenu);
390
453
{
391
454
#ifdef CONFIG_USE_KDE
392
455
        fileOpenRecent->saveEntries(config, "Recent Files");
 
456
#else
 
457
        miscCfg->windowWidth = size().width();
 
458
        miscCfg->windowHeight = size().height();
 
459
#endif
393
460
        miscCfg->splitterSizes = view->sizes();
394
 
#endif
395
461
        miscCfg->nameFilter = view->mp3ListBox->getNameFilter();
396
462
        miscCfg->formatItem = view->formatComboBox->currentItem();
397
463
        miscCfg->formatText = view->formatComboBox->currentText();
419
485
        fileOpenRecent->loadEntries(config,"Recent Files");
420
486
        viewToolBar->setChecked(!toolBar("mainToolBar")->isHidden());
421
487
        viewStatusBar->setChecked(!statusBar()->isHidden());
422
 
        if (!miscCfg->splitterSizes.empty()) {
 
488
#else
 
489
        if (miscCfg->windowWidth != -1 && miscCfg->windowHeight != -1) {
 
490
                resize(miscCfg->windowWidth, miscCfg->windowHeight);
 
491
        }
 
492
#endif
 
493
        if (
 
494
#if QT_VERSION >= 300
 
495
                !miscCfg->splitterSizes.empty()
 
496
#else
 
497
                miscCfg->splitterSizes.count() > 0
 
498
#endif
 
499
                ) {
423
500
                view->setSizes(miscCfg->splitterSizes);
424
501
        }
425
 
#endif
426
502
        view->mp3ListBox->setNameFilter(miscCfg->nameFilter);
427
503
        view->formatComboBox->setCurrentItem(miscCfg->formatItem);
428
504
#if QT_VERSION >= 300
480
556
 
481
557
bool Kid3App::saveDirectory(void)
482
558
{
483
 
        int numFiles = 0;
 
559
        QString errorFiles;
 
560
        int numFiles = 0, totalFiles = 0;
484
561
        bool renamed = FALSE;
485
562
        Mp3File *mp3file = view->mp3ListBox->first();
 
563
        // Get number of files to be saved to display correct progressbar
 
564
        while (mp3file != 0) {
 
565
                if (mp3file->isChanged()) {
 
566
                        ++totalFiles;
 
567
                }
 
568
                mp3file = view->mp3ListBox->next();
 
569
        }
486
570
        QProgressBar *progress = new QProgressBar();
487
571
        statusBar()->addWidget(progress, 0, true);
488
 
        progress->setTotalSteps(view->mp3ListBox->numRows());
 
572
        progress->setTotalSteps(totalFiles);
489
573
        progress->setProgress(numFiles);
490
574
#ifdef CONFIG_USE_KDE
491
575
        kapp->processEvents();
492
576
#else
493
577
        qApp->processEvents();
494
578
#endif
 
579
        mp3file = view->mp3ListBox->first();
495
580
        while (mp3file != 0) {
496
 
                renamed = mp3file->writeTags(FALSE) || renamed;
 
581
                if (!mp3file->writeTags(FALSE, &renamed)) {
 
582
                        errorFiles.append(mp3file->getFilename());
 
583
                        errorFiles.append('\n');
 
584
                }
497
585
                mp3file = view->mp3ListBox->next();
498
586
                ++numFiles;
499
587
                progress->setProgress(numFiles);
507
595
        else {
508
596
                updateModificationState();
509
597
        }
 
598
        if (!errorFiles.isEmpty()) {
 
599
                QMessageBox::warning(0, i18n("File Error"),
 
600
                                                         i18n("Error while writing file:\n") +
 
601
                                                         errorFiles,
 
602
                                                         QMessageBox::Ok, QMessageBox::NoButton);
 
603
        }
510
604
        return true;
511
605
}
512
606
 
755
849
        slotStatusMsg(i18n("Ready."));
756
850
}
757
851
 
 
852
/**
 
853
 * Shortcuts configuration.
 
854
 */
 
855
void Kid3App::slotSettingsShortcuts()
 
856
{
 
857
        KKeyDialog::configure(actionCollection(), this);
 
858
}
 
859
 
 
860
/**
 
861
 * Select all files.
 
862
 */
 
863
void Kid3App::slotSelectAll()
 
864
{
 
865
        view->mp3ListBox->selectAll(true);
 
866
}
 
867
 
 
868
/**
 
869
 * Select next file.
 
870
 */
 
871
void Kid3App::slotNextFile()
 
872
{
 
873
        int ci = view->mp3ListBox->currentItem();
 
874
        if (ci >= 0 && ci < (int)view->mp3ListBox->count() - 1) {
 
875
                ++ci;
 
876
                view->mp3ListBox->clearSelection();
 
877
                view->mp3ListBox->setCurrentItem(ci);
 
878
                view->mp3ListBox->setSelected(ci, true);
 
879
        }
 
880
}
 
881
 
 
882
/**
 
883
 * Select previous file.
 
884
 */
 
885
void Kid3App::slotPreviousFile()
 
886
{
 
887
        int ci = view->mp3ListBox->currentItem();
 
888
        if (ci > 0) {
 
889
                --ci;
 
890
                view->mp3ListBox->clearSelection();
 
891
                view->mp3ListBox->setCurrentItem(ci);
 
892
                view->mp3ListBox->setSelected(ci, true);
 
893
        }
 
894
}
 
895
 
758
896
#else /* CONFIG_USE_KDE */
759
897
/**
760
898
 * Display handbook.
840
978
}
841
979
 
842
980
/**
 
981
 * Check if the duration of the files corresponds to the duration of the
 
982
 * imported tracks.
 
983
 *
 
984
 * @param trackDuration list with durations of imported tracks
 
985
 * @param maxDiff       the maximum difference in seconds allowed
 
986
 *
 
987
 * @return true if ok or user agreed with import,
 
988
 *         false if user canceled import.
 
989
 */
 
990
bool Kid3App::checkDuration(QValueList<int>* trackDuration,
 
991
                                                        unsigned maxDiff)
 
992
{
 
993
        if (!trackDuration) {
 
994
                return true;
 
995
        }
 
996
        QString warningMsg;
 
997
        int numFiles = 0;
 
998
        int numTracks = 0;
 
999
#if QT_VERSION >= 300
 
1000
        QValueList<int>::iterator
 
1001
#else
 
1002
        QValueListIterator<int>
 
1003
#endif
 
1004
        it = trackDuration->begin();
 
1005
        Mp3File *mp3file = view->mp3ListBox->first();
 
1006
        while (mp3file != 0) {
 
1007
                if (it != trackDuration->end()) {
 
1008
                        mp3file->readTags(false);
 
1009
                        unsigned fileLen = mp3file->getDuration();
 
1010
                        unsigned trackLen = *it;
 
1011
                        if (fileLen != 0 && trackLen != 0) {
 
1012
                                unsigned diff = fileLen > trackLen ?
 
1013
                                        fileLen - trackLen : trackLen - fileLen;
 
1014
                                if (diff > maxDiff) {
 
1015
                                        warningMsg.append(mp3file->getFilename());
 
1016
                                        warningMsg.append(": ");
 
1017
                                        warningMsg.append(Mp3File::formatTime(fileLen));
 
1018
                                        warningMsg.append(" != ");
 
1019
                                        warningMsg.append(Mp3File::formatTime(trackLen));
 
1020
                                        warningMsg.append('\n');
 
1021
                                }
 
1022
                        }
 
1023
                        ++it;
 
1024
                        ++numTracks;
 
1025
                }
 
1026
                mp3file = view->mp3ListBox->next();
 
1027
                ++numFiles;
 
1028
        }
 
1029
        if (numFiles != 0 && numTracks != 0 &&
 
1030
                numFiles != numTracks) {
 
1031
                warningMsg.append(i18n("Number of files is not equal to number of imported tracks"));
 
1032
                warningMsg.append(QString(": %1 != %2\n").arg(numFiles).arg(numTracks));
 
1033
        }
 
1034
        if (!warningMsg.isEmpty()) {
 
1035
                return (QMessageBox::warning(0, i18n("Import Mismatch"),
 
1036
                                                                         warningMsg + i18n("Continue import?"),
 
1037
                                                                         QMessageBox::Ok, QMessageBox::Cancel) ==
 
1038
                                QMessageBox::Ok);
 
1039
        }
 
1040
        return true;
 
1041
}
 
1042
 
 
1043
/**
843
1044
 * Import.
844
1045
 */
845
1046
 
854
1055
                                                                genCfg->importFormatHeaders,
855
1056
                                                                genCfg->importFormatTracks,
856
1057
                                                                genCfg->importFormatIdx);
 
1058
                dialog->setTimeDifferenceCheck(genCfg->enableTimeDifferenceCheck,
 
1059
                                                                           genCfg->maxTimeDifference);
857
1060
                dialog->setFreedbConfig(freedbCfg);
858
1061
                if (dialog->exec() == QDialog::Accepted) {
859
 
#if QT_VERSION >= 300
860
 
                        QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
861
 
#else
862
 
                        QApplication::setOverrideCursor(QCursor(WaitCursor));
863
 
#endif
864
 
                        slotStatusMsg(i18n("Import..."));
865
 
                        StandardTags st, st_hdr;
866
 
                        Mp3File *mp3file = view->mp3ListBox->first();
867
 
                        bool no_selection = view->numFilesSelected() == 0;
868
 
                        bool start = true;
869
 
                        st_hdr.setInactive();
870
 
                        (void)dialog->parseHeader(st_hdr);
871
1062
                        genCfg->importDestV1 = dialog->getDestV1();
872
1063
                        QString name, header, track;
873
1064
                        genCfg->importFormatIdx = dialog->getImportFormat(name, header, track);
874
1065
                        genCfg->importFormatNames[genCfg->importFormatIdx] = name;
875
1066
                        genCfg->importFormatHeaders[genCfg->importFormatIdx] = header;
876
1067
                        genCfg->importFormatTracks[genCfg->importFormatIdx] = track;
 
1068
                        dialog->getTimeDifferenceCheck(genCfg->enableTimeDifferenceCheck,
 
1069
                                                                                   genCfg->maxTimeDifference);
877
1070
                        dialog->getFreedbConfig(freedbCfg);
878
 
                        while (mp3file != 0) {
879
 
                                mp3file->readTags(false);
880
 
                                if (genCfg->importDestV1) {
881
 
                                        mp3file->getStandardTagsV1(&st);
882
 
                                } else {
883
 
                                        mp3file->getStandardTagsV2(&st);
884
 
                                }
885
 
                                st_hdr.copyActiveTags(st);
886
 
                                if (!dialog->getNextTags(st, start))
887
 
                                        break;
888
 
                                start = false;
889
 
                                if (genCfg->importDestV1) {
890
 
                                        mp3file->setStandardTagsV1(&st);
891
 
                                } else {
892
 
                                        mp3file->setStandardTagsV2(&st);
893
 
                                }
894
 
                                mp3file = view->mp3ListBox->next();
895
 
                        }
896
 
                        if (!no_selection) {
897
 
                                StandardTags st; // empty
898
 
                                view->setStandardTagsV1(&st);
899
 
                                view->setStandardTagsV2(&st);
900
 
                                view->nameLineEdit->setEnabled(FALSE);
901
 
                                fileSelected();
902
 
                        }
903
 
                        else {
904
 
                                updateModificationState();
905
 
                        }
906
 
                        slotStatusMsg(i18n("Ready."));
907
 
                        QApplication::restoreOverrideCursor();
 
1071
                        StandardTags st_hdr;
 
1072
                        st_hdr.setInactive();
 
1073
                        (void)dialog->parseHeader(st_hdr);
 
1074
                        if (!genCfg->enableTimeDifferenceCheck ||
 
1075
                                checkDuration(dialog->getTrackDurations(), genCfg->maxTimeDifference)) {
 
1076
#if QT_VERSION >= 300
 
1077
                                QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 
1078
#else
 
1079
                                QApplication::setOverrideCursor(QCursor(WaitCursor));
 
1080
#endif
 
1081
                                slotStatusMsg(i18n("Import..."));
 
1082
                                StandardTags st;
 
1083
                                bool start = true;
 
1084
                                bool no_selection = view->numFilesSelected() == 0;
 
1085
                                Mp3File *mp3file = view->mp3ListBox->first();
 
1086
                                while (mp3file != 0) {
 
1087
                                        mp3file->readTags(false);
 
1088
                                        if (genCfg->importDestV1) {
 
1089
                                                mp3file->getStandardTagsV1(&st);
 
1090
                                        } else {
 
1091
                                                mp3file->getStandardTagsV2(&st);
 
1092
                                        }
 
1093
                                        st_hdr.copyActiveTags(st);
 
1094
                                        if (!dialog->getNextTags(st, start))
 
1095
                                                break;
 
1096
                                        start = false;
 
1097
                                        if (genCfg->importDestV1) {
 
1098
                                                mp3file->setStandardTagsV1(&st);
 
1099
                                        } else {
 
1100
                                                mp3file->setStandardTagsV2(&st);
 
1101
                                        }
 
1102
                                        mp3file = view->mp3ListBox->next();
 
1103
                                }
 
1104
                                if (!no_selection) {
 
1105
                                        StandardTags st; // empty
 
1106
                                        view->setStandardTagsV1(&st);
 
1107
                                        view->setStandardTagsV2(&st);
 
1108
                                        view->nameLineEdit->setEnabled(FALSE);
 
1109
                                        fileSelected();
 
1110
                                }
 
1111
                                else {
 
1112
                                        updateModificationState();
 
1113
                                }
 
1114
                                slotStatusMsg(i18n("Ready."));
 
1115
                                QApplication::restoreOverrideCursor();
 
1116
                        }
908
1117
                }
909
1118
                delete dialog;
910
1119
        }
971
1180
}
972
1181
 
973
1182
/**
 
1183
 * Rename directory.
 
1184
 */
 
1185
void Kid3App::slotRenameDirectory(void)
 
1186
{
 
1187
        if (saveModified()) {
 
1188
                QString caption(i18n("Rename Directory"));
 
1189
                RenDirDialog *dialog =
 
1190
                        new RenDirDialog(NULL, caption, view->mp3ListBox->first(),
 
1191
                                                         miscCfg->dirFormatItem, miscCfg->dirFormatText);
 
1192
                if (dialog) {
 
1193
                        if (dialog->exec() == QDialog::Accepted) {
 
1194
                                Mp3File *mp3file = view->mp3ListBox->first();
 
1195
                                QString errorMsg;
 
1196
                                bool again = false;
 
1197
                                while (mp3file &&
 
1198
                                           dialog->performAction(mp3file, again, &errorMsg)) {
 
1199
                                        mp3file = view->mp3ListBox->next();
 
1200
                                }
 
1201
                                openDirectory(dialog->getNewDirname());
 
1202
                                if (again) {
 
1203
                                        mp3file = view->mp3ListBox->first();
 
1204
                                        while (mp3file &&
 
1205
                                                   dialog->performAction(mp3file, again, &errorMsg)) {
 
1206
                                                mp3file = view->mp3ListBox->next();
 
1207
                                        }
 
1208
                                        openDirectory(dialog->getNewDirname());
 
1209
                                }
 
1210
                                miscCfg->dirFormatItem = dialog->getFormatItem();
 
1211
                                miscCfg->dirFormatText = dialog->getFormatText();
 
1212
                                if (!errorMsg.isEmpty()) {
 
1213
                                        QMessageBox::warning(0, i18n("File Error"),
 
1214
                                                                                 i18n("Error while renaming:\n") +
 
1215
                                                                                 errorMsg,
 
1216
                                                                                 QMessageBox::Ok, QMessageBox::NoButton);
 
1217
                                }
 
1218
                        }
 
1219
                }
 
1220
        }
 
1221
}
 
1222
 
 
1223
/**
974
1224
 * Open directory on drop.
975
1225
 *
976
1226
 * @param txt URL of directory or file in directory
978
1228
 
979
1229
void Kid3App::openDrop(QString txt)
980
1230
{
 
1231
        int lfPos = txt.find('\n');
 
1232
        if (lfPos > 0 && lfPos < (int)txt.length() - 1) {
 
1233
                txt.truncate(lfPos + 1);
 
1234
        }
981
1235
        QUrl url(txt);
982
1236
        if (url.hasPath()) {
983
1237
                QString dir = url.path().stripWhiteSpace();
1111
1365
                framelist->setTags(single_v2_file);
1112
1366
                view->nameLineEdit->setEnabled(TRUE);
1113
1367
                view->nameLineEdit->setText(single_v2_file->getFilename());
 
1368
                view->detailsLabel->setText(single_v2_file->getDetailInfo());
1114
1369
        }
1115
1370
        else {
1116
1371
                framelist->clear();
1117
1372
                view->nameLineEdit->setEnabled(FALSE);
 
1373
                view->detailsLabel->setText("");
1118
1374
        }
1119
1375
}
1120
1376
 
1183
1439
                }
1184
1440
                mp3file = view->mp3ListBox->next();
1185
1441
        }
 
1442
        if (multiselect) {
 
1443
                // update controls with filtered data
 
1444
                fileSelected();
 
1445
        }
1186
1446
}
1187
1447
 
1188
1448
/**
1215
1475
                }
1216
1476
                mp3file = view->mp3ListBox->next();
1217
1477
        }
 
1478
        if (multiselect) {
 
1479
                // update controls with filtered data
 
1480
                fileSelected();
 
1481
        }
1218
1482
}
1219
1483
 
1220
1484
/**
1275
1539
                        }
1276
1540
                        mp3file = view->mp3ListBox->next();
1277
1541
                }
 
1542
                // update controls with filtered data
 
1543
                fileSelected();
1278
1544
        }
1279
1545
        else {
1280
1546
                view->getStandardTagsV1(&st);
1298
1564
                        }
1299
1565
                        mp3file = view->mp3ListBox->next();
1300
1566
                }
 
1567
                // update controls with filtered data
 
1568
                fileSelected();
1301
1569
        }
1302
1570
        else {
1303
1571
                view->getStandardTagsV2(&st);