-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index efcaf84..36de842 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -138,14 +138,14 @@ OpieFtp::OpieFtp( ) tabLayout->addWidget( Local_View, 0, 0 ); connect( Local_View, SIGNAL( clicked( QListViewItem*)), this,SLOT( localListClicked(QListViewItem *)) ); // connect( Local_View, SIGNAL( doubleClicked( QListViewItem*)), // this,SLOT( localListClicked(QListViewItem *)) ); - connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), - this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); +// connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), +// this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); TabWidget->insertTab( tab, tr( "Local" ) ); tab_2 = new QWidget( TabWidget, "tab_2" ); tabLayout_2 = new QGridLayout( tab_2 ); tabLayout_2->setSpacing( 2); @@ -258,24 +258,12 @@ OpieFtp::OpieFtp( ) ProgressBar = new QProgressBar( this, "ProgressBar" ); layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 3 ); // fillCombos(); -#ifdef DEVELOPERS_VERSION - ServerComboBox->lineEdit()->setText( tr( "192.168.129.201" ) ); - UsernameComboBox->lineEdit()->setText("root"); - PortSpinBox->setValue( 4242); - remotePath->setText( currentRemoteDir = "/"); -// ServerComboBox->lineEdit()->setText( tr( "llornkcor.com" ) ); -// UsernameComboBox->lineEdit()->setText("llornkcor"); -// PortSpinBox->setValue( 21); -// remotePath->setText( currentRemoteDir = "/home/llornkcor"); - PasswordEdit->setText( tr( "" ) ); -#endif - filterStr="*"; b=FALSE; populateLocalView(); readConfig(); ServerComboBox->setCurrentItem(currentServerConfig); TabWidget->setCurrentPage(2); @@ -720,13 +708,15 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) QCopEnvelope ( "QPE/System", "notBusy()" ); } } void OpieFtp::localListClicked(QListViewItem *selectedItem) { - if(item) { +// qDebug(selectedItem->text(0)); + if(item!= NULL) { + QString strItem=selectedItem->text(0); QString strSize=selectedItem->text(1); strSize=strSize.stripWhiteSpace(); if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink // is symlink QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); @@ -786,19 +776,16 @@ void OpieFtp::showHidden() } populateLocalView(); } void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) { - switch (mouse) { - case 1: - break; - case 2: +// if(item) +if (mouse == 2) { showLocalMenu(item); - break; - }; + } } void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) { switch (mouse) { case 1: @@ -822,12 +809,13 @@ void OpieFtp::showRemoteMenu(QListViewItem * item) m.insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); m.exec( QCursor::pos() ); } void OpieFtp::showLocalMenu(QListViewItem * item) { + QPopupMenu m; m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); m.insertSeparator(); if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) !=-1) m.insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); else |