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