summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm/advancedfm.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp34
1 files changed, 26 insertions, 8 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index c653b90..9edf7c1 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -58,24 +58,26 @@
#include <time.h>
#include <fcntl.h>
#include <mntent.h>
#include <string.h>
#include <errno.h>
#include <sys/vfs.h>
#include <mntent.h>
#include <sys/utsname.h>
AdvancedFm::AdvancedFm( )
: QMainWindow( ) {
init();
+ renameBox = 0;
+
initConnections();
populateLocalView();
populateRemoteView();
currentPathCombo->setFocus();
}
AdvancedFm::~AdvancedFm() {
}
void AdvancedFm::cleanUp() {
QString sfile=QDir::homeDirPath();
if(sfile.right(1) != "/")
@@ -393,42 +395,57 @@ void AdvancedFm::remoteListClicked(QListViewItem *selectedItem) {
}
} //end not symlink
chdir(strItem.latin1());
}
}
}
void AdvancedFm::localListPressed( int mouse, QListViewItem *, const QPoint& , int ) {
// qDebug("list pressed");
switch (mouse) {
case 1:
+ {
+ if(renameBox != 0 )
+ {
+ qDebug("cancel rename");
+ cancelRename();
+ }
+
+ }
break;
case 2:
menuTimer.start( 500, TRUE );
qDebug("Start menu timer\n");
break;
};
}
void AdvancedFm::remoteListPressed( int mouse, QListViewItem*, const QPoint&, int ) {
- switch (mouse) {
- case 1:
- break;
- case 2:
- menuTimer.start( 500, TRUE );
- qDebug("Start menu timer");
- break;
- };
+ switch (mouse) {
+ case 1:
+ {
+ if(renameBox != 0 )
+ {
+ qDebug("cancel rename");
+ cancelRename();
+ }
+ }
+ break;
+ case 2:
+ menuTimer.start( 500, TRUE );
+ qDebug("Start menu timer");
+ break;
+ };
}
void AdvancedFm::switchToLocalTab() {
TabWidget->setCurrentTab(0);
Local_View->setFocus();
}
void AdvancedFm::switchToRemoteTab() {
TabWidget->setCurrentTab(1);
Remote_View->setFocus();
}
@@ -870,12 +887,13 @@ void AdvancedFm::addToDocs() {
curFile = currentRemoteDir.canonicalPath()+"/"+(*it);
qDebug(curFile);
DocLnk f;
// curFile.replace(QRegExp("\\..*"),"");
f.setName((*it));
f.setFile( curFile);
f.writeLink();
}
}
}
}
+