summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp11
-rw-r--r--noncore/settings/aqpkg/mainwin.h1
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp16
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.h3
4 files changed, 22 insertions, 9 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index 0b5a5eb..3c72f2b 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -40,2 +40,3 @@ MainWindow :: MainWindow( QWidget *p, char *name )
40 QPopupMenu *help = new QPopupMenu( this ); 40 QPopupMenu *help = new QPopupMenu( this );
41
41 help->insertItem( "&General", this, SLOT(displayHelp()), Qt::CTRL+Qt::Key_H ); 42 help->insertItem( "&General", this, SLOT(displayHelp()), Qt::CTRL+Qt::Key_H );
@@ -47,3 +48,4 @@ MainWindow :: MainWindow( QWidget *p, char *name )
47 QPopupMenu *edit = new QPopupMenu( this ); 48 QPopupMenu *edit = new QPopupMenu( this );
48 edit->insertItem( "&Search", this, SLOT(searchForPackage()), Qt::CTRL+Qt::Key_F ); 49 edit->insertItem( "&Find", this, SLOT(searchForPackage()), Qt::CTRL+Qt::Key_F );
50 edit->insertItem( "&Find Next", this, SLOT(repeatSearchForPackage()), Qt::CTRL+Qt::Key_R );
49 51
@@ -97,3 +99,8 @@ void MainWindow :: searchForPackage()
97{ 99{
98 networkPkgWindow->searchForPackage(); 100 networkPkgWindow->searchForPackage( false );
101}
102
103void MainWindow :: repeatSearchForPackage()
104{
105 networkPkgWindow->searchForPackage( true );
99} 106}
diff --git a/noncore/settings/aqpkg/mainwin.h b/noncore/settings/aqpkg/mainwin.h
index 9fa0eca..267233f 100644
--- a/noncore/settings/aqpkg/mainwin.h
+++ b/noncore/settings/aqpkg/mainwin.h
@@ -45,2 +45,3 @@ public slots:
45 void searchForPackage(); 45 void searchForPackage();
46 void repeatSearchForPackage();
46 void displayAbout(); 47 void displayAbout();
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
@@ -677,9 +677,13 @@ void NetworkPackageManager :: letterPushed( QString t )
677 677
678void NetworkPackageManager :: searchForPackage() 678void NetworkPackageManager :: searchForPackage( bool findNext )
679{ 679{
680 bool ok = FALSE; 680 bool ok = false;
681 QString searchText = InputDialog::getText( "Search for package", "Enter package to search for", QString::null, &ok, this ).lower(); 681 if ( !findNext || lastSearchText.isEmpty() )
682 if ( ok && !searchText.isEmpty() ) 682 lastSearchText = InputDialog::getText( "Search for package", "Enter package to search for", lastSearchText, &ok, this ).lower();
683 else
684 ok = true;
685
686 if ( ok && !lastSearchText.isEmpty() )
683 { 687 {
684 cout << "searching for " << searchText << endl; 688 cout << "searching for " << lastSearchText << endl;
685 // look through package list for text startng at current position 689 // look through package list for text startng at current position
@@ -697,3 +701,3 @@ void NetworkPackageManager :: searchForPackage()
697 cout << "checking " << item->text().lower() << endl; 701 cout << "checking " << item->text().lower() << endl;
698 if ( item->text().lower().find( searchText ) != -1 ) 702 if ( item->text().lower().find( lastSearchText ) != -1 )
699 { 703 {
diff --git a/noncore/settings/aqpkg/networkpkgmgr.h b/noncore/settings/aqpkg/networkpkgmgr.h
index 3a111ff..20f6e2d 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.h
+++ b/noncore/settings/aqpkg/networkpkgmgr.h
@@ -42,3 +42,3 @@ public:
42 void updateData(); 42 void updateData();
43 void searchForPackage(); 43 void searchForPackage( bool findNext );
44private: 44private:
@@ -55,2 +55,3 @@ private:
55 QString currentlySelectedServer; 55 QString currentlySelectedServer;
56 QString lastSearchText;
56 57