summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/kstreamripper.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/kstreamripper.cpp b/src/kstreamripper.cpp
index 7a5d7cb..2abd249 100644
--- a/src/kstreamripper.cpp
+++ b/src/kstreamripper.cpp
@@ -82,10 +82,12 @@ KStreamRipper::KStreamRipper( TQWidget* parent, const char* name )
for( ; iter1 != nameList.end() && iter2 != urlList.end() && iter3 != descList.end(); ++iter1, ++iter2, ++iter3 )
{
- ProcessListViewItem * proc = new ProcessListViewItem( m_streamsListView, *iter1, "", "");
- proc->setRenameEnabled(0, true);
- proc->getProcessController()->setUrl( *iter2 );
- proc->getProcessController()->setDescription( *iter3 );
+ ProcessListViewItem * procItem = new ProcessListViewItem( m_streamsListView, *iter1, "", "");
+ procItem->setRenameEnabled(0, true);
+ ProcessController *pc = procItem->getProcessController();
+ pc->setUrl( *iter2 );
+ pc->setDescription( *iter3 );
+ connect(pc, TQT_SIGNAL(stopRipSignal(ProcessController*)), this, TQT_SLOT(ripStopped(ProcessController*)));
}
//CONNECTS
@@ -227,7 +229,6 @@ void KStreamRipper::ripButtonClicked()
ProcItem->getProcessController()->startRip(m_destEdit->text(), m_timeEdit->text());
m_ripButton->setEnabled( false );
m_stopRipButton->setEnabled( true );
- connect(ProcItem->getProcessController(), TQT_SIGNAL(stopRipSignal(ProcessController*)), this, TQT_SLOT(ripStopped(ProcessController*)));
} else {
KMessageBox::error(this, "The streamripper executable wasn't found. Make sure "
"it's in your path.", "streamripper not found");
@@ -324,9 +325,11 @@ void KStreamRipper::urlChanged()
void KStreamRipper::addStreamFinished( AddNewStreamImpl *e )
{
- ProcessListViewItem * proc = new ProcessListViewItem( m_streamsListView, e->d_nameEdit->text(), "", "");
- proc->getProcessController()->setUrl( e->d_urlEdit->text() );
- proc->getProcessController()->setDescription( e->d_descEdit->text() );
+ ProcessListViewItem *procItem = new ProcessListViewItem( m_streamsListView, e->d_nameEdit->text(), "", "");
+ ProcessController *pc = procItem->getProcessController();
+ pc->setUrl( e->d_urlEdit->text() );
+ pc->setDescription( e->d_descEdit->text() );
+ connect(pc, TQT_SIGNAL(stopRipSignal(ProcessController*)), this, TQT_SLOT(ripStopped(ProcessController*)));
}
#include "kstreamripper.moc"