summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-12-17 22:27:16 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-12-17 22:27:16 +0900
commitffff8a90414c38c88d5e93542dab3c26a1e661dd (patch)
tree08b15f89e07cb2cecd5b3eda28a8338ac2692261
parentdbdd2a4e3cb7320033ae7f8c19fe2af4bc62d728 (diff)
downloadkstreamripper-ffff8a90.tar.gz
kstreamripper-ffff8a90.zip
Ask for confirmation before deleting a stream from the list
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--src/kstreamripper.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/kstreamripper.cpp b/src/kstreamripper.cpp
index 0eb9dae..15e827e 100644
--- a/src/kstreamripper.cpp
+++ b/src/kstreamripper.cpp
@@ -170,7 +170,7 @@ void KStreamRipper::addStreamButtonClicked()
{
StreamPropertiesDlg *dlg = new StreamPropertiesDlg(this);
connect( dlg, TQT_SIGNAL( finished( StreamPropertiesDlg* )), this, TQT_SLOT( addStreamFinished( StreamPropertiesDlg* )) );
- dlg->setCaption("Add Stream...");
+ dlg->setCaption("Add Stream...");
dlg->show();
}
@@ -179,7 +179,7 @@ void KStreamRipper::editStreamButtonClicked()
ProcessListViewItem *ProcItem = (ProcessListViewItem*)m_streamsListView->currentItem();
StreamPropertiesDlg *dlg = new StreamPropertiesDlg(this);
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_urlEdit->setText(ProcItem->getProcessController()->getUrl());
dlg->d_descEdit->setText(ProcItem->getProcessController()->getDescription());
@@ -189,9 +189,17 @@ void KStreamRipper::editStreamButtonClicked()
void KStreamRipper::deleteStreamButtonClicked()
{
- ProcessListViewItem * ProcItem = (ProcessListViewItem*)m_streamsListView->currentItem();
- stopRipButtonClicked();
- delete ProcItem;
+ ProcessListViewItem *procItem = (ProcessListViewItem*)m_streamsListView->currentItem();
+ if (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()