~ubuntu-branches/ubuntu/gutsy/kid3/gutsy

« back to all changes in this revision

Viewing changes to kid3/id3form.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Sarah Hobbs
  • Date: 2006-07-14 12:25:16 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060714122516-p2wk0iyzumu6jx42
Tags: 0.7-1ubuntu1
Merge from debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
215
215
        idV1GroupBoxLayout->addWidget(commentV1CheckBox, 3, 0);
216
216
 
217
217
        commentV1LineEdit = new QLineEdit(idV1GroupBox, "commentV1LineEdit");
218
 
        commentV1LineEdit->setMaxLength(29);
 
218
        commentV1LineEdit->setMaxLength(28);
219
219
        idV1GroupBoxLayout->addWidget(commentV1LineEdit, 3, 1);
220
220
 
221
221
        pasteV1PushButton = new QPushButton(idV1GroupBox, "pasteV1PushButton");
317
317
        idV2GroupBoxLayout->addWidget(genreV2CheckBox, 5, 0);
318
318
 
319
319
        genreV2ComboBox = new QComboBox(FALSE, idV2GroupBox, "genreV2ComboBox");
 
320
        genreV2ComboBox->setEditable(true);
 
321
        genreV2ComboBox->setAutoCompletion(true);
 
322
        genreV2ComboBox->setDuplicatesEnabled(false);
320
323
        idV2GroupBoxLayout->addWidget(genreV2ComboBox, 5, 1);
321
324
 
322
325
        framesTextLabel = new QLabel(idV2GroupBox, "framesTextLabel");
585
588
        st->track   = trackV2CheckBox->isChecked()   ? trackV2SpinBox->value()
586
589
                : -1;
587
590
        st->genre   = genreV2CheckBox->isChecked()   ?
588
 
                genreV2ComboBox->currentItem() - 1 : -1;
589
 
        st->genre   = genreV2CheckBox->isChecked()   ?
590
591
                Genres::getNumber(genreV2ComboBox->currentItem()) : -1;
 
592
        st->genreStr = st->genre == 0xff ? genreV2ComboBox->currentText()
 
593
                : QString::null;
591
594
}
592
595
 
593
596
/**
634
637
        trackV2CheckBox->setChecked(st->track >= 0);
635
638
        trackV2SpinBox->setValue(st->track >= 0 ? st->track : 0);
636
639
        genreV2CheckBox->setChecked(st->genre >= 0);
637
 
        genreV2ComboBox->setCurrentItem(st->genre >= 0 ?
638
 
                                                                        Genres::getIndex(st->genre) : 0);
 
640
        int genreIndex = st->genre >= 0 ?       Genres::getIndex(st->genre) : 0;
 
641
        if (genreIndex > 0 || st->genreStr.isEmpty()) {
 
642
                genreV2ComboBox->setCurrentItem(genreIndex);
 
643
        } else {
 
644
                genreV2ComboBox->setCurrentText(st->genreStr);
 
645
        }
639
646
}
640
647
 
641
648
/**
816
823
void id3Form::formatLineEdit(QLineEdit *le, const QString &txt,
817
824
                                                         const FormatConfig *fcfg)
818
825
{
819
 
        if (theApp->miscCfg->formatWhileEditing) {
 
826
        if (fcfg->m_formatWhileEditing) {
820
827
                QString str(txt);
821
828
                fcfg->formatString(str);
822
829
                if (str != txt) {
835
842
void id3Form::dirSelected(QListBoxItem* item) {
836
843
        QDir dir(m_dirListBox->getDirname() + QDir::separator() +
837
844
                                         item->text());
 
845
        m_dirListBox->setEntryToSelect(
 
846
                item->text() == ".." ? QDir(m_dirListBox->getDirname()).dirName() :
 
847
                QString::null);
838
848
        QString dirPath = dir.absPath();
839
849
        if (!dirPath.isEmpty()) {
840
850
                theApp->openDirectory(dirPath, true);