|
|
@ -76,8 +76,8 @@ KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName,
|
|
|
|
|
|
|
|
|
|
|
|
// This creates the "Model creator" and connects the signals and slots
|
|
|
|
// This creates the "Model creator" and connects the signals and slots
|
|
|
|
m_modelList = new Diff2::KompareModelList( m_diffSettings, m_info, this, "komparemodellist" );
|
|
|
|
m_modelList = new Diff2::KompareModelList( m_diffSettings, m_info, this, "komparemodellist" );
|
|
|
|
connect( m_modelList, TQT_SIGNAL(status( Kompare::tqStatus )),
|
|
|
|
connect( m_modelList, TQT_SIGNAL(status( Kompare::Status )),
|
|
|
|
this, TQT_SLOT(slotSettqStatus( Kompare::tqStatus )) );
|
|
|
|
this, TQT_SLOT(slotSetStatus( Kompare::Status )) );
|
|
|
|
connect( m_modelList, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )),
|
|
|
|
connect( m_modelList, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )),
|
|
|
|
this, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )) );
|
|
|
|
this, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )) );
|
|
|
|
connect( m_modelList, TQT_SIGNAL(error( TQString )),
|
|
|
|
connect( m_modelList, TQT_SIGNAL(error( TQString )),
|
|
|
@ -208,7 +208,7 @@ bool KomparePart::openDiff( const KURL& url )
|
|
|
|
result = m_modelList->openDiff( m_info.localSource );
|
|
|
|
result = m_modelList->openDiff( m_info.localSource );
|
|
|
|
updateActions();
|
|
|
|
updateActions();
|
|
|
|
updateCaption();
|
|
|
|
updateCaption();
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -232,7 +232,7 @@ bool KomparePart::openDiff( const TQString& diffOutput )
|
|
|
|
m_modelList->show();
|
|
|
|
m_modelList->show();
|
|
|
|
updateActions();
|
|
|
|
updateActions();
|
|
|
|
updateCaption();
|
|
|
|
updateCaption();
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return value;
|
|
|
|
return value;
|
|
|
@ -308,7 +308,7 @@ void KomparePart::compare( const KURL& source, const KURL& destination )
|
|
|
|
m_modelList->compare( m_info.localSource, m_info.localDestination );
|
|
|
|
m_modelList->compare( m_info.localSource, m_info.localDestination );
|
|
|
|
updateActions();
|
|
|
|
updateActions();
|
|
|
|
updateCaption();
|
|
|
|
updateCaption();
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -329,7 +329,7 @@ void KomparePart::compareFiles( const KURL& sourceFile, const KURL& destinationF
|
|
|
|
m_modelList->compareFiles( m_info.localSource, m_info.localDestination );
|
|
|
|
m_modelList->compareFiles( m_info.localSource, m_info.localDestination );
|
|
|
|
updateActions();
|
|
|
|
updateActions();
|
|
|
|
updateCaption();
|
|
|
|
updateCaption();
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -350,7 +350,7 @@ void KomparePart::compareDirs( const KURL& sourceDirectory, const KURL& destinat
|
|
|
|
m_modelList->compareDirs( m_info.localSource, m_info.localDestination );
|
|
|
|
m_modelList->compareDirs( m_info.localSource, m_info.localDestination );
|
|
|
|
updateActions();
|
|
|
|
updateActions();
|
|
|
|
updateCaption();
|
|
|
|
updateCaption();
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -359,7 +359,7 @@ void KomparePart::compare3Files( const KURL& /*originalFile*/, const KURL& /*cha
|
|
|
|
// FIXME: actually implement this some day :)
|
|
|
|
// FIXME: actually implement this some day :)
|
|
|
|
updateActions();
|
|
|
|
updateActions();
|
|
|
|
updateCaption();
|
|
|
|
updateCaption();
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KomparePart::openFileAndDiff( const KURL& file, const KURL& diffFile )
|
|
|
|
void KomparePart::openFileAndDiff( const KURL& file, const KURL& diffFile )
|
|
|
@ -378,7 +378,7 @@ void KomparePart::openFileAndDiff( const KURL& file, const KURL& diffFile )
|
|
|
|
m_modelList->openFileAndDiff( m_info.localSource, m_info.localDestination );
|
|
|
|
m_modelList->openFileAndDiff( m_info.localSource, m_info.localDestination );
|
|
|
|
updateActions();
|
|
|
|
updateActions();
|
|
|
|
updateCaption();
|
|
|
|
updateCaption();
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -398,7 +398,7 @@ void KomparePart::openDirAndDiff ( const KURL& dir, const KURL& diffFile )
|
|
|
|
m_modelList->openDirAndDiff( m_info.localSource, m_info.localDestination );
|
|
|
|
m_modelList->openDirAndDiff( m_info.localSource, m_info.localDestination );
|
|
|
|
updateActions();
|
|
|
|
updateActions();
|
|
|
|
updateCaption();
|
|
|
|
updateCaption();
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -415,7 +415,7 @@ bool KomparePart::saveAll()
|
|
|
|
bool result = m_modelList->saveAll();
|
|
|
|
bool result = m_modelList->saveAll();
|
|
|
|
updateActions();
|
|
|
|
updateActions();
|
|
|
|
updateCaption();
|
|
|
|
updateCaption();
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -484,7 +484,7 @@ KAboutData *KomparePart::createAboutData()
|
|
|
|
return about;
|
|
|
|
return about;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KomparePart::slotSettqStatus( enum Kompare::tqStatus status )
|
|
|
|
void KomparePart::slotSetStatus( enum Kompare::Status status )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
updateActions();
|
|
|
|
updateActions();
|
|
|
|
|
|
|
|
|
|
|
@ -496,10 +496,10 @@ void KomparePart::slotSettqStatus( enum Kompare::tqStatus status )
|
|
|
|
emit setStatusBarText( i18n( "Parsing diff output..." ) );
|
|
|
|
emit setStatusBarText( i18n( "Parsing diff output..." ) );
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case Kompare::FinishedParsing:
|
|
|
|
case Kompare::FinishedParsing:
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case Kompare::FinishedWritingDiff:
|
|
|
|
case Kompare::FinishedWritingDiff:
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
emit diffURLChanged();
|
|
|
|
emit diffURLChanged();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@ -532,7 +532,7 @@ void KomparePart::updateCaption()
|
|
|
|
emit setWindowCaption( text );
|
|
|
|
emit setWindowCaption( text );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KomparePart::updatetqStatus()
|
|
|
|
void KomparePart::updateStatus()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString source = m_info.source.prettyURL();
|
|
|
|
TQString source = m_info.source.prettyURL();
|
|
|
|
TQString destination = m_info.destination.prettyURL();
|
|
|
|
TQString destination = m_info.destination.prettyURL();
|
|
|
@ -608,7 +608,7 @@ void KomparePart::slotSwap()
|
|
|
|
|
|
|
|
|
|
|
|
// Update window caption and statusbar text
|
|
|
|
// Update window caption and statusbar text
|
|
|
|
updateCaption();
|
|
|
|
updateCaption();
|
|
|
|
updatetqStatus();
|
|
|
|
updateStatus();
|
|
|
|
|
|
|
|
|
|
|
|
m_modelList->swap();
|
|
|
|
m_modelList->swap();
|
|
|
|
}
|
|
|
|
}
|
|
|
|