Diffstat (limited to 'noncore/settings/aqpkg/networkpkgmgr.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp index 91afe02..c209589 100644 --- a/noncore/settings/aqpkg/networkpkgmgr.cpp +++ b/noncore/settings/aqpkg/networkpkgmgr.cpp @@ -261,8 +261,8 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) - text += it->getPackageName(); + text.append( it->getPackageName() ); if ( it->isInstalled() ) { - text += " (installed)"; + text.append( " (installed)" ); // If a different version of package is available, postfix it with an * @@ -271,5 +271,5 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) if ( compareVersions( it->getInstalledVersion(), it->getVersion() ) == 1 ) - text += "*"; + text.append( "*" ); } } @@ -291,27 +291,27 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) } if ( destName != "" ) - new QCheckListItem( item, QString( tr( "Installed To - " ) ) + destName ); + new QCheckListItem( item, QString( tr( "Installed To - %1" ).arg( destName ) ) ); } if ( !it->isPackageStoredLocally() ) { - new QCheckListItem( item, QString( tr( "Description - " ) ) + it->getDescription() ); - new QCheckListItem( item, QString( tr( "Size - " ) ) + it->getPackageSize() ); - new QCheckListItem( item, QString( tr( "Section - " ) ) + it->getSection() ); + new QCheckListItem( item, QString( tr( "Description - %1" ).arg( it->getDescription() ) ) ); + new QCheckListItem( item, QString( tr( "Size - %1" ).arg( it->getPackageSize() ) ) ); + new QCheckListItem( item, QString( tr( "Section - %1" ).arg( it->getSection() ) ) ); } else - new QCheckListItem( item, QString( tr( "Filename - " ) ) + it->getFilename() ); + new QCheckListItem( item, QString( tr( "Filename - %1" ).arg( it->getFilename() ) ) ); if ( serverName == LOCAL_SERVER ) { - new QCheckListItem( item, QString( tr( "V. Installed - " ) ) + it->getVersion() ); + new QCheckListItem( item, QString( tr( "V. Installed - %1" ).arg( it->getVersion() ) ) ); } else { - new QCheckListItem( item, QString( tr( "V. Available - " ) ) + it->getVersion() ); + new QCheckListItem( item, QString( tr( "V. Available - %1" ).arg( it->getVersion() ) ) ); if ( it->getLocalPackage() ) { if ( it->isInstalled() ) - new QCheckListItem( item, QString( tr( "V. Installed - " ) ) + it->getInstalledVersion() ); + new QCheckListItem( item, QString( tr( "V. Installed - %1" ).arg( it->getInstalledVersion() ) ) ); } } @@ -373,4 +373,5 @@ void NetworkPackageManager :: upgradePackages() // We're gonna do an upgrade of all packages // First warn user that this isn't recommended + // TODO - ODevice???? QString text = tr( "WARNING: Upgrading while\nOpie/Qtopia is running\nis NOT recommended!\n\nAre you sure?\n" ); QMessageBox warn( tr( "Warning" ), text, QMessageBox::Warning, @@ -774,15 +775,9 @@ void NetworkPackageManager :: letterPushed( QString t ) -void NetworkPackageManager :: searchForPackage( bool findNext ) +void NetworkPackageManager :: searchForPackage( const QString &text ) { - bool ok = false; - if ( !findNext || lastSearchText.isEmpty() ) - lastSearchText = InputDialog::getText( tr( "Search for package" ), tr( "Enter package to search for" ), lastSearchText, &ok, this ).lower(); - else - ok = true; - - if ( ok && !lastSearchText.isEmpty() ) + if ( !text.isEmpty() ) { - cout << "searching for " << lastSearchText << endl; + cout << "searching for " << text << endl; // look through package list for text startng at current position vector<InstallData> workingPackages; @@ -798,5 +793,5 @@ void NetworkPackageManager :: searchForPackage( bool findNext ) { cout << "checking " << item->text().lower() << endl; - if ( item->text().lower().find( lastSearchText ) != -1 ) + if ( item->text().lower().find( text ) != -1 ) { cout << "matched " << item->text() << endl; @@ -812,4 +807,9 @@ void NetworkPackageManager :: showOnlyUninstalledPackages( bool val ) { showUninstalledPkgs = val; + if ( val ) + { + showInstalledPkgs = FALSE; + showUpgradedPkgs = FALSE; + } serverSelected( -1 ); } @@ -818,4 +818,9 @@ void NetworkPackageManager :: showOnlyInstalledPackages( bool val ) { showInstalledPkgs = val; + if ( val ) + { + showUninstalledPkgs = FALSE; + showUpgradedPkgs = FALSE; + } serverSelected( -1 ); } @@ -824,4 +829,9 @@ void NetworkPackageManager :: showUpgradedPackages( bool val ) { showUpgradedPkgs = val; + if ( val ) + { + showUninstalledPkgs = FALSE; + showInstalledPkgs = FALSE; + } serverSelected( -1 ); } |