author | drw <drw> | 2005-01-02 20:26:01 (UTC) |
---|---|---|
committer | drw <drw> | 2005-01-02 20:26:01 (UTC) |
commit | e763e0cea060ae3a2dfb1c411f56354e27ac12a9 (patch) (side-by-side diff) | |
tree | 37896734be7d2679c3f19635fe9fe3b52a549332 /noncore/settings/packagemanager/oipkgconfigdlg.cpp | |
parent | 020ea2d54bcd0fc4420cb433b3e657cd13ae07e2 (diff) | |
download | opie-e763e0cea060ae3a2dfb1c411f56354e27ac12a9.zip opie-e763e0cea060ae3a2dfb1c411f56354e27ac12a9.tar.gz opie-e763e0cea060ae3a2dfb1c411f56354e27ac12a9.tar.bz2 |
Implement native package linking code (removing need for ipkg-link and its shortcomings), move package linking code to OIpkg (proper place for ipkg specific code), many small code tweaks and bump version up to 0.6.1
Diffstat (limited to 'noncore/settings/packagemanager/oipkgconfigdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/oipkgconfigdlg.cpp | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp index 77ad220..e6d6a81 100644 --- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp +++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp @@ -91,9 +91,9 @@ 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" ); + OConfItem *confItem = m_ipkg->findConfItem( OConfItem::Option, "http_proxy" ); if ( confItem ) { confItem->setValue( m_proxyHttpServer->text() ); confItem->setActive( m_proxyHttpActive->isChecked() ); @@ -102,9 +102,9 @@ void OIpkgConfigDlg::accept() m_configs->append( new OConfItem( OConfItem::Option, "http_proxy", m_proxyHttpServer->text(), QString::null, m_proxyHttpActive->isChecked() ) ); - confItem = findConfItem( OConfItem::Option, "ftp_proxy" ); + confItem = m_ipkg->findConfItem( OConfItem::Option, "ftp_proxy" ); if ( confItem ) { confItem->setValue( m_proxyFtpServer->text() ); confItem->setActive( m_proxyFtpActive->isChecked() ); @@ -113,16 +113,16 @@ void OIpkgConfigDlg::accept() m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy", m_proxyFtpServer->text(), QString::null, m_proxyFtpActive->isChecked() ) ); - confItem = findConfItem( OConfItem::Option, "proxy_username" ); + confItem = m_ipkg->findConfItem( OConfItem::Option, "proxy_username" ); if ( confItem ) confItem->setValue( m_proxyUsername->text() ); else m_configs->append( new OConfItem( OConfItem::Option, "proxy_username", m_proxyUsername->text() ) ); - confItem = findConfItem( OConfItem::Option, "proxy_password" ); + confItem = m_ipkg->findConfItem( OConfItem::Option, "proxy_password" ); if ( confItem ) confItem->setValue( m_proxyPassword->text() ); else m_configs->append( new OConfItem( OConfItem::Option, "proxy_password", @@ -392,26 +392,8 @@ void OIpkgConfigDlg::initData() m_optVerboseIpkg->setCurrentItem( m_ipkg->ipkgExecVerbosity() ); } -OConfItem *OIpkgConfigDlg::findConfItem( OConfItem::Type type, const QString &name ) -{ - // Find selected server in list - OConfItemListIterator configIt( *m_configs ); - OConfItem *config = 0l; - for ( ; configIt.current(); ++configIt ) - { - config = configIt.current(); - if ( config->type() == type && config->name() == name ) - break; - } - - if ( config && config->type() == type && config->name() == name ) - return config; - - return 0l; -} - void OIpkgConfigDlg::slotServerSelected( int index ) { m_serverCurrent = index; @@ -441,9 +423,9 @@ void OIpkgConfigDlg::slotServerNew() void OIpkgConfigDlg::slotServerEdit() { // Find selected server in list - OConfItem *server = findConfItem( OConfItem::Source, m_serverList->currentText() ); + OConfItem *server = m_ipkg->findConfItem( OConfItem::Source, m_serverList->currentText() ); // Edit server if ( server ) { @@ -460,9 +442,9 @@ void OIpkgConfigDlg::slotServerEdit() void OIpkgConfigDlg::slotServerDelete() { // Find selected server in list - OConfItem *server = findConfItem( OConfItem::Source, m_serverList->currentText() ); + OConfItem *server = m_ipkg->findConfItem( OConfItem::Source, m_serverList->currentText() ); // Delete server if ( server ) { @@ -501,9 +483,9 @@ void OIpkgConfigDlg::slotDestNew() void OIpkgConfigDlg::slotDestEdit() { // Find selected destination in list - OConfItem *dest = findConfItem( OConfItem::Destination, m_destList->currentText() ); + OConfItem *dest = m_ipkg->findConfItem( OConfItem::Destination, m_destList->currentText() ); // Edit destination if ( dest ) { @@ -520,9 +502,9 @@ void OIpkgConfigDlg::slotDestEdit() void OIpkgConfigDlg::slotDestDelete() { // Find selected destination in list - OConfItem *destination = findConfItem( OConfItem::Destination, m_destList->currentText() ); + OConfItem *destination = m_ipkg->findConfItem( OConfItem::Destination, m_destList->currentText() ); // Delete destination if ( destination ) { |