--------------Boundary-00=_ZPQDWJPQYZ1CUKE2VBDW Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Content-Disposition: inline I have made some fixes to cdbakeoven. They include the following: o - two valgrind fixes. One of them fixes the problem that i had where cdbakeoven seemed to exit, but its proces was still running. o - various spelling fixes ( e.g tarcks -> tracks) o - various i18n additions (heaps more needed) o - Changed findByUrl to findByPath, This is documented in the KURL class as the correct way to do things when you are not using URL's. Please review. Mark Cox --------------Boundary-00=_ZPQDWJPQYZ1CUKE2VBDW Content-Type: text/x-diff; charset="us-ascii"; name="cdbakeoven-diff-30-04-2002.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cdbakeoven-diff-30-04-2002.diff" Index: NewAdvancedCdCompilationView.cpp =================================================================== RCS file: /cvs/kdeutils/cdbakeoven/NewAdvancedCdCompilationView.cpp,v retrieving revision 1.7 diff -u -b -r1.7 NewAdvancedCdCompilationView.cpp --- NewAdvancedCdCompilationView.cpp 2002/04/22 01:48:10 1.7 +++ NewAdvancedCdCompilationView.cpp 2002/04/30 11:50:41 @@ -50,7 +50,8 @@ delete foldersView; delete filesView; delete estimateHldr; - delete estimate; +/* This is already deleted because it is added to the parent widget above */ +// delete estimate; } //=================================== void NewAdvancedCdCompilationView::initView(){ Index: dialogs/CdboDialogActionFactory.cpp =================================================================== RCS file: /cvs/kdeutils/cdbakeoven/dialogs/CdboDialogActionFactory.cpp,v retrieving revision 1.5 diff -u -b -r1.5 CdboDialogActionFactory.cpp --- dialogs/CdboDialogActionFactory.cpp 2002/04/29 04:03:17 1.5 +++ dialogs/CdboDialogActionFactory.cpp 2002/04/30 11:50:59 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "CdboDialogBase.h" @@ -233,7 +234,7 @@ this->tmpList = tmpList; int mp3 = 0, ogg = 0; for(unsigned int i = 0; i < flist->count(); i++){ - KMimeType::Ptr mimetype = KMimeType::findByURL(KURL((*flist)[i])); + KMimeType::Ptr mimetype = KMimeType::findByPath((*flist)[i]); QString mType = mimetype->name().latin1(); if(mType.find("x-mp3") != -1){ mp3++; @@ -249,7 +250,9 @@ user->output(CdboDialogBase::InfoMessage, i18n("Compilation list contains %1 file(s).").arg(QString::number(totalTracks))); user->output(CdboDialogBase::InfoMessage, - "Of those, " + QString::number(mp3) + " MP3 and " + QString::number(ogg) + " Ogg Vorbis file(s) will be decompressed."); + i18n("Of those, %1 MP3 and %2 Ogg Vorbis file(s) will be decompressed.") + .arg(QString::number(mp3)).arg(QString::number(ogg))); + this->tracksList = tracksList; this->flist = flist; while(!initDecompressAudioProcess((*flist)[tracksDone])){ @@ -1097,7 +1100,7 @@ bool CdboDialogActionFactory::initDecompressAudioProcess(QString file){ cdboShellProc = new KShellProcess(); - KMimeType::Ptr mimetype = KMimeType::findByURL(KURL(file)); + KMimeType::Ptr mimetype = KMimeType::findByPath(file); QString mType = mimetype->name().latin1(); tracksDone++; QDate today = QDate::currentDate(); @@ -1209,16 +1213,16 @@ } } if(creatingISO){ - user->output(CdboDialogBase::StatusOkMessage, "Starting create ISO process!"); + user->output(CdboDialogBase::StatusOkMessage, i18n("Starting create ISO process!")); user->status("Creating ISO Image..."); } if(creatingCdOnTheFly){ - user->output(CdboDialogBase::StatusOkMessage, "Starting create CD 'On-the-fly' process!"); + user->output(CdboDialogBase::StatusOkMessage, i18n("Starting create CD 'On-the-fly' process!")); user->status("Creating CD 'On-the-fly'..."); } if(decompressingAudio){ if(tmpList->count() == 1){ - user->output(CdboDialogBase::StatusOkMessage, "Starting to decompress MP3/Ogg Vorbis file(s)!"); + user->output(CdboDialogBase::StatusOkMessage, i18n("Starting to decompress MP3/Ogg Vorbis file(s)!")); user->status("Decompressing Audio..."); } } Index: dialogs/RippAudioDialogBase.cpp =================================================================== RCS file: /cvs/kdeutils/cdbakeoven/dialogs/RippAudioDialogBase.cpp,v retrieving revision 1.4 diff -u -b -r1.4 RippAudioDialogBase.cpp --- dialogs/RippAudioDialogBase.cpp 2002/04/19 00:18:55 1.4 +++ dialogs/RippAudioDialogBase.cpp 2002/04/30 11:51:00 @@ -118,24 +118,24 @@ RippAudioDialogBaseLayout->addWidget( Frame5, 0, 0 ); ////////// - tarcksPnl = new QFrame( this, "tarcksPnl" ); - tarcksPnl->setMinimumSize( QSize( 420, 250 ) ); - tarcksPnl->setMaximumSize( QSize( 450, 32767 ) ); - tarcksPnl->setFrameShape( QFrame::StyledPanel ); - tarcksPnl->setFrameShadow( QFrame::Raised ); - tarcksPnlLayout = new QVBoxLayout( tarcksPnl ); - tarcksPnlLayout->setSpacing( 6 ); - tarcksPnlLayout->setMargin( 7 ); + tracksPnl = new QFrame( this, "tracksPnl" ); + tracksPnl->setMinimumSize( QSize( 420, 250 ) ); + tracksPnl->setMaximumSize( QSize( 450, 32767 ) ); + tracksPnl->setFrameShape( QFrame::StyledPanel ); + tracksPnl->setFrameShadow( QFrame::Raised ); + tracksPnlLayout = new QVBoxLayout( tracksPnl ); + tracksPnlLayout->setSpacing( 6 ); + tracksPnlLayout->setMargin( 7 ); /* - tracksView = new QListView( tarcksPnl, "tracksView" ); + tracksView = new QListView( tracksPnl, "tracksView" ); tracksView->addColumn( i18n( "Column 1" ) ); QListViewItem * item = new QListViewItem( tracksView, 0 ); item->setText( 0, i18n( "New Item" ) );*/ ////////// - trackView = new CdboCddaView( tarcksPnl, "trackViewInCopy" ); - tarcksPnlLayout->addWidget( trackView ); + trackView = new CdboCddaView( tracksPnl, "trackViewInCopy" ); + tracksPnlLayout->addWidget( trackView ); - RippAudioDialogBaseLayout->addWidget( tarcksPnl, 0, 1 ); + RippAudioDialogBaseLayout->addWidget( tracksPnl, 0, 1 ); dialogCntPnl = new DialogCntPnl( this, "dialogCntPnl" ); dialogCntPnl->setMinimumSize( QSize( 0, 282 ) ); Index: dialogs/RippAudioDialogBase.h =================================================================== RCS file: /cvs/kdeutils/cdbakeoven/dialogs/RippAudioDialogBase.h,v retrieving revision 1.1 diff -u -b -r1.1 RippAudioDialogBase.h --- dialogs/RippAudioDialogBase.h 2002/04/16 22:43:44 1.1 +++ dialogs/RippAudioDialogBase.h 2002/04/30 11:51:01 @@ -47,7 +47,7 @@ QGridLayout* RippAudioDialogBaseLayout; QGridLayout* Frame5Layout; QGridLayout* detailsPnlLayout; - QVBoxLayout* tarcksPnlLayout; + QVBoxLayout* tracksPnlLayout; QFrame* Frame5; DriveInfoPnl* srcDevicePnl; @@ -56,7 +56,7 @@ QPushButton* imageBrowseBtn; QComboBox* fileFormatCmb; QLabel* TextLabel1; - QFrame* tarcksPnl; + QFrame* tracksPnl; CdboCddaView *trackView; DialogCntPnl* dialogCntPnl; }; Index: widgets/EstimatePnl.cpp =================================================================== RCS file: /cvs/kdeutils/cdbakeoven/widgets/EstimatePnl.cpp,v retrieving revision 1.6 diff -u -b -r1.6 EstimatePnl.cpp --- widgets/EstimatePnl.cpp 2002/04/25 11:07:24 1.6 +++ widgets/EstimatePnl.cpp 2002/04/30 11:51:03 @@ -37,7 +37,10 @@ * name 'name' and widget flags set to 'f' */ EstimatePnl::EstimatePnl( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ){ + : QWidget( parent, name, fl ), + total(0), wasted(0), max(0), wastedMB(false), usedMB(false) /* initialize all member variables */ + /* initialized to zero to avoid valgrind reporting use of an uninitialized variable, which is bad! */ + { if ( !name ) setName( "EstimatePnl" ); @@ -285,8 +288,10 @@ } //=============================== void EstimatePnl::reset(){ - total = 0; - wasted = max; + + wasted = max = total = 0; + /* this seems a sensible thing to do as well */ + usedMB = wastedMB = false; synchUp(); } //=============================== Index: widgets/EstimatePnl.h =================================================================== RCS file: /cvs/kdeutils/cdbakeoven/widgets/EstimatePnl.h,v retrieving revision 1.3 diff -u -b -r1.3 EstimatePnl.h Index: widgets/fileViews/AudioCompilationTreeView.cpp =================================================================== RCS file: /cvs/kdeutils/cdbakeoven/widgets/fileViews/AudioCompilationTreeView.cpp,v retrieving revision 1.12 diff -u -b -r1.12 AudioCompilationTreeView.cpp --- widgets/fileViews/AudioCompilationTreeView.cpp 2002/04/29 04:03:16 1.12 +++ widgets/fileViews/AudioCompilationTreeView.cpp 2002/04/30 11:51:08 @@ -493,7 +493,7 @@ } else{*/ - KMimeType::Ptr mimetype = KMimeType::findByURL(KURL(path)); + KMimeType::Ptr mimetype = KMimeType::findByPath(path); //QString mType = mimetype->name().latin1(); // cerr << "mimetype->comment().latin1() : " << mimetype->comment().latin1(); // cerr << "\n mimetype->name().latin1() = " << mType.latin1() << "\n"; @@ -575,7 +575,7 @@ secs += length.right(length.length() - length.find(":") -1).toInt(); } fItem->setText(2, artist); - KMimeType::Ptr mimetype = KMimeType::findByURL(KURL(path)); + KMimeType::Ptr mimetype = KMimeType::findByPath(path); QString mType = mimetype->comment().latin1(); fItem->setType( mType); @@ -645,7 +645,7 @@ } //============================================================== void AudioCompilationTreeView::reload(){ - emit haveStatus(i18n("Recalculating tarck list size. Please wait...")); + emit haveStatus(i18n("Recalculating track list size. Please wait...")); QString buff = fList.join("\n"); QStringList dub = QStringList::split("\n",buff); removeAll(); Index: widgets/fileViews/FakePropertiesDialog.cpp =================================================================== RCS file: /cvs/kdeutils/cdbakeoven/widgets/fileViews/FakePropertiesDialog.cpp,v retrieving revision 1.6 diff -u -b -r1.6 FakePropertiesDialog.cpp --- widgets/fileViews/FakePropertiesDialog.cpp 2002/04/20 13:06:09 1.6 +++ widgets/fileViews/FakePropertiesDialog.cpp 2002/04/30 11:51:12 @@ -55,7 +55,7 @@ this->foldersList = 0; this->entriesList = 0; - KMimeType::Ptr mimetype = KMimeType::findByURL(KURL(thisEntry->path)); + KMimeType::Ptr mimetype = KMimeType::findByPath(thisEntry->path); QString type = mimetype->comment().latin1(); QString path = thisEntry->path; --------------Boundary-00=_ZPQDWJPQYZ1CUKE2VBDW-- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<