summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-03-31 02:00:57 (UTC)
committer llornkcor <llornkcor>2002-03-31 02:00:57 (UTC)
commit13da5064c21e124f2202310ac4c54cb3ddc8c0b1 (patch) (side-by-side diff)
treed95a8c039a1240aace32be1751382ea43b8c77cc
parent04158decf6fa76d966be178d07e1895336a47bd9 (diff)
downloadopie-13da5064c21e124f2202310ac4c54cb3ddc8c0b1.zip
opie-13da5064c21e124f2202310ac4c54cb3ddc8c0b1.tar.gz
opie-13da5064c21e124f2202310ac4c54cb3ddc8c0b1.tar.bz2
fixed some goofy crap I thought I fixed earlier with server combo and multiple entries. oh well. Also fixed single click going into a repopulate(bad when remote)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp33
1 files changed, 19 insertions, 14 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 3dda17e..e64fd73 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -132,9 +132,10 @@ OpieFtp::OpieFtp( )
Local_View->setColumnAlignment(2,QListView::AlignRight);
Local_View->setAllColumnsShowFocus(TRUE);
Local_View->setMultiSelection( TRUE );
Local_View->setSelectionMode(QListView::Extended);
- QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold);
+
+ QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold);
tabLayout->addWidget( Local_View, 0, 0 );
connect( Local_View, SIGNAL( clicked( QListViewItem*)),
@@ -317,9 +318,8 @@ void OpieFtp::newConnection()
ServerComboBox->lineEdit()->setText( "");
remotePath->setText( currentRemoteDir = "/");
PortSpinBox->setValue( 21);
TabWidget->setCurrentPage(2);
- currentServerConfig = -1;
}
void OpieFtp::serverComboEdited(const QString & edit)
{
@@ -431,10 +431,10 @@ void OpieFtp::localUpload()
QMessageBox::message(tr("Note"),tr("Cannot upload directories"));
}
ProgressBar->reset();
nullifyCallBack();
- it.current()->setSelected(FALSE);
} //end currentSelected
+ it.current()->setSelected(FALSE);
}
TabWidget->setCurrentPage(1);
remoteDirList( (const QString &)currentRemoteDir); //this also calls populate
QCopEnvelope ( "QPE/System", "notBusy()" );
@@ -485,10 +485,10 @@ void OpieFtp::remoteDownload()
QMessageBox::message(tr("Note"),msg);
}
ProgressBar->reset();
nullifyCallBack();
- it.current()->setSelected(FALSE);
}
+ it.current()->setSelected(FALSE);
}
TabWidget->setCurrentPage(0);
populateLocalView();
QCopEnvelope ( "QPE/System", "notBusy()" );
@@ -656,9 +656,9 @@ bool OpieFtp::populateRemoteView( )
void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
{
if( selectedItem) {
- QCopEnvelope ( "QPE/System", "busy()" );
+// QCopEnvelope ( "QPE/System", "busy()" );
QString oldRemoteCurrentDir = currentRemoteDir;
QString strItem=selectedItem->text(0);
strItem=strItem.simplifyWhiteSpace();
if(strItem == "../") { // the user wants to go ^
@@ -685,30 +685,30 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
currentRemoteDir = strItem;
if( !remoteChDir( (const QString &)strItem)) {
currentRemoteDir = oldRemoteCurrentDir;
strItem="";
- qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir);
+// qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir);
}
} else if(strItem.find("/",0,TRUE) != -1) { // this is a directory
- qDebug("trying directory");
if( !remoteChDir( (const QString &)currentRemoteDir + strItem)) {
currentRemoteDir = oldRemoteCurrentDir;
strItem="";
- qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir);
+// qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir);
} else {
currentRemoteDir = currentRemoteDir+strItem;
}
} else {
- qDebug("download "+strItem);
+ QCopEnvelope ( "QPE/System", "notBusy()" );
+ return;
}
}
remoteDirList( (const QString &)currentRemoteDir); //this also calls populate
if(currentRemoteDir.right(1) !="/")
currentRemoteDir +="/";
- currentPathCombo->lineEdit()->setText( currentRemoteDir );
- fillRemoteCombo( (const QString &)currentDir);
- QCopEnvelope ( "QPE/System", "notBusy()" );
+ currentPathCombo->lineEdit()->setText( currentRemoteDir);
+ fillRemoteCombo( (const QString &)currentRemoteDir);
+// QCopEnvelope ( "QPE/System", "notBusy()" );
}
}
void OpieFtp::localListClicked(QListViewItem *selectedItem)
@@ -726,8 +726,9 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem)
populateLocalView();
}
} else { // not a symlink
if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) {
+
if(QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem)).exists() ) {
strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem);
currentDir.cd(strItem,FALSE);
populateLocalView();
@@ -742,8 +743,9 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem)
} else {
strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem);
if( QFile::exists(strItem ) ) {
// qDebug("upload "+strItem);
+ return;
}
} //end not symlink
chdir(strItem.latin1());
}
@@ -1067,14 +1069,18 @@ void OpieFtp::readConfig()
}
void OpieFtp::writeConfig()
{
-
Config cfg("opieftp");
cfg.setGroup("Server");
QString username, remoteServerStr, remotePathStr, password, port, temp;
int numberOfEntries = cfg.readNumEntry("numberOfEntries",0);
if( currentServerConfig == -1) {
+ for (int i = 1; i <= numberOfEntries; i++) {
+ temp.setNum(i);
+ cfg.setGroup("Server");
+ QString tempStr = cfg.readEntry( temp,"");
+ }
temp.setNum( numberOfEntries + 1);
cfg.setGroup("Server");
remoteServerStr = cfg.readEntry( temp,"");
@@ -1089,9 +1095,8 @@ void OpieFtp::writeConfig()
cfg.writeEntry("Username", UsernameComboBox->currentText());
cfg.writeEntryCrypt( UsernameComboBox->currentText(), PasswordEdit->text());
cfg.setGroup("Server");
cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries + 1 ));
-
}
}
void OpieFtp::fillCombos()