Diffstat (limited to 'noncore/net/opieftp/opieftp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 523a36c..ed7f4bb 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -425,3 +425,3 @@ bool OpieFtp::populateRemoteView() { - Remote_View->clear(); + Remote_View->clear(); QFile tmp("./._temp"); @@ -446,3 +446,4 @@ bool OpieFtp::populateRemoteView() tmp.close(); - } + } else + qDebug("temp file not opened successfullly"); return true; @@ -506,3 +507,3 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) - void OpieFtp::localListClicked(QListViewItem *selectedItem) +void OpieFtp::localListClicked(QListViewItem *selectedItem) { @@ -542,2 +543,13 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) +void OpieFtp::doLocalCd() +{ + localListClicked( Local_View->currentItem()); +} + +void OpieFtp:: doRemoteCd() +{ + remoteListClicked( Remote_View->currentItem()); + +} + void OpieFtp::showHidden() @@ -562,4 +574,4 @@ void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &point, break; - case 2: - showLocalMenu(); + case 2: + showLocalMenu(item); break; @@ -573,4 +585,4 @@ void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &p break; - case 2: - showRemoteMenu(); + case 2: + showRemoteMenu(item); break; @@ -579,5 +591,8 @@ void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &p -void OpieFtp::showRemoteMenu() +void OpieFtp::showRemoteMenu(QListViewItem * item) { QPopupMenu m;// = new QPopupMenu( Local_View ); + if(item->text(0).right(1) == "/") + m.insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() )); + else m.insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); @@ -590,3 +605,3 @@ void OpieFtp::showRemoteMenu() -void OpieFtp::showLocalMenu() +void OpieFtp::showLocalMenu(QListViewItem * item) { @@ -594,2 +609,6 @@ void OpieFtp::showLocalMenu() m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); + m.insertSeparator(); + if(item->text(0).right(1) == "/") + m.insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); + else m.insertItem( tr( "Upload" ), this, SLOT( localUpload() )); |