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 ) | |||
261 | 261 | ||
262 | 262 | ||
263 | text += it->getPackageName(); | 263 | text.append( it->getPackageName() ); |
264 | if ( it->isInstalled() ) | 264 | if ( it->isInstalled() ) |
265 | { | 265 | { |
266 | text += " (installed)"; | 266 | text.append( " (installed)" ); |
267 | 267 | ||
268 | // If a different version of package is available, postfix it with an * | 268 | // If a different version of package is available, postfix it with an * |
@@ -271,5 +271,5 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) | |||
271 | 271 | ||
272 | if ( compareVersions( it->getInstalledVersion(), it->getVersion() ) == 1 ) | 272 | if ( compareVersions( it->getInstalledVersion(), it->getVersion() ) == 1 ) |
273 | text += "*"; | 273 | text.append( "*" ); |
274 | } | 274 | } |
275 | } | 275 | } |
@@ -291,27 +291,27 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) | |||
291 | } | 291 | } |
292 | if ( destName != "" ) | 292 | if ( destName != "" ) |
293 | new QCheckListItem( item, QString( tr( "Installed To - " ) ) + destName ); | 293 | new QCheckListItem( item, QString( tr( "Installed To - %1" ).arg( destName ) ) ); |
294 | } | 294 | } |
295 | 295 | ||
296 | if ( !it->isPackageStoredLocally() ) | 296 | if ( !it->isPackageStoredLocally() ) |
297 | { | 297 | { |
298 | new QCheckListItem( item, QString( tr( "Description - " ) ) + it->getDescription() ); | 298 | new QCheckListItem( item, QString( tr( "Description - %1" ).arg( it->getDescription() ) ) ); |
299 | new QCheckListItem( item, QString( tr( "Size - " ) ) + it->getPackageSize() ); | 299 | new QCheckListItem( item, QString( tr( "Size - %1" ).arg( it->getPackageSize() ) ) ); |
300 | new QCheckListItem( item, QString( tr( "Section - " ) ) + it->getSection() ); | 300 | new QCheckListItem( item, QString( tr( "Section - %1" ).arg( it->getSection() ) ) ); |
301 | } | 301 | } |
302 | else | 302 | else |
303 | new QCheckListItem( item, QString( tr( "Filename - " ) ) + it->getFilename() ); | 303 | new QCheckListItem( item, QString( tr( "Filename - %1" ).arg( it->getFilename() ) ) ); |
304 | 304 | ||
305 | if ( serverName == LOCAL_SERVER ) | 305 | if ( serverName == LOCAL_SERVER ) |
306 | { | 306 | { |
307 | new QCheckListItem( item, QString( tr( "V. Installed - " ) ) + it->getVersion() ); | 307 | new QCheckListItem( item, QString( tr( "V. Installed - %1" ).arg( it->getVersion() ) ) ); |
308 | } | 308 | } |
309 | else | 309 | else |
310 | { | 310 | { |
311 | new QCheckListItem( item, QString( tr( "V. Available - " ) ) + it->getVersion() ); | 311 | new QCheckListItem( item, QString( tr( "V. Available - %1" ).arg( it->getVersion() ) ) ); |
312 | if ( it->getLocalPackage() ) | 312 | if ( it->getLocalPackage() ) |
313 | { | 313 | { |
314 | if ( it->isInstalled() ) | 314 | if ( it->isInstalled() ) |
315 | new QCheckListItem( item, QString( tr( "V. Installed - " ) ) + it->getInstalledVersion() ); | 315 | new QCheckListItem( item, QString( tr( "V. Installed - %1" ).arg( it->getInstalledVersion() ) ) ); |
316 | } | 316 | } |
317 | } | 317 | } |
@@ -373,4 +373,5 @@ void NetworkPackageManager :: upgradePackages() | |||
373 | // We're gonna do an upgrade of all packages | 373 | // We're gonna do an upgrade of all packages |
374 | // First warn user that this isn't recommended | 374 | // First warn user that this isn't recommended |
375 | // TODO - ODevice???? | ||
375 | QString text = tr( "WARNING: Upgrading while\nOpie/Qtopia is running\nis NOT recommended!\n\nAre you sure?\n" ); | 376 | QString text = tr( "WARNING: Upgrading while\nOpie/Qtopia is running\nis NOT recommended!\n\nAre you sure?\n" ); |
376 | QMessageBox warn( tr( "Warning" ), text, QMessageBox::Warning, | 377 | QMessageBox warn( tr( "Warning" ), text, QMessageBox::Warning, |
@@ -774,15 +775,9 @@ void NetworkPackageManager :: letterPushed( QString t ) | |||
774 | 775 | ||
775 | 776 | ||
776 | void NetworkPackageManager :: searchForPackage( bool findNext ) | 777 | void NetworkPackageManager :: searchForPackage( const QString &text ) |
777 | { | 778 | { |
778 | bool ok = false; | 779 | if ( !text.isEmpty() ) |
779 | if ( !findNext || lastSearchText.isEmpty() ) | ||
780 | lastSearchText = InputDialog::getText( tr( "Search for package" ), tr( "Enter package to search for" ), lastSearchText, &ok, this ).lower(); | ||
781 | else | ||
782 | ok = true; | ||
783 | |||
784 | if ( ok && !lastSearchText.isEmpty() ) | ||
785 | { | 780 | { |
786 | cout << "searching for " << lastSearchText << endl; | 781 | cout << "searching for " << text << endl; |
787 | // look through package list for text startng at current position | 782 | // look through package list for text startng at current position |
788 | vector<InstallData> workingPackages; | 783 | vector<InstallData> workingPackages; |
@@ -798,5 +793,5 @@ void NetworkPackageManager :: searchForPackage( bool findNext ) | |||
798 | { | 793 | { |
799 | cout << "checking " << item->text().lower() << endl; | 794 | cout << "checking " << item->text().lower() << endl; |
800 | if ( item->text().lower().find( lastSearchText ) != -1 ) | 795 | if ( item->text().lower().find( text ) != -1 ) |
801 | { | 796 | { |
802 | cout << "matched " << item->text() << endl; | 797 | cout << "matched " << item->text() << endl; |
@@ -812,4 +807,9 @@ void NetworkPackageManager :: showOnlyUninstalledPackages( bool val ) | |||
812 | { | 807 | { |
813 | showUninstalledPkgs = val; | 808 | showUninstalledPkgs = val; |
809 | if ( val ) | ||
810 | { | ||
811 | showInstalledPkgs = FALSE; | ||
812 | showUpgradedPkgs = FALSE; | ||
813 | } | ||
814 | serverSelected( -1 ); | 814 | serverSelected( -1 ); |
815 | } | 815 | } |
@@ -818,4 +818,9 @@ void NetworkPackageManager :: showOnlyInstalledPackages( bool val ) | |||
818 | { | 818 | { |
819 | showInstalledPkgs = val; | 819 | showInstalledPkgs = val; |
820 | if ( val ) | ||
821 | { | ||
822 | showUninstalledPkgs = FALSE; | ||
823 | showUpgradedPkgs = FALSE; | ||
824 | } | ||
820 | serverSelected( -1 ); | 825 | serverSelected( -1 ); |
821 | } | 826 | } |
@@ -824,4 +829,9 @@ void NetworkPackageManager :: showUpgradedPackages( bool val ) | |||
824 | { | 829 | { |
825 | showUpgradedPkgs = val; | 830 | showUpgradedPkgs = val; |
831 | if ( val ) | ||
832 | { | ||
833 | showUninstalledPkgs = FALSE; | ||
834 | showInstalledPkgs = FALSE; | ||
835 | } | ||
826 | serverSelected( -1 ); | 836 | serverSelected( -1 ); |
827 | } | 837 | } |