Ask for confirmation before deleting a stream from the list

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/13/head
Michele Calgaro 11 months ago
parent dbdd2a4e3c
commit ffff8a9041
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -170,7 +170,7 @@ void KStreamRipper::addStreamButtonClicked()
{ {
StreamPropertiesDlg *dlg = new StreamPropertiesDlg(this); StreamPropertiesDlg *dlg = new StreamPropertiesDlg(this);
connect( dlg, TQT_SIGNAL( finished( StreamPropertiesDlg* )), this, TQT_SLOT( addStreamFinished( StreamPropertiesDlg* )) ); connect( dlg, TQT_SIGNAL( finished( StreamPropertiesDlg* )), this, TQT_SLOT( addStreamFinished( StreamPropertiesDlg* )) );
dlg->setCaption("Add Stream..."); dlg->setCaption("Add Stream...");
dlg->show(); dlg->show();
} }
@ -179,7 +179,7 @@ void KStreamRipper::editStreamButtonClicked()
ProcessListViewItem *ProcItem = (ProcessListViewItem*)m_streamsListView->currentItem(); ProcessListViewItem *ProcItem = (ProcessListViewItem*)m_streamsListView->currentItem();
StreamPropertiesDlg *dlg = new StreamPropertiesDlg(this); StreamPropertiesDlg *dlg = new StreamPropertiesDlg(this);
connect( dlg, TQT_SIGNAL( finished( StreamPropertiesDlg* )), this, TQT_SLOT( editStreamFinished( StreamPropertiesDlg* )) ); connect( dlg, TQT_SIGNAL( finished( StreamPropertiesDlg* )), this, TQT_SLOT( editStreamFinished( StreamPropertiesDlg* )) );
dlg->setCaption("Edit Stream"); dlg->setCaption("Edit Stream");
dlg->d_nameEdit->setText(ProcItem->text(0)); dlg->d_nameEdit->setText(ProcItem->text(0));
dlg->d_urlEdit->setText(ProcItem->getProcessController()->getUrl()); dlg->d_urlEdit->setText(ProcItem->getProcessController()->getUrl());
dlg->d_descEdit->setText(ProcItem->getProcessController()->getDescription()); dlg->d_descEdit->setText(ProcItem->getProcessController()->getDescription());
@ -189,9 +189,17 @@ void KStreamRipper::editStreamButtonClicked()
void KStreamRipper::deleteStreamButtonClicked() void KStreamRipper::deleteStreamButtonClicked()
{ {
ProcessListViewItem * ProcItem = (ProcessListViewItem*)m_streamsListView->currentItem(); ProcessListViewItem *procItem = (ProcessListViewItem*)m_streamsListView->currentItem();
stopRipButtonClicked(); if (procItem)
delete ProcItem; {
int res = KMessageBox::questionYesNo(this, i18n("Delete the stream '%1'?").arg(procItem->text(0)),
i18n("Delete stream"));
if (res == KMessageBox::Yes)
{
stopRipButtonClicked();
delete procItem;
}
}
} }
void KStreamRipper::tuneInButtonClicked() void KStreamRipper::tuneInButtonClicked()

Loading…
Cancel
Save