|
|
|
@ -140,13 +140,13 @@ void KMyListBox::addDir( const KURL & dirname, const TQString & filter, bool hid
|
|
|
|
|
thl->setHidden( hidden );
|
|
|
|
|
thl->setRecursive( recursively );
|
|
|
|
|
|
|
|
|
|
KApplication::setOverrideCursor( TQt::waitCursor );
|
|
|
|
|
TDEApplication::setOverrideCursor( TQt::waitCursor );
|
|
|
|
|
thl->start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void KMyListBox::addDirName( const KURL & dirname, const TQString & filter, bool hidden, bool recursive )
|
|
|
|
|
{
|
|
|
|
|
KApplication::setOverrideCursor( TQt::waitCursor );
|
|
|
|
|
TDEApplication::setOverrideCursor( TQt::waitCursor );
|
|
|
|
|
|
|
|
|
|
if( recursive ) {
|
|
|
|
|
ThreadedLister* thl = new ThreadedLister( &m_add_mutex, &m_running_lister_counter, this );
|
|
|
|
@ -178,7 +178,7 @@ void KMyListBox::dropEvent(TQDropEvent* e)
|
|
|
|
|
if( KURLDrag::decode( e, list ) )
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
KApplication::setOverrideCursor( TQt::waitCursor );
|
|
|
|
|
TDEApplication::setOverrideCursor( TQt::waitCursor );
|
|
|
|
|
|
|
|
|
|
setUpdatesEnabled( false );
|
|
|
|
|
|
|
|
|
@ -213,7 +213,7 @@ void KMyListBox::viewportMousePressEvent( TQMouseEvent* e )
|
|
|
|
|
|
|
|
|
|
void KMyListBox::viewportMouseMoveEvent( TQMouseEvent* e )
|
|
|
|
|
{
|
|
|
|
|
if ( mousePressed && ( presspos - e->pos() ).manhattanLength() > KApplication::startDragDistance() ) {
|
|
|
|
|
if ( mousePressed && ( presspos - e->pos() ).manhattanLength() > TDEApplication::startDragDistance() ) {
|
|
|
|
|
mousePressed = FALSE;
|
|
|
|
|
TQListBoxItem *item = itemAt( presspos );
|
|
|
|
|
if ( item ) {
|
|
|
|
@ -297,7 +297,7 @@ void KMyListBox::moveMode()
|
|
|
|
|
{
|
|
|
|
|
if ( !moving ) {
|
|
|
|
|
moving = true;
|
|
|
|
|
KApplication::setOverrideCursor( TQt::sizeAllCursor );
|
|
|
|
|
TDEApplication::setOverrideCursor( TQt::sizeAllCursor );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -338,7 +338,7 @@ void KMyListBox::preview( KURL::List list )
|
|
|
|
|
connect( job, TQT_SIGNAL( gotPreview( const KFileItem*, const TQPixmap &) ), this, TQT_SLOT( previewDone( const KFileItem*, const TQPixmap &) ) );
|
|
|
|
|
connect( job, TQT_SIGNAL( failed( const KFileItem*)), this, TQT_SLOT( previewFailed( const KFileItem* ) ));
|
|
|
|
|
connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( previewFinished() ) );
|
|
|
|
|
KApplication::setOverrideCursor( TQt::waitCursor );
|
|
|
|
|
TDEApplication::setOverrideCursor( TQt::waitCursor );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void KMyListBox::previewDone( const KFileItem* item, const TQPixmap &pixmap )
|
|
|
|
@ -369,7 +369,7 @@ void KMyListBox::previewFailed( const KFileItem* item )
|
|
|
|
|
void KMyListBox::previewFinished()
|
|
|
|
|
{
|
|
|
|
|
triggerUpdate( true ); //maybe false is enough
|
|
|
|
|
KApplication::restoreOverrideCursor();
|
|
|
|
|
TDEApplication::restoreOverrideCursor();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void KMyListBox::setPreview( bool prv )
|
|
|
|
@ -401,7 +401,7 @@ void KMyListBox::setName( bool name )
|
|
|
|
|
|
|
|
|
|
void KMyListBox::move( int i )
|
|
|
|
|
{
|
|
|
|
|
KApplication::restoreOverrideCursor();
|
|
|
|
|
TDEApplication::restoreOverrideCursor();
|
|
|
|
|
moving = false;
|
|
|
|
|
|
|
|
|
|
if( !count() )
|
|
|
|
@ -505,7 +505,7 @@ void KMyListBox::listerDone( ThreadedLister* lister )
|
|
|
|
|
|
|
|
|
|
if( lister )
|
|
|
|
|
delete lister;
|
|
|
|
|
KApplication::restoreOverrideCursor();
|
|
|
|
|
TDEApplication::restoreOverrideCursor();
|
|
|
|
|
|
|
|
|
|
setUpdatesEnabled( false );
|
|
|
|
|
setPreview( KMyListBoxItem::preview() );
|
|
|
|
@ -566,7 +566,7 @@ void KMyListBox::sortNummeric()
|
|
|
|
|
|
|
|
|
|
void KMyListBox::sortList()
|
|
|
|
|
{
|
|
|
|
|
KApplication::setOverrideCursor( TQt::WaitCursor );
|
|
|
|
|
TDEApplication::setOverrideCursor( TQt::WaitCursor );
|
|
|
|
|
|
|
|
|
|
if( m_sorting == ASCENDING )
|
|
|
|
|
sort( true );
|
|
|
|
@ -577,7 +577,7 @@ void KMyListBox::sortList()
|
|
|
|
|
unsigned int p = 0;
|
|
|
|
|
for( unsigned int i = 0;i<count();i++)
|
|
|
|
|
{
|
|
|
|
|
p = KApplication::random() % count();
|
|
|
|
|
p = TDEApplication::random() % count();
|
|
|
|
|
if( p != i ) // This prevents the creation of a new ListBoxItem
|
|
|
|
|
// on the same position as before. It would not change
|
|
|
|
|
// the position of item, but cost a little bit of speed
|
|
|
|
@ -612,7 +612,7 @@ void KMyListBox::sortList()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KApplication::restoreOverrideCursor();
|
|
|
|
|
TDEApplication::restoreOverrideCursor();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void KMyListBox::setSorting( int s )
|
|
|
|
|