summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 869a433..a000e9b 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -1596,158 +1596,158 @@ void AdvancedFm::parsetab(const QString &fileName) {
fileSystemTypeList << mountDir+"::"+filesystemType;
}
}
}
endmntent( mntfp );
}
QString AdvancedFm::getFileSystemType(const QString &currentText) {
parsetab("/etc/mtab"); //why did TT forget filesystem type?
QString current = currentText;//.right( currentText.length()-1);
QString baseFs;
for ( QStringList::Iterator it = fileSystemTypeList.begin(); it != fileSystemTypeList.end(); ++it ) {
QString temp = (*it);
QString path = temp.left(temp.find("::",0,TRUE) );
path = path.right( path.length()-1);
if(path.isEmpty()) baseFs = temp.right( temp.length() - temp.find("::",0,TRUE) - 2);
if( current.find( path,0,TRUE) != -1 && !path.isEmpty()) {
return temp.right( temp.length() - temp.find("::",0,TRUE) - 2);
}
}
return baseFs;
}
void AdvancedFm::doBeam() {
Ir ir;
if(!ir.supported()){
} else {
QStringList curFileList = getPath();
if( curFileList.count() > 0) {
if (TabWidget->currentPageIndex() == 0) {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
QString curFile = currentDir.canonicalPath()+"/"+(*it);
if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1);
Ir *file = new Ir(this, "IR");
connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * )));
file->send( curFile, curFile );
}
} else {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
QString curFile = currentRemoteDir.canonicalPath()+"/"+(*it);
if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1);
Ir *file = new Ir(this, "IR");
connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * )));
file->send( curFile, curFile );
}
}
}
}
}
void AdvancedFm::fileBeamFinished( Ir *ir) {
QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") );
}
// QList<QListViewItem> * getSelectedItems( QListView * Local_View );
// QListViewItemIterator it( Local_View );
// for ( ; it.current(); ++it ) {
// if ( it.current()->isSelected() ) {
// QString strItem = it.current()->text(0);
// QString localFile = currentDir.canonicalPath()+"/"+strItem;
// QFileInfo fi(localFile);
// }
// }
void AdvancedFm::showFileMenu() {
QString curApp;
bool isLocalView = false;
if (TabWidget->currentPageIndex() == 0) {
isLocalView = TRUE;
curApp = Local_View->currentItem()->text(0);
} else {
curApp = Remote_View->currentItem()->text(0);
}
MimeType mt( curApp );
const AppLnk* app = mt.application();
QFile fi(curApp);
QPopupMenu m;
m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
m.insertSeparator();
if ( QFileInfo(fi).isDir() ) {
m.insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
} else {
if ( app )
- m.insertItem( app->pixmap(), tr( "Open in " + app->name() ), this, SLOT( run() ) );
+ m.insertItem( app->pixmap(), tr( "Open in " + app->name() ), this, SLOT( runThis() ) );
else if( QFileInfo(fi).isExecutable() )
- m.insertItem( tr( "Execute" ), this, SLOT( run() ) );
+ m.insertItem( tr( "Execute" ), this, SLOT( runThis() ) );
m.insertItem( /*Resource::loadPixmap( "txt" ),*/ tr( "Open as text" ),this, SLOT( runText() ) );
}
m.insertSeparator();
if(isLocalView)
m.insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
else
m.insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
m.insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() ));
m.insertSeparator();
if(isLocalView)
m.insertItem( tr( "Rename" ), this, SLOT( localRename() ));
else
m.insertItem( tr( "Rename" ), this, SLOT( remoteRename() ));
m.insertItem( tr( "Copy" ), this, SLOT( copy() ));
m.insertItem( tr( "Copy As" ), this, SLOT( copyAs() ));
m.insertItem( tr( "Move" ), this, SLOT( move() ));
m.insertSeparator();
if(isLocalView)
m.insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() ));
else
m.insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() ));
m.insertItem( tr( "Run Command" ), this, SLOT( runCommand() ));
m.insertItem( tr( "File Info" ), this, SLOT( fileStatus() ));
m.insertSeparator();
if(isLocalView)
m.insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
else
m.insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
m.insertSeparator();
m.insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() ));
if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings
m.insertItem( tr( "Properties" ), this, SLOT( doProperties() ));
m.setCheckable(TRUE);
if (!b)
m.setItemChecked(m.idAt(0),TRUE);
else
m.setItemChecked(m.idAt(0),FALSE);
if(Ir::supported())
m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() ));
m.exec( QCursor::pos() );
}
void AdvancedFm::cancelMenuTimer()
{
qDebug("cancel menu timer");
if( menuTimer.isActive() )
menuTimer.stop();
}