Package: k3b
Version: 1.66.0~alpha2-1

With the patch currently included with this version of K3B, normalize-audio 
detection does not work properly (at least tested under current Kubuntu 9.10 
Beta and I assume same would apply for Debian Experimental). 

I have updated the patch to fully rename all references to normalize to 
normalize-audio, including the kconfig read/write sections. Although these may 
not be strictly required, it does make for a more accurate conversion.

As well, I have manually set the version detection to look for 'normalize' and 
not the default which is the program name set (i.e. 'normalize-audio'). As you 
can see below, the normalize package reports the following via the version 
command:

rgreen...@atlantis:~/Source/ninjas/karmic/k3b$ normalize-audio -V
normalize 0.7.7
Copyright (C) 2005 Chris Vaill
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This copy of normalize is compiled with the following libraries:
  MAD  audiofile

The fix is to add this line to the normalize detection, to force it to look for 
normalize and not normalize-audio:

setVersionIdentifier( QLatin1String( "normalize" ) );

This patch has been tested under Kubuntu 9.10 Beta, and was verified to work as 
expected with no noticeable side effects.

Regards,

Rod.
_______________________________________
Roderick B. Greening, B.Sc.
Paradise, NL Canada
E-mail/MSN: roderick.green...@gmail.com 
LP: launchpad.net/~roderick-greening 
Wiki: wiki.ubuntu.com/rgreening 
Blog: roderick-greening.blogspot.com 
Twitter: twitter.com/rgreening
Identica: identi.ca/rgreening
Description: normalize is named "normalize-audio" in Debian.
 Change that everywhere.... for real this time
Reviewed-by: Didier Raboud <did...@raboud.com>
Updated-by: Roderick B. Greening <roderick.green...@gmail.com>
Last-Update: 2009-09-30

--- a/libk3b/core/k3bdefaultexternalprograms.cpp
+++ b/libk3b/core/k3bdefaultexternalprograms.cpp
@@ -388,8 +388,9 @@ K3b::VcdbuilderProgram::VcdbuilderProgra
 
 
 K3b::NormalizeProgram::NormalizeProgram()
-    : K3b::SimpleExternalProgram( "normalize" )
+    : K3b::SimpleExternalProgram( "normalize-audio" )
 {
+    setVersionIdentifier( QLatin1String( "normalize" ) );
 }
 

--- a/libk3b/projects/audiocd/k3baudiodoc.cpp
+++ b/libk3b/projects/audiocd/k3baudiodoc.cpp
@@ -524,7 +524,7 @@
                 return false;
         }
 
-        else if( e.nodeName() == "normalize" )
+        else if( e.nodeName() == "normalize-audio" )
             setNormalize( e.text() == "yes" );
 
         else if( e.nodeName() == "hide_first_track" )
@@ -728,7 +728,7 @@
     saveGeneralDocumentData( docElem );
 
     // add normalize
-    QDomElement normalizeElem = doc.createElement( "normalize" );
+    QDomElement normalizeElem = doc.createElement( "normalize-audio" );
     normalizeElem.appendChild( doc.createTextNode( normalize() ? "yes" : "no" ) );
     docElem->appendChild( normalizeElem );
 
--- a/libk3b/projects/audiocd/k3baudionormalizejob.cpp
+++ b/libk3b/projects/audiocd/k3baudionormalizejob.cpp
@@ -50,10 +50,10 @@ void K3b::AudioNormalizeJob::start()
     connect( m_process, SIGNAL(stderrLine(const QString&)), this, SLOT(slotStdLine(const QString&)) );
     connect( m_process, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotProcessExited(int, QProcess::ExitStatus)) );
 
-    const K3b::ExternalBin* bin = k3bcore->externalBinManager()->binObject( "normalize" );
+    const K3b::ExternalBin* bin = k3bcore->externalBinManager()->binObject( "normalize-audio" );
 
     if( !bin ) {
-        emit infoMessage( i18n("Could not find normalize executable."), MessageError );
+        emit infoMessage( i18n("Could not find normalize-audio executable."), MessageError );
         jobFinished(false);
         return;
     }
