diff options
author | ormorph <[email protected]> | 2023-12-05 21:14:11 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-12-06 19:36:24 +0900 |
commit | 7bd4251db36952dce6c17d477f4671199d5c9971 (patch) | |
tree | ec46e18f1d1854e9c0f0c6ed8a92a14445b3c765 /src/kstreamripper.cpp | |
parent | bc6622cea71b99a59e4631652c02af6f5ad324d0 (diff) | |
download | kstreamripper-7bd4251db36952dce6c17d477f4671199d5c9971.tar.gz kstreamripper-7bd4251db36952dce6c17d477f4671199d5c9971.zip |
Added event processing if the process has finished its work
Signed-off-by: ormorph <[email protected]>
Diffstat (limited to 'src/kstreamripper.cpp')
-rw-r--r-- | src/kstreamripper.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/kstreamripper.cpp b/src/kstreamripper.cpp index a4fef54..7a5d7cb 100644 --- a/src/kstreamripper.cpp +++ b/src/kstreamripper.cpp @@ -227,12 +227,23 @@ 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"); } } +void KStreamRipper::ripStopped(ProcessController *curProc) +{ + const ProcessController *proc = ((ProcessListViewItem*)m_streamsListView->currentItem())->getProcessController(); + if (curProc == proc) + { + m_ripButton->setEnabled( true ); + m_stopRipButton->setEnabled( false ); + } +} + void KStreamRipper::stopRipButtonClicked() { ProcessListViewItem * ProcItem = (ProcessListViewItem*)m_streamsListView->currentItem(); |