Diffstat (limited to 'noncore/settings/packagemanager/oipkgconfigdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/oipkgconfigdlg.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp index 886430f..d9a67f3 100644 --- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp +++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp | |||
@@ -92,35 +92,37 @@ void OIpkgConfigDlg::accept() | |||
92 | // Save server, destination and proxy configuration | 92 | // Save server, destination and proxy configuration |
93 | if ( !m_installOptions ) | 93 | if ( !m_installOptions ) |
94 | { | 94 | { |
95 | // Update proxy information before saving settings | 95 | // Update proxy information before saving settings |
96 | OConfItem *confItem = findConfItem( OConfItem::Option, "http_proxy" ); | 96 | OConfItem *confItem = findConfItem( OConfItem::Option, "http_proxy" ); |
97 | if ( confItem ) | 97 | if ( confItem ) |
98 | { | 98 | { |
99 | confItem->setValue( m_proxyHttpServer->text() ); | 99 | confItem->setValue( m_proxyHttpServer->text() ); |
100 | confItem->setActive( m_proxyHttpActive->isChecked() ); | 100 | confItem->setActive( m_proxyHttpActive->isChecked() ); |
101 | } | 101 | } |
102 | else | 102 | else |
103 | m_configs->append( new OConfItem( OConfItem::Option, "http_proxy", | 103 | m_configs->append( new OConfItem( OConfItem::Option, "http_proxy", |
104 | m_proxyHttpServer->text(), m_proxyHttpActive->isChecked() ) ); | 104 | m_proxyHttpServer->text(), QString::null, |
105 | m_proxyHttpActive->isChecked() ) ); | ||
105 | 106 | ||
106 | confItem = findConfItem( OConfItem::Option, "ftp_proxy" ); | 107 | confItem = findConfItem( OConfItem::Option, "ftp_proxy" ); |
107 | if ( confItem ) | 108 | if ( confItem ) |
108 | { | 109 | { |
109 | confItem->setValue( m_proxyFtpServer->text() ); | 110 | confItem->setValue( m_proxyFtpServer->text() ); |
110 | confItem->setActive( m_proxyFtpActive->isChecked() ); | 111 | confItem->setActive( m_proxyFtpActive->isChecked() ); |
111 | } | 112 | } |
112 | else | 113 | else |
113 | m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy", | 114 | m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy", |
114 | m_proxyFtpServer->text(), m_proxyFtpActive->isChecked() ) ); | 115 | m_proxyFtpServer->text(), QString::null, |
116 | m_proxyFtpActive->isChecked() ) ); | ||
115 | 117 | ||
116 | confItem = findConfItem( OConfItem::Option, "proxy_username" ); | 118 | confItem = findConfItem( OConfItem::Option, "proxy_username" ); |
117 | if ( confItem ) | 119 | if ( confItem ) |
118 | confItem->setValue( m_proxyUsername->text() ); | 120 | confItem->setValue( m_proxyUsername->text() ); |
119 | else | 121 | else |
120 | m_configs->append( new OConfItem( OConfItem::Option, "proxy_username", | 122 | m_configs->append( new OConfItem( OConfItem::Option, "proxy_username", |
121 | m_proxyUsername->text() ) ); | 123 | m_proxyUsername->text() ) ); |
122 | 124 | ||
123 | confItem = findConfItem( OConfItem::Option, "proxy_password" ); | 125 | confItem = findConfItem( OConfItem::Option, "proxy_password" ); |
124 | if ( confItem ) | 126 | if ( confItem ) |
125 | confItem->setValue( m_proxyPassword->text() ); | 127 | confItem->setValue( m_proxyPassword->text() ); |
126 | else | 128 | else |
@@ -526,27 +528,28 @@ void OIpkgConfigDlg::slotServerUpdate() | |||
526 | if ( m_serverCurrName != newName ) | 528 | if ( m_serverCurrName != newName ) |
527 | { | 529 | { |
528 | // Update server name | 530 | // Update server name |
529 | server->setName( newName ); | 531 | server->setName( newName ); |
530 | 532 | ||
531 | // Update list box | 533 | // Update list box |
532 | m_serverList->changeItem( newName, m_serverCurrent ); | 534 | m_serverList->changeItem( newName, m_serverCurrent ); |
533 | } | 535 | } |
534 | } | 536 | } |
535 | } | 537 | } |
536 | else | 538 | else |
537 | { | 539 | { |
538 | // Add new destination to configuration list | 540 | // Add new server to configuration list |
539 | m_configs->append( new OConfItem( OConfItem::Source, newName, | 541 | // TODO - support src/gz |
540 | m_serverLocation->text(), m_serverActive->isChecked() ) ); | 542 | m_configs->append( new OConfItem( OConfItem::Source, newName, m_serverLocation->text(), |
543 | QString::null, m_serverActive->isChecked() ) ); | ||
541 | m_configs->sort(); | 544 | m_configs->sort(); |
542 | 545 | ||
543 | m_serverList->insertItem( newName ); | 546 | m_serverList->insertItem( newName ); |
544 | m_serverList->setCurrentItem( m_serverList->count() ); | 547 | m_serverList->setCurrentItem( m_serverList->count() ); |
545 | m_serverNew = false; | 548 | m_serverNew = false; |
546 | } | 549 | } |
547 | } | 550 | } |
548 | 551 | ||
549 | void OIpkgConfigDlg::slotDestEdit( int index ) | 552 | void OIpkgConfigDlg::slotDestEdit( int index ) |
550 | { | 553 | { |
551 | m_destNew = false; | 554 | m_destNew = false; |
552 | m_destCurrent = index; | 555 | m_destCurrent = index; |
@@ -621,20 +624,20 @@ void OIpkgConfigDlg::slotDestUpdate() | |||
621 | // Update destination name | 624 | // Update destination name |
622 | destination->setName( newName ); | 625 | destination->setName( newName ); |
623 | 626 | ||
624 | // Update list box | 627 | // Update list box |
625 | m_destList->changeItem( newName, m_destCurrent ); | 628 | m_destList->changeItem( newName, m_destCurrent ); |
626 | } | 629 | } |
627 | } | 630 | } |
628 | } | 631 | } |
629 | else | 632 | else |
630 | { | 633 | { |
631 | // Add new destination to configuration list | 634 | // Add new destination to configuration list |
632 | m_configs->append( new OConfItem( OConfItem::Destination, newName, | 635 | m_configs->append( new OConfItem( OConfItem::Destination, newName, |
633 | m_destLocation->text(), m_destActive->isChecked() ) ); | 636 | m_destLocation->text(), QString::null, m_destActive->isChecked() ) ); |
634 | m_configs->sort(); | 637 | m_configs->sort(); |
635 | 638 | ||
636 | m_destList->insertItem( newName ); | 639 | m_destList->insertItem( newName ); |
637 | m_destList->setCurrentItem( m_destList->count() ); | 640 | m_destList->setCurrentItem( m_destList->count() ); |
638 | m_destNew = false; | 641 | m_destNew = false; |
639 | } | 642 | } |
640 | } | 643 | } |