1 #include "mydiroperator.h"
5 #include <KActionCollection>
10 MyDirOperator::MyDirOperator ( const KUrl
&url
, QWidget
*parent
, Medium
*medium
) : KDirOperator( url
, parent
)
13 // setDirLister( new MyDirLister( true ) );
18 MyDirOperator::myHome()
21 u
.setPath( m_medium
? m_medium
->mountPoint() : QDir::homePath() );
26 MyDirOperator::myCdUp()
29 //tmp.cd( QString::fromLatin1(".."));
32 if( m_medium
&& !tmp
.path().startsWith( m_medium
->mountPoint() ) )
33 tmp
.setPath( m_medium
->mountPoint() );
38 //BEGIN private methods
40 MyDirOperator::reenableDeleteKey()
42 KActionCollection
* dirActionCollection
= static_cast<KActionCollection
*>(KDirOperator::child("KDirOperator::myActionCollection"));
43 if( dirActionCollection
)
45 QAction
* trash
= dirActionCollection
->action("trash");
47 trash
->setEnabled(false);
51 #include "mydiroperator.moc"