|
|
|
@ -77,24 +77,24 @@ void UndoDialog::start()
|
|
|
|
|
== KMessageBox::Cancel )
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
KProcess *proc = new KProcess;
|
|
|
|
|
TDEProcess *proc = new TDEProcess;
|
|
|
|
|
*proc << scriptname->url() << "--krename";
|
|
|
|
|
|
|
|
|
|
enableButton( KDialogBase::User1, false );
|
|
|
|
|
|
|
|
|
|
if( !proc->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) {
|
|
|
|
|
if( !proc->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) ) {
|
|
|
|
|
KMessageBox::sorry( this, i18n("Unable to start the given undo script!") );
|
|
|
|
|
enableButton( KDialogBase::User1, true );
|
|
|
|
|
delete proc;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
proc->resume();
|
|
|
|
|
connect( proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int) ), this, TQT_SLOT( receive( KProcess*, char*, int ) ) );
|
|
|
|
|
connect( proc, TQT_SIGNAL( receivedStderr( KProcess*, char*, int) ), this, TQT_SLOT( receiveErr( KProcess*, char*, int ) ) );
|
|
|
|
|
connect( proc, TQT_SIGNAL( processExited( KProcess* ) ), this, TQT_SLOT( finished( KProcess* ) ) );
|
|
|
|
|
connect( proc, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int) ), this, TQT_SLOT( receive( TDEProcess*, char*, int ) ) );
|
|
|
|
|
connect( proc, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int) ), this, TQT_SLOT( receiveErr( TDEProcess*, char*, int ) ) );
|
|
|
|
|
connect( proc, TQT_SIGNAL( processExited( TDEProcess* ) ), this, TQT_SLOT( finished( TDEProcess* ) ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UndoDialog::receive( KProcess*, char* buffer, int len )
|
|
|
|
|
void UndoDialog::receive( TDEProcess*, char* buffer, int len )
|
|
|
|
|
{
|
|
|
|
|
TQString text;
|
|
|
|
|
for( int i = 0; i < len; i++ )
|
|
|
|
@ -103,7 +103,7 @@ void UndoDialog::receive( KProcess*, char* buffer, int len )
|
|
|
|
|
browser->setText( browser->text() + text + "<br>");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UndoDialog::receiveErr( KProcess*, char* buffer, int len )
|
|
|
|
|
void UndoDialog::receiveErr( TDEProcess*, char* buffer, int len )
|
|
|
|
|
{
|
|
|
|
|
TQString text = "<b>";
|
|
|
|
|
for( int i = 0; i < len; i++ )
|
|
|
|
@ -112,7 +112,7 @@ void UndoDialog::receiveErr( KProcess*, char* buffer, int len )
|
|
|
|
|
browser->setText( browser->text() + text + "</b><br>");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UndoDialog::finished( KProcess* p )
|
|
|
|
|
void UndoDialog::finished( TDEProcess* p )
|
|
|
|
|
{
|
|
|
|
|
delete p;
|
|
|
|
|
KMessageBox::information( this, i18n("Finished successfully") );
|
|
|
|
|