summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/networkpkgmgr.cpp
authorandyq <andyq>2002-11-03 12:41:54 (UTC)
committer andyq <andyq>2002-11-03 12:41:54 (UTC)
commitb9aad2af4da88816effbc09f8d609bcabaf1f492 (patch) (side-by-side diff)
treec8b260212063d2dab559656a3eb3073f1793d116 /noncore/settings/aqpkg/networkpkgmgr.cpp
parent57e4563332689305ac247ca2e259b37c3592f389 (diff)
downloadopie-b9aad2af4da88816effbc09f8d609bcabaf1f492.zip
opie-b9aad2af4da88816effbc09f8d609bcabaf1f492.tar.gz
opie-b9aad2af4da88816effbc09f8d609bcabaf1f492.tar.bz2
Added find next facility
Diffstat (limited to 'noncore/settings/aqpkg/networkpkgmgr.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index 78d3df5..a058285 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -675,13 +675,17 @@ void NetworkPackageManager :: letterPushed( QString t )
}
-void NetworkPackageManager :: searchForPackage()
+void NetworkPackageManager :: searchForPackage( bool findNext )
{
- bool ok = FALSE;
- QString searchText = InputDialog::getText( "Search for package", "Enter package to search for", QString::null, &ok, this ).lower();
- if ( ok && !searchText.isEmpty() )
+ bool ok = false;
+ if ( !findNext || lastSearchText.isEmpty() )
+ lastSearchText = InputDialog::getText( "Search for package", "Enter package to search for", lastSearchText, &ok, this ).lower();
+ else
+ ok = true;
+
+ if ( ok && !lastSearchText.isEmpty() )
{
- cout << "searching for " << searchText << endl;
+ cout << "searching for " << lastSearchText << endl;
// look through package list for text startng at current position
vector<InstallData> workingPackages;
QCheckListItem *start = (QCheckListItem *)packagesList->currentItem();
@@ -695,7 +699,7 @@ void NetworkPackageManager :: searchForPackage()
item = (QCheckListItem *)item->nextSibling() )
{
cout << "checking " << item->text().lower() << endl;
- if ( item->text().lower().find( searchText ) != -1 )
+ if ( item->text().lower().find( lastSearchText ) != -1 )
{
cout << "matched " << item->text() << endl;
packagesList->ensureItemVisible( item );