summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/oipkgconfigdlg.cpp
authordrw <drw>2005-01-02 20:26:01 (UTC)
committer drw <drw>2005-01-02 20:26:01 (UTC)
commite763e0cea060ae3a2dfb1c411f56354e27ac12a9 (patch) (side-by-side diff)
tree37896734be7d2679c3f19635fe9fe3b52a549332 /noncore/settings/packagemanager/oipkgconfigdlg.cpp
parent020ea2d54bcd0fc4420cb433b3e657cd13ae07e2 (diff)
downloadopie-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) (show whitespace changes)
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp34
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
@@ -89,42 +89,42 @@ 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" );
+ OConfItem *confItem = m_ipkg->findConfItem( OConfItem::Option, "http_proxy" );
if ( confItem )
{
confItem->setValue( m_proxyHttpServer->text() );
confItem->setActive( m_proxyHttpActive->isChecked() );
}
else
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() );
}
else
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",
m_proxyPassword->text() ) );
@@ -390,30 +390,12 @@ void OIpkgConfigDlg::initData()
if ( options & FORCE_OVERWRITE )
m_optForceOverwrite->setChecked( true );
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;
// Enable Edit and Delete buttons
m_serverEditBtn->setEnabled( true );
@@ -439,13 +421,13 @@ void OIpkgConfigDlg::slotServerNew()
delete server;
}
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 )
{
QString origName = server->name();
OIpkgServerDlg dlg( server, this );
@@ -458,13 +440,13 @@ 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 )
{
m_configs->removeRef( server );
m_serverList->removeItem( m_serverCurrent );
@@ -499,13 +481,13 @@ void OIpkgConfigDlg::slotDestNew()
delete dest;
}
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 )
{
QString origName = dest->name();
OIpkgDestDlg dlg( dest, this );
@@ -518,13 +500,13 @@ 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 )
{
m_configs->removeRef( destination );
m_destList->removeItem( m_destCurrent );