~ubuntu-branches/ubuntu/karmic/kid3/karmic

« back to all changes in this revision

Viewing changes to kid3/flacfile.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2009-05-20 16:12:30 UTC
  • mfrom: (1.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 23.
  • Revision ID: james.westby@ubuntu.com-20090520161230-qetp532r8ydujkz2
Tags: upstream-1.2
Import upstream version 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
                m_pictures.clear();
138
138
                int pictureNr = 0;
139
139
#endif
140
 
                markTag2Changed(false);
 
140
                markTag2Unchanged();
141
141
                m_fileRead = true;
142
142
                QCM_QCString fnIn = QFile::encodeName(getDirInfo()->getDirname() + QDir::separator() + currentFilename());
143
143
                m_fileInfo.read(0); // just to start invalid
339
339
#ifdef HAVE_FLAC_PICTURE
340
340
                if ((commentsSet || pictureSet) &&
341
341
                                m_chain->write(!pictureRemoved, preserve)) {
342
 
                        markTag2Changed(false);
 
342
                        markTag2Unchanged();
343
343
                }
344
344
#else
345
345
                if (commentsSet &&
346
346
                                m_chain->write(true, preserve)) {
347
 
                        markTag2Changed(false);
 
347
                        markTag2Unchanged();
348
348
                }
349
349
#endif
350
350
                else {
395
395
                        if (it != m_pictures.end()) {
396
396
                                *it = frame;
397
397
                                PictureFrame::setDescription(*it, frame.getValue());
398
 
                                markTag2Changed();
 
398
                                markTag2Changed(Frame::FT_Picture);
399
399
                                return true;
400
400
                        }
401
401
                }
421
421
                PictureFrame::setDescription(frame, frame.getValue());
422
422
                frame.setIndex(m_pictures.size());
423
423
                m_pictures.push_back(frame);
424
 
                markTag2Changed();
 
424
                markTag2Changed(Frame::FT_Picture);
425
425
                return true;
426
426
        }
427
427
        return OggFile::addFrameV2(frame);
445
445
                        PictureList::iterator it = m_pictures.at(index);
446
446
                        m_pictures.erase(it);
447
447
#endif
448
 
                        markTag2Changed();
 
448
                        markTag2Changed(Frame::FT_Picture);
449
449
                        return true;
450
450
                }
451
451
        }
461
461
{
462
462
        if (flt.areAllEnabled() || flt.isEnabled(Frame::FT_Picture)) {
463
463
                m_pictures.clear();
464
 
                markTag2Changed();
 
464
                markTag2Changed(Frame::FT_Picture);
465
465
        }
466
466
        OggFile::deleteFramesV2(flt);
467
467
}