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-18 19:06:40 +0900
commitc22d8d68d987e2f7afee90629faeabd0a071bf23 (patch)
tree662202ae67fce20b154a8e610e1f571532c37588
parent0796f6cba8c235387ccdecdf0f6bf02c8db88d37 (diff)
downloadkstreamripper-c22d8d68d987e2f7afee90629faeabd0a071bf23.tar.gz
kstreamripper-c22d8d68d987e2f7afee90629faeabd0a071bf23.zip
Ask for confirmation before deleting a stream from the list
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit ffff8a90414c38c88d5e93542dab3c26a1e661dd)
-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()