summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-03-16 15:16:58 (UTC)
committer llornkcor <llornkcor>2002-03-16 15:16:58 (UTC)
commit1d20ca78752b9da597950087438daa9ff8cb7951 (patch) (unidiff)
tree5cce2048ba6cd8fd16e98bf9f4ab8c5ead4fe8b3
parent585373903040f7d283c8fef1841147739f0510d8 (diff)
downloadopie-1d20ca78752b9da597950087438daa9ff8cb7951.zip
opie-1d20ca78752b9da597950087438daa9ff8cb7951.tar.gz
opie-1d20ca78752b9da597950087438daa9ff8cb7951.tar.bz2
added cd to stylus hold, so user doesn't have to double click
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp37
-rw-r--r--noncore/net/opieftp/opieftp.h6
2 files changed, 32 insertions, 11 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()
425{ 425{
426 Remote_View->clear(); 426 Remote_View->clear();
427 QFile tmp("./._temp"); 427 QFile tmp("./._temp");
@@ -446,3 +446,4 @@ bool OpieFtp::populateRemoteView()
446 tmp.close(); 446 tmp.close();
447 } 447 } else
448 qDebug("temp file not opened successfullly");
448 return true; 449 return true;
@@ -506,3 +507,3 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
506 507
507 void OpieFtp::localListClicked(QListViewItem *selectedItem) 508void OpieFtp::localListClicked(QListViewItem *selectedItem)
508{ 509{
@@ -542,2 +543,13 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
542 543
544void OpieFtp::doLocalCd()
545{
546 localListClicked( Local_View->currentItem());
547}
548
549void OpieFtp:: doRemoteCd()
550{
551 remoteListClicked( Remote_View->currentItem());
552
553}
554
543void OpieFtp::showHidden() 555void OpieFtp::showHidden()
@@ -562,4 +574,4 @@ void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &point,
562 break; 574 break;
563 case 2: 575 case 2:
564 showLocalMenu(); 576 showLocalMenu(item);
565 break; 577 break;
@@ -573,4 +585,4 @@ void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &p
573 break; 585 break;
574 case 2: 586 case 2:
575 showRemoteMenu(); 587 showRemoteMenu(item);
576 break; 588 break;
@@ -579,5 +591,8 @@ void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &p
579 591
580void OpieFtp::showRemoteMenu() 592void OpieFtp::showRemoteMenu(QListViewItem * item)
581{ 593{
582 QPopupMenu m;// = new QPopupMenu( Local_View ); 594 QPopupMenu m;// = new QPopupMenu( Local_View );
595 if(item->text(0).right(1) == "/")
596 m.insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() ));
597 else
583 m.insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); 598 m.insertItem( tr( "Download" ), this, SLOT( remoteDownload() ));
@@ -590,3 +605,3 @@ void OpieFtp::showRemoteMenu()
590 605
591void OpieFtp::showLocalMenu() 606void OpieFtp::showLocalMenu(QListViewItem * item)
592{ 607{
@@ -594,2 +609,6 @@ void OpieFtp::showLocalMenu()
594 m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); 609 m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
610 m.insertSeparator();
611 if(item->text(0).right(1) == "/")
612 m.insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
613 else
595 m.insertItem( tr( "Upload" ), this, SLOT( localUpload() )); 614 m.insertItem( tr( "Upload" ), this, SLOT( localUpload() ));
diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h
index e00a398..5d1c63d 100644
--- a/noncore/net/opieftp/opieftp.h
+++ b/noncore/net/opieftp/opieftp.h
@@ -63,4 +63,6 @@ public:
63protected slots: 63protected slots:
64 void showLocalMenu( ); 64 void showLocalMenu( QListViewItem *);
65 void showRemoteMenu( ); 65 void showRemoteMenu( QListViewItem *);
66 void doLocalCd();
67 void doRemoteCd();
66 void localUpload(); 68 void localUpload();