summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-04-30 12:13:14 (UTC)
committer llornkcor <llornkcor>2002-04-30 12:13:14 (UTC)
commit99ae08c3e872fb9dcbba8057ee98f9f1687d0af1 (patch) (side-by-side diff)
tree48546f25bfd565839687cde043e5ab1079098ae6
parent713aa4385e859c9300ee2a5b0086fbaabf3b3a33 (diff)
downloadopie-99ae08c3e872fb9dcbba8057ee98f9f1687d0af1.zip
opie-99ae08c3e872fb9dcbba8057ee98f9f1687d0af1.tar.gz
opie-99ae08c3e872fb9dcbba8057ee98f9f1687d0af1.tar.bz2
took out QCop busy() because its too slow to respond, fixed titlebar after disconnect still showing ftp server info
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 6684abb..6d0be57 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -387,13 +387,13 @@ void OpieFtp::connectorBtnToggled(bool On)
}
}
void OpieFtp::connector()
{
- QCopEnvelope ( "QPE/System", "busy()" );
+// QCopEnvelope ( "QPE/System", "busy()" );
// qApp->processEvents();
currentRemoteDir=remotePath->text();
if(ServerComboBox->currentText().isEmpty()) {
QMessageBox::warning(this,tr("Ftp"),tr("Please set the server info"),tr("Ok"),0,0);
TabWidget->setCurrentPage(2);
ServerComboBox->setFocus();
@@ -430,24 +430,25 @@ void OpieFtp::connector()
return ;
}
remoteDirList("/") ;
setCaption(ftp_host);
writeConfig();
connectServerBtn->setText( tr("Disconnect"));
- QCopEnvelope ( "QPE/System", "notBusy()" );
+// QCopEnvelope ( "QPE/System", "notBusy()" );
}
void OpieFtp::disConnector()
{
if(conn)
FtpQuit(conn);
setCaption("OpieFtp");
currentRemoteDir="/";
Remote_View->clear();
connectServerBtn->setText( tr("Connect"));
connectServerBtn->setOn(FALSE);
+ setCaption("OpieFtp");
}
void OpieFtp::localUpload()
{
int fsz;
// QCopEnvelope ( "QPE/System", "busy()" );
@@ -487,13 +488,13 @@ void OpieFtp::localUpload()
for ( ; it.current(); ++it ) {
Local_View->clearSelection();
}
Local_View->clearFocus();
TabWidget->setCurrentPage(1);
remoteDirList( (const QString &)currentRemoteDir); //this also calls populate
- QCopEnvelope ( "QPE/System", "notBusy()" );
+// QCopEnvelope ( "QPE/System", "notBusy()" );
}
void OpieFtp::nullifyCallBack()
{
FtpOptions(FTPLIB_CALLBACK, NULL, conn);
FtpOptions(FTPLIB_IDLETIME, NULL, conn);
@@ -502,13 +503,13 @@ void OpieFtp::nullifyCallBack()
}
void OpieFtp::remoteDownload()
{
// qApp->processEvents();
int fsz;
- QCopEnvelope ( "QPE/System", "busy()" );
+// QCopEnvelope ( "QPE/System", "busy()" );
QList<QListViewItem> * getSelectedItems( QListView * Remote_View );
QListViewItemIterator it( Remote_View );
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
QString strItem = it.current()->text(0);
@@ -545,49 +546,49 @@ void OpieFtp::remoteDownload()
for ( ; it.current(); ++it ) {
Remote_View->clearSelection();
}
Remote_View->setFocus();
TabWidget->setCurrentPage(0);
populateLocalView();
- QCopEnvelope ( "QPE/System", "notBusy()" );
+// QCopEnvelope ( "QPE/System", "notBusy()" );
}
bool OpieFtp::remoteDirList(const QString &dir)
{
QString tmp = QDir::homeDirPath();
if(tmp.right(1) != "/")
tmp+="/._temp";
else
tmp+="._temp";
// qDebug("Listing remote dir "+tmp);
- QCopEnvelope ( "QPE/System", "busy()" );
+// QCopEnvelope ( "QPE/System", "busy()" );
if (!FtpDir( tmp.latin1(), dir.latin1(), conn) ) {
QString msg;
msg.sprintf(tr("Unable to list the directory\n")+dir+"\n%s",FtpLastResponse(conn) );
msg.replace(QRegExp(":"),"\n");
QMessageBox::message(tr("Note"),msg);
return false;
}
populateRemoteView() ;
- QCopEnvelope ( "QPE/System", "notBusy()" );
+// QCopEnvelope ( "QPE/System", "notBusy()" );
return true;
}
bool OpieFtp::remoteChDir(const QString &dir)
{
- QCopEnvelope ( "QPE/System", "busy()" );
+// QCopEnvelope ( "QPE/System", "busy()" );
if (!FtpChdir( dir.latin1(), conn )) {
QString msg;
msg.sprintf(tr("Unable to change directories\n")+dir+"\n%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
QMessageBox::message(tr("Note"),msg);
// qDebug(msg);
- QCopEnvelope ( "QPE/System", "notBusy()" );
+// QCopEnvelope ( "QPE/System", "notBusy()" );
return FALSE;
}
- QCopEnvelope ( "QPE/System", "notBusy()" );
+// QCopEnvelope ( "QPE/System", "notBusy()" );
return TRUE;
}
void OpieFtp::populateLocalView()
{
Local_View->clear();
@@ -752,13 +753,13 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
// qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir);
} else {
currentRemoteDir = currentRemoteDir+strItem;
}
} else {
- QCopEnvelope ( "QPE/System", "notBusy()" );
+// QCopEnvelope ( "QPE/System", "notBusy()" );
return;
}
}
remoteDirList( (const QString &)currentRemoteDir); //this also calls populate
if(currentRemoteDir.right(1) !="/")
currentRemoteDir +="/";
@@ -954,33 +955,33 @@ void OpieFtp::remoteMakDir()
InputDialog *fileDlg;
fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0);
fileDlg->exec();
if( fileDlg->result() == 1 ) {
QString filename = fileDlg->LineEdit1->text();//+".playlist";
QString tmp=currentRemoteDir+filename;
- QCopEnvelope ( "QPE/System", "busy()" );
+// QCopEnvelope ( "QPE/System", "busy()" );
if(FtpMkdir( tmp.latin1(), conn) == 0) {
QString msg;
msg.sprintf(tr("Unable to make directory\n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
QMessageBox::message(tr("Note"),msg);
}
- QCopEnvelope ( "QPE/System", "notBusy()" );
+// QCopEnvelope ( "QPE/System", "notBusy()" );
remoteDirList( (const QString &)currentRemoteDir); //this also calls populate
}
}
void OpieFtp::remoteDelete()
{
QList<QListViewItem> * getSelectedItems( QListView * Remote_View );
QListViewItemIterator it( Remote_View );
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
QString f = it.current()->text(0);
// QString f = Remote_View->currentItem()->text(0);
- QCopEnvelope ( "QPE/System", "busy()" );
+// QCopEnvelope ( "QPE/System", "busy()" );
if( f.right(1) =="/") {
QString path= currentRemoteDir+f;
switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+"?"
,tr("Yes"),tr("No"),0,0,1) ) {
case 0: {
f=currentDir.canonicalPath()+"/"+f;
@@ -1009,33 +1010,33 @@ void OpieFtp::remoteDelete()
}
break;
};
}
}
}
- QCopEnvelope ( "QPE/System", "notBusy()" );
+// QCopEnvelope ( "QPE/System", "notBusy()" );
}
void OpieFtp::remoteRename()
{
QString curFile = Remote_View->currentItem()->text(0);
InputDialog *fileDlg;
fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0);
fileDlg->setTextEdit((const QString &)curFile);
fileDlg->exec();
if( fileDlg->result() == 1 ) {
QString oldName = currentRemoteDir +"/"+ curFile;
QString newName = currentRemoteDir +"/"+ fileDlg->LineEdit1->text();//+".playlist";
- QCopEnvelope ( "QPE/System", "busy()" );
+// QCopEnvelope ( "QPE/System", "busy()" );
if(FtpRename( oldName.latin1(), newName.latin1(),conn) == 0) {
QString msg;
msg.sprintf(tr("Unable to rename file\n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
QMessageBox::message(tr("Note"),msg);
}
- QCopEnvelope ( "QPE/System", "notBusy()" );
+// QCopEnvelope ( "QPE/System", "notBusy()" );
remoteDirList( (const QString &)currentRemoteDir); //this also calls populate
}
}
void OpieFtp::localRename()
{