author | drw <drw> | 2005-03-11 16:32:21 (UTC) |
---|---|---|
committer | drw <drw> | 2005-03-11 16:32:21 (UTC) |
commit | abcc52307706794537bb579daff1a82668ebde00 (patch) (unidiff) | |
tree | 4c25d4ea425a22d0b881c79418ff5b51b829be49 /noncore/settings/packagemanager/oipkgconfigdlg.cpp | |
parent | 3dc7db665775377453f999a3eaee8c225af45a79 (diff) | |
download | opie-abcc52307706794537bb579daff1a82668ebde00.zip opie-abcc52307706794537bb579daff1a82668ebde00.tar.gz opie-abcc52307706794537bb579daff1a82668ebde00.tar.bz2 |
Fix bug where lists_dir was not being honored at startup - thanks to hrw for identifying, also provide default value for lists_dir when none is entered in the configuration dialog
Diffstat (limited to 'noncore/settings/packagemanager/oipkgconfigdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/oipkgconfigdlg.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp index d234251..0ad1c82 100644 --- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp +++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp | |||
@@ -128,12 +128,15 @@ void OIpkgConfigDlg::accept() | |||
128 | m_configs->append( new OConfItem( OConfItem::Option, "proxy_password", | 128 | m_configs->append( new OConfItem( OConfItem::Option, "proxy_password", |
129 | m_proxyPassword->text() ) ); | 129 | m_proxyPassword->text() ) ); |
130 | 130 | ||
131 | QString listsDir = m_optSourceLists->text(); | ||
132 | if ( listsDir == QString::null || listsDir == "" ) | ||
133 | listsDir = "/usr/lib/ipkg/lists"; // TODO - use proper libipkg define | ||
131 | confItem = m_ipkg->findConfItem( OConfItem::Other, "lists_dir" ); | 134 | confItem = m_ipkg->findConfItem( OConfItem::Other, "lists_dir" ); |
132 | if ( confItem ) | 135 | if ( confItem ) |
133 | confItem->setValue( m_optSourceLists->text() ); | 136 | confItem->setValue( listsDir ); |
134 | else | 137 | else |
135 | m_configs->append( new OConfItem( OConfItem::Other, "lists_dir", | 138 | m_configs->append( new OConfItem( OConfItem::Other, "lists_dir", |
136 | m_optSourceLists->text(), "name" ) ); | 139 | listsDir, "name" ) ); |
137 | 140 | ||
138 | m_ipkg->setConfigItems( m_configs ); | 141 | m_ipkg->setConfigItems( m_configs ); |
139 | } | 142 | } |