author | kergoth <kergoth> | 2002-04-14 01:02:18 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-04-14 01:02:18 (UTC) |
commit | ed4148887805150f52e1f20d45efcefc1bb2f390 (patch) (unidiff) | |
tree | 1d84859b7729d47cf71ba8e154a8e6310404595b | |
parent | 47f50cc423eab9e36a72bff18d1815d77d5dee00 (diff) | |
download | opie-ed4148887805150f52e1f20d45efcefc1bb2f390.zip opie-ed4148887805150f52e1f20d45efcefc1bb2f390.tar.gz opie-ed4148887805150f52e1f20d45efcefc1bb2f390.tar.bz2 |
commenting added feeds by default when unselected is unintuitive.
-rw-r--r-- | noncore/unsupported/oipkg/packagemanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/packagemanager.cpp b/noncore/unsupported/oipkg/packagemanager.cpp index f3da15d..642eae9 100644 --- a/noncore/unsupported/oipkg/packagemanager.cpp +++ b/noncore/unsupported/oipkg/packagemanager.cpp | |||
@@ -576,66 +576,66 @@ bool PackageManager::readIpkgConfig(const QString& conffile) | |||
576 | /* | 576 | /* |
577 | * public slot | 577 | * public slot |
578 | */ | 578 | */ |
579 | void PackageManager::doSettings() | 579 | void PackageManager::doSettings() |
580 | { | 580 | { |
581 | settings->showMaximized(); | 581 | settings->showMaximized(); |
582 | if ( settings->exec() ) { | 582 | if ( settings->exec() ) { |
583 | writeSettings(); | 583 | writeSettings(); |
584 | startRun(); | 584 | startRun(); |
585 | runIpkg("update"); | 585 | runIpkg("update"); |
586 | endRun(); | 586 | endRun(); |
587 | updatePackageList(); | 587 | updatePackageList(); |
588 | } else { | 588 | } else { |
589 | readSettings(); | 589 | readSettings(); |
590 | } | 590 | } |
591 | } | 591 | } |
592 | 592 | ||
593 | void PackageManager::readSettings() | 593 | void PackageManager::readSettings() |
594 | { | 594 | { |
595 | // read from config file(s) | 595 | // read from config file(s) |
596 | readIpkgConfig("/etc/ipkg.conf"); | 596 | readIpkgConfig("/etc/ipkg.conf"); |
597 | } | 597 | } |
598 | 598 | ||
599 | void PackageManager::writeSettings() | 599 | void PackageManager::writeSettings() |
600 | { | 600 | { |
601 | QFile conf("/etc/ipkg.conf"); | 601 | QFile conf("/etc/ipkg.conf"); |
602 | if ( conf.open(IO_WriteOnly) ) { | 602 | if ( conf.open(IO_WriteOnly) ) { |
603 | QTextStream s(&conf); | 603 | QTextStream s(&conf); |
604 | s << "# Written by Qtopia Package Manager\n"; | 604 | s << "# Written by Qtopia Package Manager\n"; |
605 | if ( !ipkg_old ) { | 605 | if ( !ipkg_old ) { |
606 | for (int i=0; i<(int)settings->servers->count(); i++) { | 606 | for (int i=0; i<(int)settings->servers->count(); i++) { |
607 | QString url = serverurl[i] ? *serverurl[i] : QString("???"); | 607 | QString url = serverurl[i] ? *serverurl[i] : QString("???"); |
608 | if ( !settings->servers->isSelected(i) ) | 608 | // if ( !settings->servers->isSelected(i) ) |
609 | s << "#"; | 609 | // s << "#"; |
610 | s << "src " << settings->servers->text(i) << " " << url << "\n"; | 610 | s << "src " << settings->servers->text(i) << " " << url << "\n"; |
611 | } | 611 | } |
612 | s << "dest root /\n"; // ### need UI | 612 | s << "dest root /\n"; // ### need UI |
613 | // if ( !settings->username->text().isEmpty() ) | 613 | // if ( !settings->username->text().isEmpty() ) |
614 | // s << "option proxy_username " << settings->username->text() << "\n"; | 614 | // s << "option proxy_username " << settings->username->text() << "\n"; |
615 | // if ( !settings->password->text().isEmpty() ) | 615 | // if ( !settings->password->text().isEmpty() ) |
616 | // s << "option proxy_password " << settings->password->text() << "\n"; | 616 | // s << "option proxy_password " << settings->password->text() << "\n"; |
617 | // if ( !settings->http->text().isEmpty() ) | 617 | // if ( !settings->http->text().isEmpty() ) |
618 | // s << "option http_proxy " << settings->http->text() << "\n"; | 618 | // s << "option http_proxy " << settings->http->text() << "\n"; |
619 | // if ( !settings->ftp->text().isEmpty() ) | 619 | // if ( !settings->ftp->text().isEmpty() ) |
620 | // s << "option ftp_proxy " << settings->ftp->text() << "\n"; | 620 | // s << "option ftp_proxy " << settings->ftp->text() << "\n"; |
621 | } else { | 621 | } else { |
622 | // Old style | 622 | // Old style |
623 | bool src_selected=FALSE; | 623 | bool src_selected=FALSE; |
624 | for (int i=0; i<(int)settings->servers->count(); i++) { | 624 | for (int i=0; i<(int)settings->servers->count(); i++) { |
625 | if ( settings->servers->isSelected(i) ) { | 625 | if ( settings->servers->isSelected(i) ) { |
626 | src_selected=TRUE; | 626 | src_selected=TRUE; |
627 | } else { | 627 | } else { |
628 | s << "#"; | 628 | s << "#"; |
629 | } | 629 | } |
630 | s << "IPKG_SOURCE=\"" << settings->servers->text(i) << "\"\n"; | 630 | s << "IPKG_SOURCE=\"" << settings->servers->text(i) << "\"\n"; |
631 | } | 631 | } |
632 | if ( !src_selected ) | 632 | if ( !src_selected ) |
633 | s << "IPKG_SOURCE=\"" << settings->servers->currentText() << "\"\n"; | 633 | s << "IPKG_SOURCE=\"" << settings->servers->currentText() << "\"\n"; |
634 | s << "IPKG_ROOT=/\n" | 634 | s << "IPKG_ROOT=/\n" |
635 | // << "IPKG_PROXY_USERNAME=\"" << settings->username->text() << "\"\n" | 635 | // << "IPKG_PROXY_USERNAME=\"" << settings->username->text() << "\"\n" |
636 | // << "IPKG_PROXY_PASSWORD=\"" << settings->password->text() << "\"\n" | 636 | // << "IPKG_PROXY_PASSWORD=\"" << settings->password->text() << "\"\n" |
637 | // << "IPKG_PROXY_HTTP=\"" << settings->http->text() << "\"\n" | 637 | // << "IPKG_PROXY_HTTP=\"" << settings->http->text() << "\"\n" |
638 | // << "IPKG_PROXY_FTP=\"" << settings->ftp->text() << "\"\n" | 638 | // << "IPKG_PROXY_FTP=\"" << settings->ftp->text() << "\"\n" |
639 | ; | 639 | ; |
640 | } | 640 | } |
641 | conf.close(); | 641 | conf.close(); |