summaryrefslogtreecommitdiff
authordrw <drw>2004-04-08 00:22:39 (UTC)
committer drw <drw>2004-04-08 00:22:39 (UTC)
commit8c54ad421c7bee65b2a1442ce85c09f2eff3efc6 (patch) (side-by-side diff)
tree9ed0d01e5afc0ac7ec418b2cf3115d783cc0f186
parentc968f44205a5da7dc37029e701f527450692e39a (diff)
downloadopie-8c54ad421c7bee65b2a1442ce85c09f2eff3efc6.zip
opie-8c54ad421c7bee65b2a1442ce85c09f2eff3efc6.tar.gz
opie-8c54ad421c7bee65b2a1442ce85c09f2eff3efc6.tar.bz2
Save proxy information
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
index 592de3e..74e7137 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
@@ -88,13 +88,50 @@ OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *paren
}
void OIpkgConfigDlg::accept()
{
// Save server, destination and proxy configuration
if ( !m_installOptions )
+ {
+ // Update proxy information before saving settings
+ OConfItem *confItem = findConfItem( OConfItem::Option, "http_proxy" );
+ if ( confItem )
+ {
+ confItem->setValue( m_proxyHttpServer->text() );
+ confItem->setActive( m_proxyHttpActive->isChecked() );
+ }
+ else
+ m_configs->append( new OConfItem( QString::null, OConfItem::Option, "http_proxy",
+ m_proxyHttpServer->text(), m_proxyHttpActive->isChecked() ) );
+
+ confItem = findConfItem( OConfItem::Option, "ftp_proxy" );
+ if ( confItem )
+ {
+ confItem->setValue( m_proxyFtpServer->text() );
+ confItem->setActive( m_proxyFtpActive->isChecked() );
+ }
+ else
+ m_configs->append( new OConfItem( QString::null, OConfItem::Option, "ftp_proxy",
+ m_proxyFtpServer->text(), m_proxyFtpActive->isChecked() ) );
+
+ confItem = findConfItem( OConfItem::Option, "proxy_username" );
+ if ( confItem )
+ confItem->setValue( m_proxyUsername->text() );
+ else
+ m_configs->append( new OConfItem( QString::null, OConfItem::Option, "proxy_username",
+ m_proxyUsername->text() ) );
+
+ confItem = findConfItem( OConfItem::Option, "proxy_password" );
+ if ( confItem )
+ confItem->setValue( m_proxyPassword->text() );
+ else
+ m_configs->append( new OConfItem( QString::null, OConfItem::Option, "proxy_password",
+ m_proxyPassword->text() ) );
+
m_ipkg->setConfigItems( m_configs );
+ }
// Save options configuration
int options = 0;
if ( m_optForceDepends->isChecked() )
options |= FORCE_DEPENDS;
if ( m_optForceReinstall->isChecked() )