diff -u -p -r k3b-1.0/ChangeLog k3b/ChangeLog --- k3b-1.0/ChangeLog 2007-03-16 20:04:36.000000000 +0100 +++ k3b/ChangeLog 2007-03-20 11:34:23.000000000 +0100 @@ -1,3 +1,10 @@ +1.0.1 +===== + * Fixed crash when using the Device menu without a selected device. + * Fixed DVD copy when reading from a DVD+RW. + * Fixed --without-alsa configure check + * Fixed a crash in Video DVD ripping when the title does not contain an audio stream + 1.0 === * K3b now includes a VideoDVD kio slave. It can be used in Konqueror through the protocol videodvd:/ diff -u -p -r k3b-1.0/Makefile.am k3b/Makefile.am --- k3b-1.0/Makefile.am 2007-03-16 20:18:54.000000000 +0100 +++ k3b/Makefile.am 2007-03-20 11:34:23.000000000 +0100 @@ -8,4 +8,4 @@ AUTOMAKE_OPTIONS = foreign 1.5 #include admin/deps.am -SUBDIRS = doc libk3bdevice libk3b src kioslaves plugins kfile-plugins $(K3BSETUPDIR) +SUBDIRS = libk3bdevice libk3b src kioslaves plugins kfile-plugins $(K3BSETUPDIR) diff -u -p -r k3b-1.0/libk3b/core/k3bcore.h k3b/libk3b/core/k3bcore.h --- k3b-1.0/libk3b/core/k3bcore.h 2007-03-16 20:32:39.000000000 +0100 +++ k3b/libk3b/core/k3bcore.h 2007-03-20 11:34:08.000000000 +0100 @@ -1,6 +1,6 @@ /* * - * $Id: k3bcore.h 619556 2007-01-03 17:38:12Z trueg $ + * $Id: k3bcore.h 644121 2007-03-19 10:08:21Z trueg $ * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org> * * This file is part of the K3b project. @@ -23,7 +23,7 @@ #include "k3b_export.h" -#define LIBK3B_VERSION "1.0" +#define LIBK3B_VERSION "1.0.1svn" #define k3bcore K3bCore::k3bCore() diff -u -p -r k3b-1.0/libk3b/jobs/k3bdvdcopyjob.cpp /home/lmontel/kde4/k3b/libk3b/jobs/k3bdvdcopyjob.cpp --- k3b-1.0/libk3b/jobs/k3bdvdcopyjob.cpp 2007-03-16 20:04:34.000000000 +0100 +++ k3b/libk3b/jobs/k3bdvdcopyjob.cpp 2007-03-20 11:34:20.000000000 +0100 @@ -1,6 +1,6 @@ /* * - * $Id: k3bdvdcopyjob.cpp 627609 2007-01-27 11:22:24Z trueg $ + * $Id: k3bdvdcopyjob.cpp 644121 2007-03-19 10:08:21Z trueg $ * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org> * * This file is part of the K3b project. @@ -44,7 +44,7 @@ class K3bDvdCopyJob::Private { public: - Private() + Private() : doneCopies(0), running(false), canceled(false), @@ -118,7 +118,7 @@ void K3bDvdCopyJob::start() emit newTask( i18n("Checking Source Medium") ); - if( m_onTheFly && + if( m_onTheFly && k3bcore->externalBinManager()->binObject( "growisofs" )->version < K3bVersion( 5, 12 ) ) { m_onTheFly = false; emit infoMessage( i18n("K3b does not support writing on-the-fly with growisofs %1.") @@ -213,7 +213,7 @@ void K3bDvdCopyJob::slotDiskInfoReady( K case K3bDevice::MEDIA_DVD_R_DL_SEQ: case K3bDevice::MEDIA_DVD_R_DL_JUMP: if( !m_onlyCreateImage ) { - if( dh->diskInfo().numLayers() > 1 && + if( dh->diskInfo().numLayers() > 1 && dh->diskInfo().size().mode1Bytes() > 4700372992LL ) { if( !(m_writerDevice->type() & (K3bDevice::DEVICE_DVD_R_DL|K3bDevice::DEVICE_DVD_PLUS_R_DL)) ) { emit infoMessage( i18n("The writer does not support writing Double Layer DVD."), ERROR ); @@ -222,7 +222,7 @@ void K3bDvdCopyJob::slotDiskInfoReady( K return; } // FIXME: check for growisofs 5.22 (or whatever version is needed) for DVD-R DL - else if( k3bcore->externalBinManager()->binObject( "growisofs" ) && + else if( k3bcore->externalBinManager()->binObject( "growisofs" ) && k3bcore->externalBinManager()->binObject( "growisofs" )->version < K3bVersion( 5, 20 ) ) { emit infoMessage( i18n("Growisofs >= 5.20 is needed to write Double Layer DVD+R."), ERROR ); d->running = false; @@ -248,7 +248,7 @@ void K3bDvdCopyJob::slotDiskInfoReady( K // writable space in DAO mode // with version >= 5.15 growisofs supports specifying the size of the track if( m_writingMode != K3b::DAO || !m_onTheFly || m_onlyCreateImage || - ( k3bcore->externalBinManager()->binObject( "growisofs" ) && + ( k3bcore->externalBinManager()->binObject( "growisofs" ) && k3bcore->externalBinManager()->binObject( "growisofs" )->version >= K3bVersion( 5, 15, -1 ) ) ) { d->lastSector = dh->toc().lastSector(); break; @@ -264,7 +264,7 @@ void K3bDvdCopyJob::slotDiskInfoReady( K K3bIso9660 isoF( m_readerDevice, 0 ); if( isoF.open() ) { - d->lastSector = ((long long)isoF.primaryDescriptor().logicalBlockSize*isoF.primaryDescriptor().volumeSpaceSize)/2048LL; + d->lastSector = ((long long)isoF.primaryDescriptor().logicalBlockSize*isoF.primaryDescriptor().volumeSpaceSize)/2048LL - 1; } else { emit infoMessage( i18n("Unable to determine the ISO9660 filesystem size."), ERROR ); @@ -294,7 +294,7 @@ void K3bDvdCopyJob::slotDiskInfoReady( K // Check the image path // QFileInfo fi( m_imagePath ); - if( !fi.isFile() || + if( !fi.isFile() || questionYesNo( i18n("Do you want to overwrite %1?").arg(m_imagePath), i18n("File Exists") ) ) { if( fi.isDir() ) @@ -404,7 +404,7 @@ void K3bDvdCopyJob::prepareReader() connect( d->dataTrackReader, SIGNAL(finished(bool)), this, SLOT(slotReaderFinished(bool)) ); connect( d->dataTrackReader, SIGNAL(infoMessage(const QString&, int)), this, SIGNAL(infoMessage(const QString&, int)) ); connect( d->dataTrackReader, SIGNAL(newTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( d->dataTrackReader, SIGNAL(debuggingOutput(const QString&, const QString&)), + connect( d->dataTrackReader, SIGNAL(debuggingOutput(const QString&, const QString&)), this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); } @@ -415,7 +415,7 @@ void K3bDvdCopyJob::prepareReader() if( m_onTheFly && !m_onlyCreateImage ) d->inPipe.writeToFd( d->writerJob->fd(), true ); - else + else d->inPipe.writeToIODevice( &d->imageFile ); d->inPipe.open( true ); @@ -440,7 +440,7 @@ void K3bDvdCopyJob::prepareWriter() connect( d->writerJob, SIGNAL(finished(bool)), this, SLOT(slotWriterFinished(bool)) ); // connect( d->writerJob, SIGNAL(newTask(const QString&)), this, SIGNAL(newTask(const QString&)) ); connect( d->writerJob, SIGNAL(newSubTask(const QString&)), this, SIGNAL(newSubTask(const QString&)) ); - connect( d->writerJob, SIGNAL(debuggingOutput(const QString&, const QString&)), + connect( d->writerJob, SIGNAL(debuggingOutput(const QString&, const QString&)), this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); // these do only make sense with DVD-R(W) @@ -448,7 +448,7 @@ void K3bDvdCopyJob::prepareWriter() d->writerJob->setBurnSpeed( m_speed ); d->writerJob->setWritingMode( d->usedWritingMode ); d->writerJob->setCloseDvd( true ); - + // // In case the first layer size is not known let the // split be determined by growisofs @@ -461,7 +461,7 @@ void K3bDvdCopyJob::prepareWriter() // this is only used in DAO mode with growisofs >= 5.15 d->writerJob->setTrackSize( d->lastSector.lba()+1 ); } - + d->writerJob->setImageToWrite( QString::null ); // write to stdin } @@ -520,7 +520,7 @@ void K3bDvdCopyJob::slotReaderFinished( // already finished? if( !d->running ) return; - + if( d->canceled ) { removeImageFiles(); emit canceled(); @@ -551,9 +551,9 @@ void K3bDvdCopyJob::slotReaderFinished( emit newTask( i18n("Writing DVD copy %1").arg(d->doneCopies+1) ); else emit newTask( i18n("Writing DVD copy") ); - + emit burning(true); - + d->writerRunning = true; d->writerJob->start(); d->outPipe.writeToFd( d->writerJob->fd(), true ); @@ -612,9 +612,9 @@ void K3bDvdCopyJob::slotWriterFinished( this, SIGNAL(subPercent(int)) ); connect( d->verificationJob, SIGNAL(finished(bool)), this, SLOT(slotVerificationFinished(bool)) ); - connect( d->verificationJob, SIGNAL(debuggingOutput(const QString&, const QString&)), + connect( d->verificationJob, SIGNAL(debuggingOutput(const QString&, const QString&)), this, SIGNAL(debuggingOutput(const QString&, const QString&)) ); - + } d->verificationJob->setDevice( m_writerDevice ); d->verificationJob->addTrack( 1, d->inPipe.checksum(), d->lastSector+1 ); @@ -647,7 +647,7 @@ void K3bDvdCopyJob::slotWriterFinished( d->running = false; return; } - + if( m_onTheFly ) { prepareReader(); d->readerRunning = true; @@ -696,7 +696,7 @@ void K3bDvdCopyJob::slotVerificationFini d->running = false; return; } - + if( m_onTheFly ) { prepareReader(); d->readerRunning = true; @@ -741,7 +741,7 @@ bool K3bDvdCopyJob::waitForDvd() cancel(); return false; } - + if( m == 0 ) { emit infoMessage( i18n("Forced by user. Growisofs will be called without further tests."), INFO ); } @@ -766,7 +766,7 @@ bool K3bDvdCopyJob::waitForDvd() // m_simulate = false; emit newTask( i18n("Writing DVD copy") ); } - + if( m_writingMode != K3b::WRITING_MODE_AUTO && m_writingMode != K3b::WRITING_MODE_RES_OVWR ) emit infoMessage( i18n("Writing mode ignored when writing DVD+R(W) media."), INFO ); @@ -802,9 +802,9 @@ bool K3bDvdCopyJob::waitForDvd() // if this size is wrong // With growisofs 5.15 we have the option to specify the size of the image to be written in DAO mode. // -// bool sizeWithDao = ( k3bcore->externalBinManager()->binObject( "growisofs" ) && +// bool sizeWithDao = ( k3bcore->externalBinManager()->binObject( "growisofs" ) && // k3bcore->externalBinManager()->binObject( "growisofs" )->version >= K3bVersion( 5, 15, -1 ) ); - + // TODO: check for feature 0x21 @@ -876,8 +876,8 @@ QString K3bDvdCopyJob::jobDescription() QString K3bDvdCopyJob::jobDetails() const { - return i18n("Creating 1 copy", - "Creating %n copies", + return i18n("Creating 1 copy", + "Creating %n copies", (m_simulate||m_onlyCreateImage) ? 1 : m_copies ); } diff -u -p -r k3b-1.0/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp /home/lmontel/kde4/k3b/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp --- k3b-1.0/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp 2007-03-16 20:04:34.000000000 +0100 +++ k3b/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp 2007-03-20 11:34:20.000000000 +0100 @@ -1,4 +1,4 @@ -/* +/* * * $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $ * Copyright (C) 2006 Sebastian Trueg <trueg@k3b.org> @@ -56,7 +56,7 @@ K3bVideoDVDTitleTranscodingJob::K3bVideo m_width( 0 ), m_height( 0 ), m_titleNumber( 1 ), - m_audioStreamIndex( 0 ), + m_audioStreamIndex( 0 ), m_videoCodec( VIDEO_CODEC_FFMPEG_MPEG4 ), m_audioCodec( AUDIO_CODEC_MP3 ), m_videoBitrate( 1800 ), @@ -157,7 +157,7 @@ void K3bVideoDVDTitleTranscodingJob::sta case VIDEO_CODEC_FFMPEG_MPEG4: videoCodecString = "ffmpeg"; break; - + default: emit infoMessage( i18n("Invalid Video codec set: %1").arg(m_videoCodec), ERROR ); jobFinished( false ); @@ -218,7 +218,8 @@ void K3bVideoDVDTitleTranscodingJob::sta *d->process << "-T" << QString("%1,-1,1").arg( m_titleNumber ); // select the audio stream to extract - *d->process << "-a" << QString::number( m_audioStreamIndex ); + if ( m_dvd[m_titleNumber-1].numAudioStreams() > 0 ) + *d->process << "-a" << QString::number( m_audioStreamIndex ); // clipping *d->process << "-j" << QString("%1,%2,%3,%4") @@ -251,7 +252,7 @@ void K3bVideoDVDTitleTranscodingJob::sta if( m_resampleAudio ) *d->process << "-E" << "44100"; } - + // the output filename *d->process << "-o" << m_filename; } @@ -431,15 +432,15 @@ void K3bVideoDVDTitleTranscodingJob::slo jobFinished( true ); } break; - + default: // FIXME: error handling emit infoMessage( i18n("%1 returned an unknown error (code %2).") - .arg(d->usedTranscodeBin->name()).arg(p->exitStatus()), + .arg(d->usedTranscodeBin->name()).arg(p->exitStatus()), K3bJob::ERROR ); emit infoMessage( i18n("Please send me an email with the last output."), K3bJob::ERROR ); - + cleanup( false ); jobFinished( false ); } diff -u -p -r k3b-1.0/plugins/audiooutput/alsa/configure.in.in /home/lmontel/kde4/k3b/plugins/audiooutput/alsa/configure.in.in --- k3b-1.0/plugins/audiooutput/alsa/configure.in.in 2007-03-16 20:03:44.000000000 +0100 +++ k3b/plugins/audiooutput/alsa/configure.in.in 2007-03-20 11:33:33.000000000 +0100 @@ -5,8 +5,6 @@ AC_DEFUN([KDE_CHECK_ALSA], PKG_CHECK_MODULES([ALSA], [alsa >= 0.9], [have_alsa=yes], [have_alsa=no]) AC_SUBST([ALSA_CFLAGS]) AC_SUBST([ALSA_LIBS]) - - AM_CONDITIONAL(include_ALSA, [test "x$have_alsa" = "xyes"]) ]) AC_ARG_WITH(alsa, @@ -23,4 +21,6 @@ if test "x$with_alsa" != xno; then fi fi +AM_CONDITIONAL(include_ALSA, [test "x$have_alsa" = "xyes"]) + dnl --------- ALSA CHECK END --------------- diff -u -p -r k3b-1.0/plugins/decoder/ffmpeg/configure.in.in /home/lmontel/kde4/k3b/plugins/decoder/ffmpeg/configure.in.in --- k3b-1.0/plugins/decoder/ffmpeg/configure.in.in 2007-03-16 20:03:45.000000000 +0100 +++ k3b/plugins/decoder/ffmpeg/configure.in.in 2007-03-20 11:33:34.000000000 +0100 @@ -33,7 +33,7 @@ if test "$ac_cv_use_ffmpeg" = "yes"; the }, [ffmpeg_compiles=yes], [ffmpeg_compiles=no] ) OLD_LIBS=$LIBS - LIBS="-lavformat -lavcodec $LIBS" + LIBS="-lavformat -lavcodec -ldl $LIBS" AC_LINK_IFELSE( extern "C" { #include <ffmpeg/avformat.h> diff -u -p -r k3b-1.0/src/k3bappdevicemanager.cpp /home/lmontel/kde4/k3b/src/k3bappdevicemanager.cpp --- k3b-1.0/src/k3bappdevicemanager.cpp 2007-03-16 20:04:17.000000000 +0100 +++ k3b/src/k3bappdevicemanager.cpp 2007-03-20 11:34:04.000000000 +0100 @@ -1,4 +1,4 @@ -/* +/* * * $Id: sourceheader 380067 2005-01-19 13:03:46Z trueg $ * Copyright (C) 2005 Sebastian Trueg <trueg@k3b.org> @@ -186,28 +186,33 @@ void K3bAppDeviceManager::lockDevice() void K3bAppDeviceManager::mountDisk() { - // FIXME: make this non-blocking - if( !K3b::isMounted( currentDevice() ) ) - K3b::mount( currentDevice() ); - - emit mountFinished( KIO::findDeviceMountPoint( currentDevice()->blockDeviceName() ) ); + if ( currentDevice() ) { + // FIXME: make this non-blocking + if( !K3b::isMounted( currentDevice() ) ) + K3b::mount( currentDevice() ); + + emit mountFinished( KIO::findDeviceMountPoint( currentDevice()->blockDeviceName() ) ); + } } void K3bAppDeviceManager::unmountDisk() { - // FIXME: make this non-blocking - if( K3b::isMounted( currentDevice() ) ) - emit unmountFinished( K3b::unmount( currentDevice() ) ); - else - emit unmountFinished( true ); + if ( currentDevice() ) { + // FIXME: make this non-blocking + if( K3b::isMounted( currentDevice() ) ) + emit unmountFinished( K3b::unmount( currentDevice() ) ); + else + emit unmountFinished( true ); + } } void K3bAppDeviceManager::ejectDisk() { // FIXME: make this non-blocking - K3b::eject( currentDevice() ); // just ignore errors here + if ( currentDevice() ) + K3b::eject( currentDevice() ); // just ignore errors here } diff -u -p -r k3b-1.0/src/k3bapplication.cpp /home/lmontel/kde4/k3b/src/k3bapplication.cpp --- k3b-1.0/src/k3bapplication.cpp 2007-03-16 20:04:17.000000000 +0100 +++ k3b/src/k3bapplication.cpp 2007-03-20 11:34:04.000000000 +0100 @@ -1,6 +1,6 @@ /* * - * $Id: k3bapplication.cpp 642792 2007-03-15 12:18:00Z trueg $ + * $Id: k3bapplication.cpp 644530 2007-03-20 10:19:12Z trueg $ * Copyright (C) 2003-2007 Sebastian Trueg <trueg@k3b.org> * * This file is part of the K3b project. @@ -153,6 +153,10 @@ void K3bApplication::init() if( processCmdLineArgs() ) KTipDialog::showTip( m_mainWindow ); } + + // write the current version to make sure checks such as K3bSystemProblemDialog::readCheckSystemConfig + // use a proper value + generalOptions.writeEntry( "config version", m_core->version() ); } @@ -401,8 +405,6 @@ void K3bApplication::Core::saveSettings( K3bCore::saveSettings( cnf ); m_themeManager->saveConfig( cnf ); - - KConfigGroup( cnf, "General Options" ).writeEntry( "config version", version() ); } diff -u -p -r k3b-1.0/src/k3bthememanager.cpp /home/lmontel/kde4/k3b/src/k3bthememanager.cpp --- k3b-1.0/src/k3bthememanager.cpp 2007-03-16 20:35:24.000000000 +0100 +++ k3b/src/k3bthememanager.cpp 2007-03-20 11:34:04.000000000 +0100 @@ -200,7 +200,7 @@ void K3bThemeManager::readConfig( KConfi QString defaultTheme = generalOptions.readEntry( "default theme", "quant" ); K3bVersion configVersion( generalOptions.readEntry( "config version", "0.1" ) ); - if( configVersion >= K3bVersion("1.0") ) + if( configVersion >= K3bVersion("0.98") ) setCurrentTheme( generalOptions.readEntry( "current theme", defaultTheme ) ); else setCurrentTheme( defaultTheme ); diff -u -p -r k3b-1.0/src/projects/k3bvideodvdview.cpp /home/lmontel/kde4/k3b/src/projects/k3bvideodvdview.cpp --- k3b-1.0/src/projects/k3bvideodvdview.cpp 2007-03-16 20:04:05.000000000 +0100 +++ k3b/src/projects/k3bvideodvdview.cpp 2007-03-20 11:33:56.000000000 +0100 @@ -1,6 +1,6 @@ -/* +/* * - * $Id: k3bvideodvdview.cpp 619556 2007-01-03 17:38:12Z trueg $ + * $Id: k3bvideodvdview.cpp 644513 2007-03-20 09:07:44Z trueg $ * Copyright (C) 2005 Sebastian Trueg <trueg@k3b.org> * * This file is part of the K3b project. @@ -18,6 +18,7 @@ #include "k3bvideodvdburndialog.h" #include "k3bdatadirtreeview.h" #include "k3bdatafileview.h" +#include "k3bdataurladdingdialog.h" #include <k3bfillstatusdisplay.h> #include <k3bdatafileview.h> #include <k3btoolbox.h> @@ -74,5 +75,10 @@ void K3bVideoDvdView::init() "video_dvd_restrictions" ); } -//#include "k3bvideodvdview.moc" + +void K3bVideoDvdView::addUrls( const KURL::List& urls ) +{ + K3bDataUrlAddingDialog::addUrls( urls, m_dataFileView->currentDir() ); +} + #include "k3bvideodvdview.moc" diff -u -p -r k3b-1.0/src/projects/k3bvideodvdview.h /home/lmontel/kde4/k3b/src/projects/k3bvideodvdview.h --- k3b-1.0/src/projects/k3bvideodvdview.h 2007-03-16 20:04:05.000000000 +0100 +++ k3b/src/projects/k3bvideodvdview.h 2007-03-20 11:33:56.000000000 +0100 @@ -1,6 +1,6 @@ /* * - * $Id: k3bvideodvdview.h 619556 2007-01-03 17:38:12Z trueg $ + * $Id: k3bvideodvdview.h 644513 2007-03-20 09:07:44Z trueg $ * Copyright (C) 2005 Sebastian Trueg <trueg@k3b.org> * * This file is part of the K3b project. @@ -32,6 +32,8 @@ class K3bVideoDvdView : public K3bView K3bVideoDvdView( K3bVideoDvdDoc* doc, QWidget *parent = 0, const char *name = 0 ); ~K3bVideoDvdView(); + void addUrls( const KURL::List& ); + protected: virtual K3bProjectBurnDialog* newBurnDialog( QWidget* parent = 0, const char* name = 0 ); diff -u -p -r k3b-1.0/src/rip/videodvd/k3bvideodvdrippingdialog.cpp /home/lmontel/kde4/k3b/src/rip/videodvd/k3bvideodvdrippingdialog.cpp --- k3b-1.0/src/rip/videodvd/k3bvideodvdrippingdialog.cpp 2007-03-16 20:04:16.000000000 +0100 +++ k3b/src/rip/videodvd/k3bvideodvdrippingdialog.cpp 2007-03-20 11:34:03.000000000 +0100 @@ -1,4 +1,4 @@ -/* +/* * * $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $ * Copyright (C) 2006 Sebastian Trueg <trueg@k3b.org> @@ -107,7 +107,7 @@ static QSize resizeTitle( const K3bVideo else if( h == 0 ) { h = w * rh / rw; } - + return QSize(w,h); } @@ -117,7 +117,7 @@ class K3bVideoDVDRippingDialog::AudioStr { public: AudioStreamViewItem( K3bVideoDVDRippingDialog* dlg, - QCheckListItem* parent, QListViewItem* after, const QString& text, + QCheckListItem* parent, QListViewItem* after, const QString& text, int audioStream ) : QCheckListItem( parent, after, text, RadioButton ), m_audioStream( audioStream ), @@ -144,7 +144,7 @@ public: }; -K3bVideoDVDRippingDialog::K3bVideoDVDRippingDialog( const K3bVideoDVD::VideoDVD& dvd, +K3bVideoDVDRippingDialog::K3bVideoDVDRippingDialog( const K3bVideoDVD::VideoDVD& dvd, const QValueList<int>& titles, QWidget* parent, const char* name ) : K3bInteractionDialog( parent, name, @@ -152,7 +152,7 @@ K3bVideoDVDRippingDialog::K3bVideoDVDRip QString::null, START_BUTTON|CANCEL_BUTTON, START_BUTTON, - "VideoDVD Ripping" ), // config group + "VideoDVD Ripping" ), // config group m_dvd( dvd ) { d = new Private; @@ -170,7 +170,7 @@ K3bVideoDVDRippingDialog::K3bVideoDVDRip connect( m_w, SIGNAL(changed()), this, SLOT(slotUpdateVideoSizes()) ); - setTitle( i18n("Video DVD Ripping"), + setTitle( i18n("Video DVD Ripping"), i18n("1 title from %1", "%n titles from %1", titles.count()) .arg( k3bappcore->mediaCache()->medium(m_dvd.device()).beautifiedVolumeId() ) ); @@ -192,7 +192,7 @@ void K3bVideoDVDRippingDialog::populateT QCheckListItem* titleItem = 0; for( QValueList<int>::const_iterator it = titles.begin(); it != titles.end(); ++it ) { - titleItem = new QCheckListItem( m_w->m_titleView, + titleItem = new QCheckListItem( m_w->m_titleView, titleItem, i18n("Title %1 (%2)") .arg(*it) @@ -212,7 +212,7 @@ void K3bVideoDVDRippingDialog::populateT // ri.audioStream = 0; for( unsigned int i = 0; i < m_dvd[*it-1].numAudioStreams(); ++i ) { - if( m_dvd[*it-1].audioStream(i).langCode() == KGlobal::locale()->language() && + if( m_dvd[*it-1].audioStream(i).langCode() == KGlobal::locale()->language() && m_dvd[*it-1].audioStream(i).format() != K3bVideoDVD::AUDIO_FORMAT_DTS ) { ri.audioStream = i; break; @@ -227,7 +227,7 @@ void K3bVideoDVDRippingDialog::populateT .arg( m_dvd[*it-1].audioStream(i).langCode().isEmpty() ? i18n("unknown language") : KGlobal::locale()->twoAlphaToLanguageName( m_dvd[*it-1].audioStream(i).langCode() ) ) - .arg( m_dvd[*it-1].audioStream(i).codeExtension() != K3bVideoDVD::AUDIO_CODE_EXT_UNSPECIFIED + .arg( m_dvd[*it-1].audioStream(i).codeExtension() != K3bVideoDVD::AUDIO_CODE_EXT_UNSPECIFIED ? QString(" ") + K3bVideoDVD::audioCodeExtensionString( m_dvd[*it-1].audioStream(i).codeExtension() ) : QString::null ); @@ -240,7 +240,7 @@ void K3bVideoDVDRippingDialog::populateT } else { asI = new AudioStreamViewItem( this, titleItem, asI, text, i ); - + if( ri.audioStream == (int)i ) ((AudioStreamViewItem*)asI)->setState( QCheckListItem::On ); } @@ -336,19 +336,19 @@ QString K3bVideoDVDRippingDialog::create c = '*'; else { QString keyword = pattern.mid( i+1, j-i-1 ); - if( keyword == "titlenumber" || - keyword == "title_number" || + if( keyword == "titlenumber" || + keyword == "title_number" || keyword == "title" ) { c = PATTERN_TITLE_NUMBER; } - else if( keyword == "volumeid" || - keyword == "volume_id" || - keyword == "volid" || + else if( keyword == "volumeid" || + keyword == "volume_id" || + keyword == "volid" || keyword == "vol_id" ) { c = PATTERN_VOLUME_ID; } - else if( keyword == "beautifiedvolumeid" || - keyword == "beautified_volumeid" || + else if( keyword == "beautifiedvolumeid" || + keyword == "beautified_volumeid" || keyword == "beautified_volume_id" || keyword == "beautifiedvolid" || keyword == "beautified_volid" || @@ -449,7 +449,7 @@ QString K3bVideoDVDRippingDialog::create break; case PATTERN_AUDIO_CHANNELS: if( title.numAudioStreams() > 0 ) - f.append( i18n("%nCh", "%nCh", + f.append( i18n("%nCh", "%nCh", m_w->selectedAudioCodec() == K3bVideoDVDTitleTranscodingJob::AUDIO_CODEC_AC3_PASSTHROUGH ? title.audioStream( info.audioStream ).channels() : 2 ) ); @@ -559,7 +559,8 @@ void K3bVideoDVDRippingDialog::slotStart if( m_w->selectedAudioCodec() == K3bVideoDVDTitleTranscodingJob::AUDIO_CODEC_AC3_PASSTHROUGH ) { for( QMap<QCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo>::iterator it = m_titleRipInfos.begin(); it != m_titleRipInfos.end(); ++it ) { - if( m_dvd[it.data().title-1].audioStream(it.data().audioStream).format() != K3bVideoDVD::AUDIO_FORMAT_AC3 ) { + if( m_dvd[it.data().title-1].numAudioStreams() > 0 && + m_dvd[it.data().title-1].audioStream(it.data().audioStream).format() != K3bVideoDVD::AUDIO_FORMAT_AC3 ) { KMessageBox::sorry( this, i18n("<p>When using the <em>AC3 pass-through</em> audio codec all selected audio " "streams need to be in AC3 format. Please select another audio codec or " "choose AC3 audio streams for all ripped titles."), @@ -578,7 +579,7 @@ void K3bVideoDVDRippingDialog::slotStart } if( !filesToOverwrite.isEmpty() ) - if( KMessageBox::questionYesNoList( this, + if( KMessageBox::questionYesNoList( this, i18n("Do you want to overwrite these files?"), filesToOverwrite, i18n("Files Exist"), i18n("Overwrite"), KStdGuiItem::cancel() ) == KMessageBox::No )