author | drw <drw> | 2004-11-16 18:19:09 (UTC) |
---|---|---|
committer | drw <drw> | 2004-11-16 18:19:09 (UTC) |
commit | 64dabf8fbdc8593611b3438e6c9f5d3d7c40016f (patch) (unidiff) | |
tree | 3ed2679418f82bb69c9ecff7213d0c97817a9c4a | |
parent | 47a5c043c7ee0647da508ee63b5b8ec27205a9c3 (diff) | |
download | opie-64dabf8fbdc8593611b3438e6c9f5d3d7c40016f.zip opie-64dabf8fbdc8593611b3438e6c9f5d3d7c40016f.tar.gz opie-64dabf8fbdc8593611b3438e6c9f5d3d7c40016f.tar.bz2 |
Remove commented out code
-rw-r--r-- | noncore/settings/packagemanager/oipkgconfigdlg.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp index 25052f8..886430f 100644 --- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp +++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp | |||
@@ -482,129 +482,128 @@ void OIpkgConfigDlg::slotServerEdit( int index ) | |||
482 | 482 | ||
483 | void OIpkgConfigDlg::slotServerNew() | 483 | void OIpkgConfigDlg::slotServerNew() |
484 | { | 484 | { |
485 | m_serverNew = true; | 485 | m_serverNew = true; |
486 | 486 | ||
487 | m_serverName->setText( QString::null ); | 487 | m_serverName->setText( QString::null ); |
488 | m_serverLocation->setText( QString::null ); | 488 | m_serverLocation->setText( QString::null ); |
489 | m_serverActive->setChecked( true ); | 489 | m_serverActive->setChecked( true ); |
490 | m_serverName->setFocus(); | 490 | m_serverName->setFocus(); |
491 | } | 491 | } |
492 | 492 | ||
493 | void OIpkgConfigDlg::slotServerDelete() | 493 | void OIpkgConfigDlg::slotServerDelete() |
494 | { | 494 | { |
495 | // Find selected server in list | 495 | // Find selected server in list |
496 | OConfItem *server = findConfItem( OConfItem::Source, m_serverList->currentText() ); | 496 | OConfItem *server = findConfItem( OConfItem::Source, m_serverList->currentText() ); |
497 | 497 | ||
498 | // Delete server | 498 | // Delete server |
499 | if ( server ) | 499 | if ( server ) |
500 | { | 500 | { |
501 | m_configs->removeRef( server ); | 501 | m_configs->removeRef( server ); |
502 | m_serverList->removeItem( m_serverCurrent ); | 502 | m_serverList->removeItem( m_serverCurrent ); |
503 | } | 503 | } |
504 | } | 504 | } |
505 | 505 | ||
506 | void OIpkgConfigDlg::slotServerUpdate() | 506 | void OIpkgConfigDlg::slotServerUpdate() |
507 | { | 507 | { |
508 | QString newName = m_serverName->text(); | 508 | QString newName = m_serverName->text(); |
509 | 509 | ||
510 | // Convert any spaces to underscores | 510 | // Convert any spaces to underscores |
511 | newName.replace( QRegExp( " " ), "_" ); | 511 | newName.replace( QRegExp( " " ), "_" ); |
512 | 512 | ||
513 | if ( !m_serverNew ) | 513 | if ( !m_serverNew ) |
514 | { | 514 | { |
515 | // Find selected server in list | 515 | // Find selected server in list |
516 | OConfItem *server = findConfItem( OConfItem::Source, m_serverCurrName ); | 516 | OConfItem *server = findConfItem( OConfItem::Source, m_serverCurrName ); |
517 | 517 | ||
518 | // Delete server | 518 | // Delete server |
519 | if ( server ) | 519 | if ( server ) |
520 | { | 520 | { |
521 | // Update url | 521 | // Update url |
522 | server->setValue( m_serverLocation->text() ); | 522 | server->setValue( m_serverLocation->text() ); |
523 | server->setActive( m_serverActive->isChecked() ); | 523 | server->setActive( m_serverActive->isChecked() ); |
524 | 524 | ||
525 | // Check if server name has changed, if it has then we need to replace the key in the map | 525 | // Check if server name has changed, if it has then we need to replace the key in the map |
526 | if ( m_serverCurrName != newName ) | 526 | if ( m_serverCurrName != newName ) |
527 | { | 527 | { |
528 | // Update server name | 528 | // Update server name |
529 | server->setName( newName ); | 529 | server->setName( newName ); |
530 | 530 | ||
531 | // Update list box | 531 | // Update list box |
532 | m_serverList->changeItem( newName, m_serverCurrent ); | 532 | m_serverList->changeItem( newName, m_serverCurrent ); |
533 | } | 533 | } |
534 | } | 534 | } |
535 | } | 535 | } |
536 | else | 536 | else |
537 | { | 537 | { |
538 | // Add new destination to configuration list | 538 | // Add new destination to configuration list |
539 | m_configs->append( new OConfItem( OConfItem::Source, newName, | 539 | m_configs->append( new OConfItem( OConfItem::Source, newName, |
540 | m_serverLocation->text(), m_serverActive->isChecked() ) ); | 540 | m_serverLocation->text(), m_serverActive->isChecked() ) ); |
541 | m_configs->sort(); | 541 | m_configs->sort(); |
542 | 542 | ||
543 | m_serverList->insertItem( newName ); | 543 | m_serverList->insertItem( newName ); |
544 | m_serverList->setCurrentItem( m_serverList->count() ); | 544 | m_serverList->setCurrentItem( m_serverList->count() ); |
545 | m_serverNew = false; | 545 | m_serverNew = false; |
546 | // m_serverList->insertItem( newName ); | ||
547 | } | 546 | } |
548 | } | 547 | } |
549 | 548 | ||
550 | void OIpkgConfigDlg::slotDestEdit( int index ) | 549 | void OIpkgConfigDlg::slotDestEdit( int index ) |
551 | { | 550 | { |
552 | m_destNew = false; | 551 | m_destNew = false; |
553 | m_destCurrent = index; | 552 | m_destCurrent = index; |
554 | 553 | ||
555 | // Find selected destination in list | 554 | // Find selected destination in list |
556 | OConfItem *destination = findConfItem( OConfItem::Destination, m_destList->currentText() ); | 555 | OConfItem *destination = findConfItem( OConfItem::Destination, m_destList->currentText() ); |
557 | 556 | ||
558 | // Display destination details | 557 | // Display destination details |
559 | if ( destination ) | 558 | if ( destination ) |
560 | { | 559 | { |
561 | m_destCurrName = destination->name(); | 560 | m_destCurrName = destination->name(); |
562 | m_destName->setText( destination->name() ); | 561 | m_destName->setText( destination->name() ); |
563 | m_destLocation->setText( destination->value() ); | 562 | m_destLocation->setText( destination->value() ); |
564 | m_destActive->setChecked( destination->active() ); | 563 | m_destActive->setChecked( destination->active() ); |
565 | m_destName->setFocus(); | 564 | m_destName->setFocus(); |
566 | } | 565 | } |
567 | } | 566 | } |
568 | 567 | ||
569 | void OIpkgConfigDlg::slotDestNew() | 568 | void OIpkgConfigDlg::slotDestNew() |
570 | { | 569 | { |
571 | m_destNew = true; | 570 | m_destNew = true; |
572 | 571 | ||
573 | m_destName->setText( QString::null ); | 572 | m_destName->setText( QString::null ); |
574 | m_destLocation->setText( QString::null ); | 573 | m_destLocation->setText( QString::null ); |
575 | m_destActive->setChecked( true ); | 574 | m_destActive->setChecked( true ); |
576 | m_destName->setFocus(); | 575 | m_destName->setFocus(); |
577 | } | 576 | } |
578 | 577 | ||
579 | void OIpkgConfigDlg::slotDestDelete() | 578 | void OIpkgConfigDlg::slotDestDelete() |
580 | { | 579 | { |
581 | // Find selected destination in list | 580 | // Find selected destination in list |
582 | OConfItem *destination = findConfItem( OConfItem::Destination, m_destList->currentText() ); | 581 | OConfItem *destination = findConfItem( OConfItem::Destination, m_destList->currentText() ); |
583 | 582 | ||
584 | // Delete destination | 583 | // Delete destination |
585 | if ( destination ) | 584 | if ( destination ) |
586 | { | 585 | { |
587 | m_configs->removeRef( destination ); | 586 | m_configs->removeRef( destination ); |
588 | m_destList->removeItem( m_destCurrent ); | 587 | m_destList->removeItem( m_destCurrent ); |
589 | } | 588 | } |
590 | } | 589 | } |
591 | 590 | ||
592 | void OIpkgConfigDlg::slotDestSelectPath() | 591 | void OIpkgConfigDlg::slotDestSelectPath() |
593 | { | 592 | { |
594 | QString path = Opie::Ui::OFileDialog::getDirectory( 0, m_destLocation->text() ); | 593 | QString path = Opie::Ui::OFileDialog::getDirectory( 0, m_destLocation->text() ); |
595 | if ( path.at( path.length() - 1 ) == '/' ) | 594 | if ( path.at( path.length() - 1 ) == '/' ) |
596 | path.truncate( path.length() - 1 ); | 595 | path.truncate( path.length() - 1 ); |
597 | m_destLocation->setText( path ); | 596 | m_destLocation->setText( path ); |
598 | } | 597 | } |
599 | 598 | ||
600 | void OIpkgConfigDlg::slotDestUpdate() | 599 | void OIpkgConfigDlg::slotDestUpdate() |
601 | { | 600 | { |
602 | QString newName = m_destName->text(); | 601 | QString newName = m_destName->text(); |
603 | 602 | ||
604 | // Convert any spaces to underscores | 603 | // Convert any spaces to underscores |
605 | newName.replace( QRegExp( " " ), "_" ); | 604 | newName.replace( QRegExp( " " ), "_" ); |
606 | 605 | ||
607 | if ( !m_destNew ) | 606 | if ( !m_destNew ) |
608 | { | 607 | { |
609 | // Find selected destination in list | 608 | // Find selected destination in list |
610 | OConfItem *destination = findConfItem( OConfItem::Destination, m_destCurrName ); | 609 | OConfItem *destination = findConfItem( OConfItem::Destination, m_destCurrName ); |