author | drw <drw> | 2003-01-05 01:13:45 (UTC) |
---|---|---|
committer | drw <drw> | 2003-01-05 01:13:45 (UTC) |
commit | db5ab38ee45f202f4a627085e7457a2511abceb4 (patch) (unidiff) | |
tree | 5080aed27ffaac6cfb91ca0ad4c20e74b4a3508a /noncore/settings/aqpkg/networkpkgmgr.cpp | |
parent | 8b0f280e69a6c5b4c1caf4070085feaf0951380d (diff) | |
download | opie-db5ab38ee45f202f4a627085e7457a2511abceb4.zip opie-db5ab38ee45f202f4a627085e7457a2511abceb4.tar.gz opie-db5ab38ee45f202f4a627085e7457a2511abceb4.tar.bz2 |
Remove unused dialog and menu shortcut key combos. Also added a bunch of tr()'s to existing strings. Note to translators: These strings might be changing in the next couple of weeks as I do some UI updates.
Diffstat (limited to 'noncore/settings/aqpkg/networkpkgmgr.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp index cae0d8f..ee37157 100644 --- a/noncore/settings/aqpkg/networkpkgmgr.cpp +++ b/noncore/settings/aqpkg/networkpkgmgr.cpp | |||
@@ -145,21 +145,21 @@ void NetworkPackageManager :: selectLocalPackage( const QString &pkg ) | |||
145 | 145 | ||
146 | void NetworkPackageManager :: initGui() | 146 | void NetworkPackageManager :: initGui() |
147 | { | 147 | { |
148 | QLabel *l = new QLabel( "Servers", this ); | 148 | QLabel *l = new QLabel( tr( "Servers" ), this ); |
149 | serversList = new QComboBox( this ); | 149 | serversList = new QComboBox( this ); |
150 | packagesList = new QListView( this ); | 150 | packagesList = new QListView( this ); |
151 | update = new QPushButton( "Refresh Lists", this ); | 151 | update = new QPushButton( tr( "Refresh Lists" ), this ); |
152 | download = new QPushButton( "Download", this ); | 152 | download = new QPushButton( tr( "Download" ), this ); |
153 | upgrade = new QPushButton( "Upgrade", this ); | 153 | upgrade = new QPushButton( tr( "Upgrade" ), this ); |
154 | apply = new QPushButton( "Apply", this ); | 154 | apply = new QPushButton( tr( "Apply" ), this ); |
155 | 155 | ||
156 | QVBoxLayout *vbox = new QVBoxLayout( this, 0, -1, "VBox" ); | 156 | QVBoxLayout *vbox = new QVBoxLayout( this, 0, -1 ); |
157 | QHBoxLayout *hbox1 = new QHBoxLayout( vbox, -1, "HBox1" ); | 157 | QHBoxLayout *hbox1 = new QHBoxLayout( vbox, -1 ); |
158 | hbox1->addWidget( l ); | 158 | hbox1->addWidget( l ); |
159 | hbox1->addWidget( serversList ); | 159 | hbox1->addWidget( serversList ); |
160 | 160 | ||
161 | QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1, "HBox1" ); | 161 | QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1 ); |
162 | QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1, "HBox1" ); | 162 | QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1 ); |
163 | 163 | ||
164 | 164 | ||
165 | if ( showJumpTo ) | 165 | if ( showJumpTo ) |
@@ -179,9 +179,9 @@ void NetworkPackageManager :: initGui() | |||
179 | } | 179 | } |
180 | 180 | ||
181 | vbox->addWidget( packagesList ); | 181 | vbox->addWidget( packagesList ); |
182 | packagesList->addColumn( "Packages" ); | 182 | packagesList->addColumn( tr( "Packages" ) ); |
183 | 183 | ||
184 | QHBoxLayout *hbox2 = new QHBoxLayout( vbox, -1, "HBox2" ); | 184 | QHBoxLayout *hbox2 = new QHBoxLayout( vbox, -1 ); |
185 | hbox2->addWidget( update ); | 185 | hbox2->addWidget( update ); |
186 | hbox2->addWidget( download ); | 186 | hbox2->addWidget( download ); |
187 | hbox2->addWidget( upgrade ); | 187 | hbox2->addWidget( upgrade ); |
@@ -308,29 +308,29 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) | |||
308 | destName = it->getInstalledTo()->getDestinationName(); | 308 | destName = it->getInstalledTo()->getDestinationName(); |
309 | } | 309 | } |
310 | if ( destName != "" ) | 310 | if ( destName != "" ) |
311 | new QCheckListItem( item, QString( "Installed To - " ) + destName ); | 311 | new QCheckListItem( item, QString( tr( "Installed To - " ) ) + destName ); |
312 | } | 312 | } |
313 | 313 | ||
314 | if ( !it->isPackageStoredLocally() ) | 314 | if ( !it->isPackageStoredLocally() ) |
315 | { | 315 | { |
316 | new QCheckListItem( item, QString( "Description - " ) + it->getDescription() ); | 316 | new QCheckListItem( item, QString( tr( "Description - " ) ) + it->getDescription() ); |
317 | new QCheckListItem( item, QString( "Size - " ) + it->getPackageSize() ); | 317 | new QCheckListItem( item, QString( tr( "Size - " ) ) + it->getPackageSize() ); |
318 | new QCheckListItem( item, QString( "Section - " ) + it->getSection() ); | 318 | new QCheckListItem( item, QString( tr( "Section - " ) ) + it->getSection() ); |
319 | } | 319 | } |
320 | else | 320 | else |
321 | new QCheckListItem( item, QString( "Filename - " ) + it->getFilename() ); | 321 | new QCheckListItem( item, QString( tr( "Filename - " ) ) + it->getFilename() ); |
322 | 322 | ||
323 | if ( serverName == LOCAL_SERVER ) | 323 | if ( serverName == LOCAL_SERVER ) |
324 | { | 324 | { |
325 | new QCheckListItem( item, QString( "V. Installed - " ) + it->getVersion() ); | 325 | new QCheckListItem( item, QString( tr( "V. Installed - " ) ) + it->getVersion() ); |
326 | } | 326 | } |
327 | else | 327 | else |
328 | { | 328 | { |
329 | new QCheckListItem( item, QString( "V. Available - " ) + it->getVersion() ); | 329 | new QCheckListItem( item, QString( tr( "V. Available - " ) ) + it->getVersion() ); |
330 | if ( it->getLocalPackage() ) | 330 | if ( it->getLocalPackage() ) |
331 | { | 331 | { |
332 | if ( it->isInstalled() ) | 332 | if ( it->isInstalled() ) |
333 | new QCheckListItem( item, QString( "V. Installed - " ) + it->getInstalledVersion() ); | 333 | new QCheckListItem( item, QString( tr( "V. Installed - " ) ) + it->getInstalledVersion() ); |
334 | } | 334 | } |
335 | } | 335 | } |
336 | 336 | ||
@@ -341,20 +341,20 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) | |||
341 | if ( serverName == LOCAL_SERVER ) | 341 | if ( serverName == LOCAL_SERVER ) |
342 | { | 342 | { |
343 | upgrade->setEnabled( false ); | 343 | upgrade->setEnabled( false ); |
344 | download->setText( "Download" ); | 344 | download->setText( tr( "Download" ) ); |
345 | download->setEnabled( true ); | 345 | download->setEnabled( true ); |
346 | } | 346 | } |
347 | else if ( serverName == LOCAL_IPKGS ) | 347 | else if ( serverName == LOCAL_IPKGS ) |
348 | { | 348 | { |
349 | upgrade->setEnabled( false ); | 349 | upgrade->setEnabled( false ); |
350 | download->setEnabled( true ); | 350 | download->setEnabled( true ); |
351 | download->setText( "Remove" ); | 351 | download->setText( tr( "Remove" ) ); |
352 | } | 352 | } |
353 | else | 353 | else |
354 | { | 354 | { |
355 | upgrade->setEnabled( true ); | 355 | upgrade->setEnabled( true ); |
356 | download->setEnabled( true ); | 356 | download->setEnabled( true ); |
357 | download->setText( "Download" ); | 357 | download->setText( tr( "Download" ) ); |
358 | } | 358 | } |
359 | 359 | ||
360 | // Display this widget once everything is done | 360 | // Display this widget once everything is done |
@@ -379,7 +379,7 @@ void NetworkPackageManager :: updateServer() | |||
379 | Ipkg ipkg; | 379 | Ipkg ipkg; |
380 | ipkg.setOption( "update" ); | 380 | ipkg.setOption( "update" ); |
381 | 381 | ||
382 | InstallDlgImpl dlg( &ipkg, "Refreshing server package lists", this, "Upgrade", true ); | 382 | InstallDlgImpl dlg( &ipkg, tr( "Refreshing server package lists" ), this, tr( "Upgrade" ), true ); |
383 | dlg.showDlg(); | 383 | dlg.showDlg(); |
384 | 384 | ||
385 | // Reload data | 385 | // Reload data |
@@ -392,8 +392,8 @@ void NetworkPackageManager :: upgradePackages() | |||
392 | { | 392 | { |
393 | // We're gonna do an upgrade of all packages | 393 | // We're gonna do an upgrade of all packages |
394 | // First warn user that this isn't recommended | 394 | // First warn user that this isn't recommended |
395 | QString text = "WARNING: Upgrading while\nOpie/Qtopia is running\nis NOT recommended!\n\nAre you sure?\n"; | 395 | QString text = tr( "WARNING: Upgrading while\nOpie/Qtopia is running\nis NOT recommended!\n\nAre you sure?\n" ); |
396 | QMessageBox warn("Warning", text, QMessageBox::Warning, | 396 | QMessageBox warn( tr( "Warning" ), text, QMessageBox::Warning, |
397 | QMessageBox::Yes, | 397 | QMessageBox::Yes, |
398 | QMessageBox::No | QMessageBox::Escape | QMessageBox::Default , | 398 | QMessageBox::No | QMessageBox::Escape | QMessageBox::Default , |
399 | 0, this ); | 399 | 0, this ); |
@@ -408,7 +408,7 @@ void NetworkPackageManager :: upgradePackages() | |||
408 | Ipkg ipkg; | 408 | Ipkg ipkg; |
409 | ipkg.setOption( "upgrade" ); | 409 | ipkg.setOption( "upgrade" ); |
410 | 410 | ||
411 | InstallDlgImpl dlg( &ipkg, "Upgrading installed packages", this, "Upgrade", true ); | 411 | InstallDlgImpl dlg( &ipkg, tr( "Upgrading installed packages" ), this, tr( "Upgrade" ), true ); |
412 | dlg.showDlg(); | 412 | dlg.showDlg(); |
413 | 413 | ||
414 | // Reload data | 414 | // Reload data |
@@ -421,7 +421,7 @@ void NetworkPackageManager :: upgradePackages() | |||
421 | void NetworkPackageManager :: downloadPackage() | 421 | void NetworkPackageManager :: downloadPackage() |
422 | { | 422 | { |
423 | bool doUpdate = true; | 423 | bool doUpdate = true; |
424 | if ( download->text() == "Download" ) | 424 | if ( download->text() == tr( "Download" ) ) |
425 | { | 425 | { |
426 | // See if any packages are selected | 426 | // See if any packages are selected |
427 | bool found = false; | 427 | bool found = false; |
@@ -445,7 +445,7 @@ void NetworkPackageManager :: downloadPackage() | |||
445 | downloadRemotePackage(); | 445 | downloadRemotePackage(); |
446 | 446 | ||
447 | } | 447 | } |
448 | else if ( download->text() == "Remove" ) | 448 | else if ( download->text() == tr( "Remove" ) ) |
449 | { | 449 | { |
450 | doUpdate = false; | 450 | doUpdate = false; |
451 | for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild(); | 451 | for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild(); |
@@ -466,9 +466,9 @@ void NetworkPackageManager :: downloadPackage() | |||
466 | Package *p = dataMgr->getServer( serversList->currentText() )->getPackage( name ); | 466 | Package *p = dataMgr->getServer( serversList->currentText() )->getPackage( name ); |
467 | 467 | ||
468 | QString msgtext; | 468 | QString msgtext; |
469 | msgtext.sprintf( "Are you sure you wish to delete\n%s?", (const char *)p->getPackageName() ); | 469 | msgtext = tr( "Are you sure you wish to delete\n%1?" ).arg( (const char *)p->getPackageName() ); |
470 | if ( QMessageBox::information( this, "Are you sure?", | 470 | if ( QMessageBox::information( this, tr( "Are you sure?" ), |
471 | msgtext, "No", "Yes" ) == 1 ) | 471 | msgtext, tr( "No" ), tr( "Yes" ) ) == 1 ) |
472 | { | 472 | { |
473 | doUpdate = true; | 473 | doUpdate = true; |
474 | QFile f( p->getFilename() ); | 474 | QFile f( p->getFilename() ); |
@@ -546,7 +546,7 @@ void NetworkPackageManager :: downloadRemotePackage() | |||
546 | { | 546 | { |
547 | // Display dialog | 547 | // Display dialog |
548 | bool ok; | 548 | bool ok; |
549 | QString package = InputDialog::getText( "Install Remote Package", tr( "Enter package location" ), "http://", &ok, this ); | 549 | QString package = InputDialog::getText( tr( "Install Remote Package" ), tr( "Enter package location" ), "http://", &ok, this ); |
550 | if ( !ok || package.isEmpty() ) | 550 | if ( !ok || package.isEmpty() ) |
551 | return; | 551 | return; |
552 | // DownloadRemoteDlgImpl dlg( this, "Install", true ); | 552 | // DownloadRemoteDlgImpl dlg( this, "Install", true ); |
@@ -603,8 +603,8 @@ void NetworkPackageManager :: applyChanges() | |||
603 | if ( workingPackages.size() == 0 ) | 603 | if ( workingPackages.size() == 0 ) |
604 | { | 604 | { |
605 | // Nothing to do | 605 | // Nothing to do |
606 | QMessageBox::information( this, "Nothing to do", | 606 | QMessageBox::information( this, tr( "Nothing to do" ), |
607 | "No packages selected", "OK" ); | 607 | tr( "No packages selected" ), tr( "OK" ) ); |
608 | 608 | ||
609 | return; | 609 | return; |
610 | } | 610 | } |
@@ -703,18 +703,18 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) | |||
703 | if ( val == 0 ) | 703 | if ( val == 0 ) |
704 | { | 704 | { |
705 | // Version available is the same - option to remove or reinstall | 705 | // Version available is the same - option to remove or reinstall |
706 | caption = "Do you wish to remove or reinstall\n%s?"; | 706 | caption = tr( "Do you wish to remove or reinstall\n%1?" ); |
707 | text = "Remove or ReInstall"; | 707 | text = tr( "Remove or ReInstall" ); |
708 | secondButton = "ReInstall"; | 708 | secondButton = tr( "ReInstall" ); |
709 | secondOption = "R"; | 709 | secondOption = tr( "R" ); |
710 | } | 710 | } |
711 | else if ( val == 1 ) | 711 | else if ( val == 1 ) |
712 | { | 712 | { |
713 | // Version available is newer - option to remove or upgrade | 713 | // Version available is newer - option to remove or upgrade |
714 | caption = "Do you wish to remove or upgrade\n%s?"; | 714 | caption = tr( "Do you wish to remove or upgrade\n%1?" ); |
715 | text = "Remove or Upgrade"; | 715 | text = tr( "Remove or Upgrade" ); |
716 | secondButton = "Upgrade"; | 716 | secondButton = tr( "Upgrade" ); |
717 | secondOption = "U"; | 717 | secondOption = tr( "U" ); |
718 | } | 718 | } |
719 | 719 | ||
720 | // Sticky option not implemented yet, but will eventually allow | 720 | // Sticky option not implemented yet, but will eventually allow |
@@ -722,9 +722,9 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) | |||
722 | if ( stickyOption == "" ) | 722 | if ( stickyOption == "" ) |
723 | { | 723 | { |
724 | QString msgtext; | 724 | QString msgtext; |
725 | msgtext.sprintf( caption, (const char *)name ); | 725 | msgtext = caption.arg( ( const char * )name ); |
726 | switch( QMessageBox::information( this, text, | 726 | switch( QMessageBox::information( this, text, |
727 | msgtext, "Remove", secondButton ) ) | 727 | msgtext, tr( "Remove" ), secondButton ) ) |
728 | { | 728 | { |
729 | case 0: // Try again or Enter | 729 | case 0: // Try again or Enter |
730 | // option 0 = Remove | 730 | // option 0 = Remove |
@@ -797,7 +797,7 @@ void NetworkPackageManager :: searchForPackage( bool findNext ) | |||
797 | { | 797 | { |
798 | bool ok = false; | 798 | bool ok = false; |
799 | if ( !findNext || lastSearchText.isEmpty() ) | 799 | if ( !findNext || lastSearchText.isEmpty() ) |
800 | lastSearchText = InputDialog::getText( "Search for package", "Enter package to search for", lastSearchText, &ok, this ).lower(); | 800 | lastSearchText = InputDialog::getText( tr( "Search for package" ), tr( "Enter package to search for" ), lastSearchText, &ok, this ).lower(); |
801 | else | 801 | else |
802 | ok = true; | 802 | ok = true; |
803 | 803 | ||