author | drw <drw> | 2003-01-05 01:13:45 (UTC) |
---|---|---|
committer | drw <drw> | 2003-01-05 01:13:45 (UTC) |
commit | db5ab38ee45f202f4a627085e7457a2511abceb4 (patch) (side-by-side diff) | |
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 @@ -147,12 +147,12 @@ void NetworkPackageManager :: initGui() { - QLabel *l = new QLabel( "Servers", this ); + QLabel *l = new QLabel( tr( "Servers" ), this ); serversList = new QComboBox( this ); packagesList = new QListView( this ); - update = new QPushButton( "Refresh Lists", this ); - download = new QPushButton( "Download", this ); - upgrade = new QPushButton( "Upgrade", this ); - apply = new QPushButton( "Apply", this ); + update = new QPushButton( tr( "Refresh Lists" ), this ); + download = new QPushButton( tr( "Download" ), this ); + upgrade = new QPushButton( tr( "Upgrade" ), this ); + apply = new QPushButton( tr( "Apply" ), this ); - QVBoxLayout *vbox = new QVBoxLayout( this, 0, -1, "VBox" ); - QHBoxLayout *hbox1 = new QHBoxLayout( vbox, -1, "HBox1" ); + QVBoxLayout *vbox = new QVBoxLayout( this, 0, -1 ); + QHBoxLayout *hbox1 = new QHBoxLayout( vbox, -1 ); hbox1->addWidget( l ); @@ -160,4 +160,4 @@ void NetworkPackageManager :: initGui() - QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1, "HBox1" ); - QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1, "HBox1" ); + QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1 ); + QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1 ); @@ -181,5 +181,5 @@ void NetworkPackageManager :: initGui() vbox->addWidget( packagesList ); - packagesList->addColumn( "Packages" ); + packagesList->addColumn( tr( "Packages" ) ); - QHBoxLayout *hbox2 = new QHBoxLayout( vbox, -1, "HBox2" ); + QHBoxLayout *hbox2 = new QHBoxLayout( vbox, -1 ); hbox2->addWidget( update ); @@ -310,3 +310,3 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) if ( destName != "" ) - new QCheckListItem( item, QString( "Installed To - " ) + destName ); + new QCheckListItem( item, QString( tr( "Installed To - " ) ) + destName ); } @@ -315,8 +315,8 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) { - new QCheckListItem( item, QString( "Description - " ) + it->getDescription() ); - new QCheckListItem( item, QString( "Size - " ) + it->getPackageSize() ); - new QCheckListItem( item, QString( "Section - " ) + it->getSection() ); + new QCheckListItem( item, QString( tr( "Description - " ) ) + it->getDescription() ); + new QCheckListItem( item, QString( tr( "Size - " ) ) + it->getPackageSize() ); + new QCheckListItem( item, QString( tr( "Section - " ) ) + it->getSection() ); } else - new QCheckListItem( item, QString( "Filename - " ) + it->getFilename() ); + new QCheckListItem( item, QString( tr( "Filename - " ) ) + it->getFilename() ); @@ -324,3 +324,3 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) { - new QCheckListItem( item, QString( "V. Installed - " ) + it->getVersion() ); + new QCheckListItem( item, QString( tr( "V. Installed - " ) ) + it->getVersion() ); } @@ -328,3 +328,3 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) { - new QCheckListItem( item, QString( "V. Available - " ) + it->getVersion() ); + new QCheckListItem( item, QString( tr( "V. Available - " ) ) + it->getVersion() ); if ( it->getLocalPackage() ) @@ -332,3 +332,3 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) if ( it->isInstalled() ) - new QCheckListItem( item, QString( "V. Installed - " ) + it->getInstalledVersion() ); + new QCheckListItem( item, QString( tr( "V. Installed - " ) ) + it->getInstalledVersion() ); } @@ -343,3 +343,3 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) upgrade->setEnabled( false ); - download->setText( "Download" ); + download->setText( tr( "Download" ) ); download->setEnabled( true ); @@ -350,3 +350,3 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) download->setEnabled( true ); - download->setText( "Remove" ); + download->setText( tr( "Remove" ) ); } @@ -356,3 +356,3 @@ void NetworkPackageManager :: serverSelected( int, bool raiseProgress ) download->setEnabled( true ); - download->setText( "Download" ); + download->setText( tr( "Download" ) ); } @@ -381,3 +381,3 @@ void NetworkPackageManager :: updateServer() - InstallDlgImpl dlg( &ipkg, "Refreshing server package lists", this, "Upgrade", true ); + InstallDlgImpl dlg( &ipkg, tr( "Refreshing server package lists" ), this, tr( "Upgrade" ), true ); dlg.showDlg(); @@ -394,4 +394,4 @@ void NetworkPackageManager :: upgradePackages() // First warn user that this isn't recommended - QString text = "WARNING: Upgrading while\nOpie/Qtopia is running\nis NOT recommended!\n\nAre you sure?\n"; - QMessageBox warn("Warning", text, QMessageBox::Warning, + 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, QMessageBox::Yes, @@ -410,3 +410,3 @@ void NetworkPackageManager :: upgradePackages() - InstallDlgImpl dlg( &ipkg, "Upgrading installed packages", this, "Upgrade", true ); + InstallDlgImpl dlg( &ipkg, tr( "Upgrading installed packages" ), this, tr( "Upgrade" ), true ); dlg.showDlg(); @@ -423,3 +423,3 @@ void NetworkPackageManager :: downloadPackage() bool doUpdate = true; - if ( download->text() == "Download" ) + if ( download->text() == tr( "Download" ) ) { @@ -447,3 +447,3 @@ void NetworkPackageManager :: downloadPackage() } - else if ( download->text() == "Remove" ) + else if ( download->text() == tr( "Remove" ) ) { @@ -468,5 +468,5 @@ void NetworkPackageManager :: downloadPackage() QString msgtext; - msgtext.sprintf( "Are you sure you wish to delete\n%s?", (const char *)p->getPackageName() ); - if ( QMessageBox::information( this, "Are you sure?", - msgtext, "No", "Yes" ) == 1 ) + msgtext = tr( "Are you sure you wish to delete\n%1?" ).arg( (const char *)p->getPackageName() ); + if ( QMessageBox::information( this, tr( "Are you sure?" ), + msgtext, tr( "No" ), tr( "Yes" ) ) == 1 ) { @@ -548,3 +548,3 @@ void NetworkPackageManager :: downloadRemotePackage() bool ok; - QString package = InputDialog::getText( "Install Remote Package", tr( "Enter package location" ), "http://", &ok, this ); + QString package = InputDialog::getText( tr( "Install Remote Package" ), tr( "Enter package location" ), "http://", &ok, this ); if ( !ok || package.isEmpty() ) @@ -605,4 +605,4 @@ void NetworkPackageManager :: applyChanges() // Nothing to do - QMessageBox::information( this, "Nothing to do", - "No packages selected", "OK" ); + QMessageBox::information( this, tr( "Nothing to do" ), + tr( "No packages selected" ), tr( "OK" ) ); @@ -705,6 +705,6 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) // Version available is the same - option to remove or reinstall - caption = "Do you wish to remove or reinstall\n%s?"; - text = "Remove or ReInstall"; - secondButton = "ReInstall"; - secondOption = "R"; + caption = tr( "Do you wish to remove or reinstall\n%1?" ); + text = tr( "Remove or ReInstall" ); + secondButton = tr( "ReInstall" ); + secondOption = tr( "R" ); } @@ -713,6 +713,6 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) // Version available is newer - option to remove or upgrade - caption = "Do you wish to remove or upgrade\n%s?"; - text = "Remove or Upgrade"; - secondButton = "Upgrade"; - secondOption = "U"; + caption = tr( "Do you wish to remove or upgrade\n%1?" ); + text = tr( "Remove or Upgrade" ); + secondButton = tr( "Upgrade" ); + secondOption = tr( "U" ); } @@ -724,5 +724,5 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) QString msgtext; - msgtext.sprintf( caption, (const char *)name ); + msgtext = caption.arg( ( const char * )name ); switch( QMessageBox::information( this, text, - msgtext, "Remove", secondButton ) ) + msgtext, tr( "Remove" ), secondButton ) ) { @@ -799,3 +799,3 @@ void NetworkPackageManager :: searchForPackage( bool findNext ) if ( !findNext || lastSearchText.isEmpty() ) - lastSearchText = InputDialog::getText( "Search for package", "Enter package to search for", lastSearchText, &ok, this ).lower(); + lastSearchText = InputDialog::getText( tr( "Search for package" ), tr( "Enter package to search for" ), lastSearchText, &ok, this ).lower(); else |