@@ -80,8 +80,8 @@ void K3b::AudioNormalizeJob::start()
     if( !m_process->start( KProcess::OnlyStderrChannel ) ) {
         // something went wrong when starting the program
         // it "should" be the executable
-        kDebug() << "(K3b::AudioNormalizeJob) could not start normalize";
-        emit infoMessage( i18n("Could not start normalize."), K3b::Job::MessageError );
+        kDebug() << "(K3b::AudioNormalizeJob) could not start normalize-audio";
+        emit infoMessage( i18n("Could not start normalize-audio."), K3b::Job::MessageError );
         jobFinished(false);
     }
 }
@@ -104,7 +104,7 @@ void K3b::AudioNormalizeJob::slotStdLine
 
     //  emit newSubTask( i18n("Normalizing track %1 of %2 (%3)",t,tt,m_files.at(t-1)) );
 
-    emit debuggingOutput( "normalize", line );
+    emit debuggingOutput( "normalize-audio", line );
 
     // wenn "% done" drin:
     //    wenn ein --% drin ist, so beginnt ein neuer track
@@ -183,7 +183,7 @@ void K3b::AudioNormalizeJob::slotProcess
             break;
         default:
             if( !m_canceled ) {
-                emit infoMessage( i18n("%1 returned an unknown error (code %2).",QString("normalize"), exitCode),
+                emit infoMessage( i18n("%1 returned an unknown error (code %2).",QString("normalize-audio"), exitCode),
                                   K3b::Job::MessageError );
                 emit infoMessage( i18n("Please send me an email with the last output."), K3b::Job::MessageError );
                 emit infoMessage( i18n("Error while normalizing tracks."), MessageError );
--- a/src/k3bprojectmanager.cpp
+++ b/src/k3bprojectmanager.cpp
@@ -293,7 +293,7 @@
 
         audioDoc->writeCdText( c.readEntry( "cd_text", true ) );
         audioDoc->setHideFirstTrack( c.readEntry( "hide_first_track", false ) );
-        audioDoc->setNormalize( c.readEntry( "normalize", false ) );
+        audioDoc->setNormalize( c.readEntry( "normalize-audio", false ) );
         audioDoc->setAudioRippingParanoiaMode( c.readEntry( "paranoia mode", 0 ) );
         audioDoc->setAudioRippingRetries( c.readEntry( "read retries", 128 ) );
         audioDoc->setAudioRippingIgnoreReadErrors( c.readEntry( "ignore read errors", false ) );
@@ -364,7 +364,7 @@
         K3b::MixedDoc* mixedDoc = static_cast<K3b::MixedDoc*>(doc);
 
         mixedDoc->audioDoc()->writeCdText( c.readEntry( "cd_text", true ) );
-        mixedDoc->audioDoc()->setNormalize( c.readEntry( "normalize", false ) );
+        mixedDoc->audioDoc()->setNormalize( c.readEntry( "normalize-audio", false ) );
 
         // load mixed type
         if( c.readEntry( "mixed_type" ) == "last_track" )
--- a/src/projects/k3baudioburndialog.cpp
+++ b/src/projects/k3baudioburndialog.cpp
@@ -186,7 +186,7 @@
 
     m_cdtextWidget->setChecked( c.readEntry( "cd_text", true ) );
     m_checkHideFirstTrack->setChecked( c.readEntry( "hide_first_track", false ) );
-    m_checkNormalize->setChecked( c.readEntry( "normalize", false ) );
+    m_checkNormalize->setChecked( c.readEntry( "normalize-audio", false ) );
 
     m_comboParanoiaMode->setCurrentIndex( c.readEntry( "paranoia mode", 0 ) );
     m_checkAudioRippingIgnoreReadErrors->setChecked( c.readEntry( "ignore read errors", true ) );
@@ -202,7 +202,7 @@
 
     c.writeEntry( "cd_text", m_cdtextWidget->isChecked() );
     c.writeEntry( "hide_first_track", m_checkHideFirstTrack->isChecked() );
-    c.writeEntry( "normalize", m_checkNormalize->isChecked() );
+    c.writeEntry( "normalize-audio", m_checkNormalize->isChecked() );
 
     c.writeEntry( "paranoia mode", m_comboParanoiaMode->currentText() );
     c.writeEntry( "ignore read errors", m_checkAudioRippingIgnoreReadErrors->isChecked() );
@@ -283,11 +283,11 @@ void K3b::AudioBurnDialog::slotNormalize
 {
     if( on ) {
         // we are not able to normalize in on-the-fly mode
-        if( !k3bcore->externalBinManager()->foundBin( "normalize" ) ) {
-            KMessageBox::sorry( this, i18n("<p><b>External program <em>normalize</em> is not installed.</b>"
-                                           "<p>K3b uses <em>normalize</em> (http://normalize.nongnu.org/) "
+        if( !k3bcore->externalBinManager()->foundBin( "normalize-audio" ) ) {
+            KMessageBox::sorry( this, i18n("<p><b>External program <em>normalize-audio</em> is not installed.</b>"
+                                           "<p>K3b uses <em>normalize-audio</em> (http://normalize.nongnu.org/) "
                                            "to normalize audio tracks. In order to "
-                                           "use this functionality, please install it first.") );
+                                           "use this functionality, please install it first. (sudo apt-get install normalize-audio) " ) );
             m_checkNormalize->setChecked( false );
         }
         else if( !m_checkCacheImage->isChecked() && !m_checkOnlyCreateImage->isChecked() ) {
--- a/src/projects/k3bmixedburndialog.cpp
+++ b/src/projects/k3bmixedburndialog.cpp
@@ -201,7 +201,7 @@
     K3b::ProjectBurnDialog::loadSettings( c );
 
     m_cdtextWidget->setChecked( c.readEntry( "cd_text", false ) );
-    m_checkNormalize->setChecked( c.readEntry( "normalize", false ) );
+    m_checkNormalize->setChecked( c.readEntry( "normalize-audio", false ) );
 
     // load mixed type
     if( c.readEntry( "mixed_type" ) == "last_track" )
@@ -225,7 +225,7 @@
     K3b::ProjectBurnDialog::saveSettings(c);
 
     c.writeEntry( "cd_text", m_cdtextWidget->isChecked() );
-    c.writeEntry( "normalize", m_checkNormalize->isChecked() );
+    c.writeEntry( "normalize-audio", m_checkNormalize->isChecked() );
 
     // save mixed type
     switch( m_comboMixedModeType->selectedValue() ) {
@@ -289,11 +289,11 @@ void K3b::MixedBurnDialog::slotNormalize
 {
     if( on ) {
         // we are not able to normalize in on-the-fly mode
-        if( !k3bcore->externalBinManager()->foundBin( "normalize" ) ) {
-            KMessageBox::sorry( this, i18n("<p><b>External program <em>normalize</em> is not installed.</b>"
-                                           "<p>K3b uses <em>normalize</em> (http://normalize.nongnu.org/) "
+        if( !k3bcore->externalBinManager()->foundBin( "normalize-audio" ) ) {
+            KMessageBox::sorry( this, i18n("<p><b>External program <em>normalize-audio</em> is not installed.</b>"
+                                           "<p>K3b uses <em>normalize-audio</em> (http://normalize.nongnu.org/) "
                                            "to normalize audio tracks. In order to "
-                                           "use this functionality, please install it first.") );
+                                           "use this functionality, please install it first (sudo apt-get install normalize-audio).") );
             m_checkNormalize->setChecked( false );
         }
         else if( !m_checkCacheImage->isChecked() && !m_checkOnlyCreateImage->isChecked() ) {

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
pkg-kde-extras mailing list
pkg-kde-extras@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-kde-extras

Reply via email to