summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 58ffe3a..b703217 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -322,114 +322,117 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl)
322 ProgressBar = new QProgressBar( view, "ProgressBar" ); 322 ProgressBar = new QProgressBar( view, "ProgressBar" );
323 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4); 323 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4);
324 ProgressBar->setMaximumHeight(10); 324 ProgressBar->setMaximumHeight(10);
325 filterStr="*"; 325 filterStr="*";
326 b=FALSE; 326 b=FALSE;
327 populateLocalView(); 327 populateLocalView();
328 readConfig(); 328 readConfig();
329 329
330// ServerComboBox->setCurrentItem(currentServerConfig); 330// ServerComboBox->setCurrentItem(currentServerConfig);
331 331
332 TabWidget->setCurrentPage(2); 332 TabWidget->setCurrentPage(2);
333 odebug << "Constructor done" << oendl; 333 odebug << "Constructor done" << oendl;
334} 334}
335 335
336OpieFtp::~OpieFtp() 336OpieFtp::~OpieFtp()
337{ 337{
338} 338}
339 339
340void OpieFtp::cleanUp() 340void OpieFtp::cleanUp()
341{ 341{
342 if(conn) 342 if(conn)
343 FtpQuit(conn); 343 FtpQuit(conn);
344 QString sfile=QDir::homeDirPath(); 344 QString sfile=QDir::homeDirPath();
345 if(sfile.right(1) != "/") 345 if(sfile.right(1) != "/")
346 sfile+="/._temp"; 346 sfile+="/._temp";
347 else 347 else
348 sfile+="._temp"; 348 sfile+="._temp";
349 QFile file( sfile); 349 QFile file( sfile);
350 if(file.exists()) 350 if(file.exists())
351 file.remove(); 351 file.remove();
352 Config cfg("opieftp"); 352 Config cfg("opieftp");
353 cfg.setGroup("Server"); 353 cfg.setGroup("Server");
354 cfg.writeEntry("currentServer", currentServerConfig); 354 cfg.writeEntry("currentServer", currentServerConfig);
355 355
356 exit(0); 356 exit(0);
357} 357}
358 358
359void OpieFtp::tabChanged(QWidget *) 359void OpieFtp::tabChanged(QWidget *)
360{ 360{
361 if (TabWidget->currentPageIndex() == 0) { 361 if (TabWidget->currentPageIndex() == 0) {
362 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 362 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
363 tabMenu->setItemChecked(tabMenu->idAt(0),TRUE); 363 tabMenu->setItemChecked(tabMenu->idAt(0),TRUE);
364 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); 364 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE);
365 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); 365 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE);
366 if(cdUpButton->isHidden()) 366 if(cdUpButton->isHidden())
367 cdUpButton->show(); 367 cdUpButton->show();
368 if(homeButton->isHidden()) 368 if(homeButton->isHidden())
369 homeButton->show(); 369 homeButton->show();
370 if(currentPathCombo->isHidden()) currentPathCombo->show();
370 371
371 } 372 }
372 if (TabWidget->currentPageIndex() == 1) { 373 if (TabWidget->currentPageIndex() == 1) {
373 currentPathCombo->lineEdit()->setText( currentRemoteDir ); 374 currentPathCombo->lineEdit()->setText( currentRemoteDir );
374 tabMenu->setItemChecked(tabMenu->idAt(1),TRUE); 375 tabMenu->setItemChecked(tabMenu->idAt(1),TRUE);
375 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); 376 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE);
376 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); 377 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE);
377 if(cdUpButton->isHidden()) 378 if(cdUpButton->isHidden())
378 cdUpButton->show(); 379 cdUpButton->show();
379 homeButton->hide(); 380 homeButton->hide();
381 if(currentPathCombo->isHidden()) currentPathCombo->show();
380 382
381 } 383 }
382 if (TabWidget->currentPageIndex() == 2) { 384 if (TabWidget->currentPageIndex() == 2) {
383 tabMenu->setItemChecked(tabMenu->idAt(2),TRUE); 385 tabMenu->setItemChecked(tabMenu->idAt(2),TRUE);
384 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); 386 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE);
385 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); 387 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE);
386 cdUpButton->hide(); 388 cdUpButton->hide();
387 homeButton->hide(); 389 homeButton->hide();
390 if(!currentPathCombo->isHidden()) currentPathCombo->hide();
388 } 391 }
389} 392}
390 393
391void OpieFtp::newConnection() 394void OpieFtp::newConnection()
392{ 395{
393 UsernameComboBox->lineEdit()->setText(""); 396 UsernameComboBox->lineEdit()->setText("");
394 PasswordEdit->setText( "" ); 397 PasswordEdit->setText( "" );
395 ServerComboBox->lineEdit()->setText( ""); 398 ServerComboBox->lineEdit()->setText( "");
396 remotePath->setText( currentRemoteDir = "/"); 399 remotePath->setText( currentRemoteDir = "/");
397 PortSpinBox->setValue( 21); 400 PortSpinBox->setValue( 21);
398 TabWidget->setCurrentPage(2); 401 TabWidget->setCurrentPage(2);
399} 402}
400 403
401void OpieFtp::serverComboEdited(const QString & ) 404void OpieFtp::serverComboEdited(const QString & )
402{ 405{
403// if( ServerComboBox->text(currentServerConfig) != edit /*edit.isEmpty() */) { 406// if( ServerComboBox->text(currentServerConfig) != edit /*edit.isEmpty() */) {
404// odebug << "ServerComboEdited" << oendl; 407// odebug << "ServerComboEdited" << oendl;
405// // currentServerConfig = -1; 408// // currentServerConfig = -1;
406// } 409// }
407} 410}
408 411
409void OpieFtp::UsernameComboBoxEdited(const QString &) { 412void OpieFtp::UsernameComboBoxEdited(const QString &) {
410// currentServerConfig = -1; 413// currentServerConfig = -1;
411} 414}
412 415
413void OpieFtp::PasswordEditEdited(const QString & ) { 416void OpieFtp::PasswordEditEdited(const QString & ) {
414// currentServerConfig = -1; 417// currentServerConfig = -1;
415} 418}
416 419
417void OpieFtp::connectorBtnToggled(bool On) 420void OpieFtp::connectorBtnToggled(bool On)
418{ 421{
419 if(On) { 422 if(On) {
420 connector(); 423 connector();
421 } else { 424 } else {
422 disConnector(); 425 disConnector();
423 } 426 }
424 427
425} 428}
426 429
427void OpieFtp::connector() 430void OpieFtp::connector()
428{ 431{
429// QCopEnvelope ( "QPE/System", "busy()" ); 432// QCopEnvelope ( "QPE/System", "busy()" );
430// qApp->processEvents(); 433// qApp->processEvents();
431 currentRemoteDir=remotePath->text(); 434 currentRemoteDir=remotePath->text();
432 435
433 if( ServerComboBox->currentText().isEmpty()) { 436 if( ServerComboBox->currentText().isEmpty()) {
434 437
435 QMessageBox::warning(this,tr("Ftp"),tr("Please set the server info"),tr("Ok"),0,0); 438 QMessageBox::warning(this,tr("Ftp"),tr("Please set the server info"),tr("Ok"),0,0);