Diffstat (limited to 'noncore/net/opieftp/opieftp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 668a03d..269449e 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -763,6 +763,7 @@ bool OpieFtp::populateRemoteView( ) | |||
763 | void OpieFtp::remoteListClicked(QListViewItem *selectedItem) | 763 | void OpieFtp::remoteListClicked(QListViewItem *selectedItem) |
764 | { | 764 | { |
765 | if( selectedItem) { | 765 | if( selectedItem) { |
766 | // if(selectedItem!= NULL) { | ||
766 | // QCopEnvelope ( "QPE/System", "busy()" ); | 767 | // QCopEnvelope ( "QPE/System", "busy()" ); |
767 | QString oldRemoteCurrentDir = currentRemoteDir; | 768 | QString oldRemoteCurrentDir = currentRemoteDir; |
768 | QString strItem=selectedItem->text(0); | 769 | QString strItem=selectedItem->text(0); |
@@ -908,10 +909,12 @@ void OpieFtp::showRemoteMenu(QListViewItem * item) | |||
908 | { | 909 | { |
909 | QPopupMenu * m;// = new QPopupMenu( Local_View ); | 910 | QPopupMenu * m;// = new QPopupMenu( Local_View ); |
910 | m = new QPopupMenu(this); | 911 | m = new QPopupMenu(this); |
911 | if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) != -1) | 912 | if(item != NULL ) { |
913 | if( item->text(0).find("/",0,TRUE) != -1) | ||
912 | m->insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() )); | 914 | m->insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() )); |
913 | else | 915 | else |
914 | m->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); | 916 | m->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); |
917 | } | ||
915 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 918 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
916 | m->insertItem( tr("Rescan"), this, SLOT( populateLocalView() )); | 919 | m->insertItem( tr("Rescan"), this, SLOT( populateLocalView() )); |
917 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 920 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
@@ -928,10 +931,12 @@ void OpieFtp::showLocalMenu(QListViewItem * item) | |||
928 | m = new QPopupMenu( this); | 931 | m = new QPopupMenu( this); |
929 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | 932 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); |
930 | m->insertSeparator(); | 933 | m->insertSeparator(); |
931 | if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) !=-1) | 934 | if(item != NULL ) { |
935 | if( item->text(0).find("/",0,TRUE) !=-1) | ||
932 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); | 936 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); |
933 | else | 937 | else |
934 | m->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); | 938 | m->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); |
939 | } | ||
935 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 940 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
936 | m->insertItem( tr("Rescan"), this, SLOT( populateRemoteView() )); | 941 | m->insertItem( tr("Rescan"), this, SLOT( populateRemoteView() )); |
937 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 942 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); |