Changeset 75662 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 22, 2018 12:47:42 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126854
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.cpp
r75643 r75662 428 428 QString detailsString(m_strProperty); 429 429 detailsString += "<br/>"; 430 detailsString += "<b>Total Size:</b> " + QString::number(directoryStatistics.m_totalSize) + QString(" bytes"); 430 detailsString += "<b>" + UIGuestControlFileManager::tr("Total Size") + "</b> " + 431 QString::number(directoryStatistics.m_totalSize) + UIGuestControlFileManager::tr(" bytes"); 431 432 if (directoryStatistics.m_totalSize >= UIGuestControlFileTable::m_iKiloByte) 432 433 detailsString += " (" + UIGuestControlFileTable::humanReadableSize(directoryStatistics.m_totalSize) + ")"; 433 434 detailsString += "<br/>"; 434 435 435 detailsString += "<b>File Count:</b> " + QString::number(directoryStatistics.m_uFileCount); 436 detailsString += "<b>" + UIGuestControlFileManager::tr("File Count") + ":</b> " + 437 QString::number(directoryStatistics.m_uFileCount); 436 438 437 439 m_pInfoEdit->setHtml(detailsString); 438 439 } 440 } 441 440 442 441 443 /********************************************************************************************************************************* 442 * UIDirectoryStatistics implementation. 443 * 444 * UIDirectoryStatistics implementation. * 444 445 *********************************************************************************************************************************/ 445 446 … … 479 480 return; 480 481 m_childItems.append(item); 481 482 482 m_childMap.insert(item->name(), item); 483 483 } … … 662 662 pLayout->addWidget(m_pAskNextTimeCheckBox); 663 663 m_pAskNextTimeCheckBox->setText(UIGuestControlFileManager::tr("Ask for this confirmation next time")); 664 m_pAskNextTimeCheckBox->setToolTip(UIGuestControlFileManager::tr("Delete confirmation can be " 665 "disabled/enabled also from the Options panel.")); 664 666 } 665 667 } … … 830 832 QVector<QVariant> headData; 831 833 headData.resize(UIGuestControlFileModelColumn_Max); 832 headData[UIGuestControlFileModelColumn_Name] = "Name";833 headData[UIGuestControlFileModelColumn_Size] = "Size";834 headData[UIGuestControlFileModelColumn_ChangeTime] = "Change Time";835 headData[UIGuestControlFileModelColumn_Owner] = "Owner";836 headData[UIGuestControlFileModelColumn_Permissions] = "Permissions";837 834 m_pRootItem = new UIFileTableItem(headData, 0, FileObjectType_Directory); 838 835 UIFileTableItem* startItem = new UIFileTableItem(createTreeItemData(startPath, 4096, QDateTime(), … … 1253 1250 void UIGuestControlFileTable::retranslateUi() 1254 1251 { 1252 if (m_pRootItem) 1253 { 1254 m_pRootItem->setData(UIGuestControlFileManager::tr("Name"), UIGuestControlFileModelColumn_Name); 1255 m_pRootItem->setData(UIGuestControlFileManager::tr("Size"), UIGuestControlFileModelColumn_Size); 1256 m_pRootItem->setData(UIGuestControlFileManager::tr("Change Time"), UIGuestControlFileModelColumn_ChangeTime); 1257 m_pRootItem->setData(UIGuestControlFileManager::tr("Owner"), UIGuestControlFileModelColumn_Owner); 1258 m_pRootItem->setData(UIGuestControlFileManager::tr("Permissions"), UIGuestControlFileModelColumn_Permissions); 1259 } 1255 1260 } 1256 1261 … … 1397 1402 QString UIGuestControlFileTable::fileTypeString(FileObjectType type) 1398 1403 { 1399 QString strType ("Unknown");1404 QString strType = UIGuestControlFileManager::tr("Unknown"); 1400 1405 switch(type) 1401 1406 { 1402 1407 case FileObjectType_File: 1403 strType = "File";1408 strType = UIGuestControlFileManager::tr("File"); 1404 1409 break; 1405 1410 case FileObjectType_Directory: 1406 strType = "Directory";1411 strType = UIGuestControlFileManager::tr("Directory"); 1407 1412 break; 1408 1413 case FileObjectType_SymLink: 1409 strType = "Symbolic Link";1414 strType = UIGuestControlFileManager::tr("Symbolic Link"); 1410 1415 break; 1411 1416 case FileObjectType_Other: 1412 strType = "Other";1417 strType = UIGuestControlFileManager::tr("Other"); 1413 1418 break; 1414 1419 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.cpp
r75610 r75662 29 29 # include "UIActionPool.h" 30 30 # include "UIErrorString.h" 31 # include "UIGuestControlFileManager.h" 31 32 # include "UIGuestFileTable.h" 32 33 # include "UIMessageCenter.h" … … 167 168 { 168 169 if (m_pLocationLabel) 169 m_pLocationLabel->setText( QApplication::translate("UIGuestControlFileManager","Guest System"));170 m_pLocationLabel->setText(UIGuestControlFileManager::tr("Guest System")); 170 171 UIGuestControlFileTable::retranslateUi(); 171 172 } … … 439 440 440 441 /* Name: */ 441 propertyString += "<b> Name:</b> " + UIPathOperations::getObjectName(fileInfo.GetName()) + "\n";442 propertyString +="<br/>";442 propertyString += "<b>" + UIGuestControlFileManager::tr("Name") + ":</b> " + 443 UIPathOperations::getObjectName(fileInfo.GetName()) + "\n" + "<br/>"; 443 444 /* Size: */ 444 445 LONG64 size = fileInfo.GetObjectSize(); 445 propertyString += "<b>Size:</b> " + QString::number(size) + QString(" bytes"); 446 propertyString += "<b>" + UIGuestControlFileManager::tr("Size") + ":</b> " + QString::number(size) + 447 UIGuestControlFileManager::tr(" bytes"); 446 448 if (size >= 1024) 447 propertyString += " (" + humanReadableSize(size) + ")"; 448 propertyString += "<br/>"; 449 propertyString += " (" + humanReadableSize(size) + ")" + "<br/>"; 449 450 /* Type: */ 450 propertyString += "<b>Type:</b> " + fileTypeString(fileType(fileInfo)); 451 propertyString += "<br/>"; 451 propertyString += "<b>" + UIGuestControlFileManager::tr("Type") + ":</b> " + fileTypeString(fileType(fileInfo)) + "<br/>"; 452 452 /* Creation Date: */ 453 propertyString += "<b> Created:</b> " + QDateTime::fromMSecsSinceEpoch(fileInfo.GetChangeTime()/1000000).toString();454 propertyString +="<br/>";453 propertyString += "<b>" + UIGuestControlFileManager::tr("Created") + ":</b> " + 454 QDateTime::fromMSecsSinceEpoch(fileInfo.GetChangeTime()/1000000).toString() + "<br/>"; 455 455 /* Last Modification Date: */ 456 propertyString += "<b> Modified:</b> " + QDateTime::fromMSecsSinceEpoch(fileInfo.GetModificationTime()/1000000).toString();457 propertyString +="<br/>";456 propertyString += "<b>" + UIGuestControlFileManager::tr("Modified") + ":</b> " + 457 QDateTime::fromMSecsSinceEpoch(fileInfo.GetModificationTime()/1000000).toString() + "<br/>"; 458 458 /* Owner: */ 459 propertyString += "<b> Owner:</b> " + fileInfo.GetUserName();459 propertyString += "<b>" + UIGuestControlFileManager::tr("Owner") + ":</b> " + fileInfo.GetUserName(); 460 460 return propertyString; 461 461 } … … 483 483 } 484 484 QString propertyString; 485 propertyString += "<b>Selected:</b> " + QString::number(fileCount) + " files "; 486 propertyString += "and " + QString::number(directoryCount) + " directories"; 487 propertyString += "<br/>"; 488 propertyString += "<b>Size:</b> " + QString::number(totalSize) + QString(" bytes"); 485 propertyString += "<b>" + UIGuestControlFileManager::tr("Selected:") + "</b> " + QString::number(fileCount) + " files "; 486 propertyString += UIGuestControlFileManager::tr("and ") + QString::number(directoryCount) + " " + 487 UIGuestControlFileManager::tr("directories") + "<br/>"; 488 propertyString += "<b>" + UIGuestControlFileManager::tr("Size:") + "</b> " + QString::number(totalSize) + 489 UIGuestControlFileManager::tr(" bytes"); 489 490 if (totalSize >= m_iKiloByte) 490 491 propertyString += " (" + humanReadableSize(totalSize) + ")"; … … 527 528 // } 528 529 529 m_pPropertiesDialog->setWindowTitle( "Properties");530 m_pPropertiesDialog->setWindowTitle(UIGuestControlFileManager::tr("Properties")); 530 531 m_pPropertiesDialog->setPropertyText(fsPropertyString); 531 532 m_pPropertiesDialog->execute(); -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.cpp
r75619 r75662 28 28 # include "QILabel.h" 29 29 # include "UIActionPool.h" 30 # include "UIGuestControlFileManager.h" 30 31 # include "UIGuestControlFileModel.h" 31 32 # include "UIHostFileTable.h" … … 142 143 { 143 144 if (m_pLocationLabel) 144 m_pLocationLabel->setText( QApplication::translate("UIGuestControlFileManager","Host System"));145 m_pLocationLabel->setText(UIGuestControlFileManager::tr("Host System")); 145 146 UIGuestControlFileTable::retranslateUi(); 146 147 } … … 367 368 QString propertyString; 368 369 /* Name: */ 369 propertyString += "<b> Name:</b> " + fileInfo.fileName() + "\n";370 propertyString += "<b>" + UIGuestControlFileManager::tr("Name") + ":</b> " + fileInfo.fileName() + "\n"; 370 371 if (!fileInfo.suffix().isEmpty()) 371 372 propertyString += "." + fileInfo.suffix(); 372 373 propertyString += "<br/>"; 373 374 /* Size: */ 374 propertyString += "<b>Size:</b> " + QString::number(fileInfo.size()) + QString(" bytes"); 375 propertyString += "<b>" + UIGuestControlFileManager::tr("Size") + ":</b> " + 376 QString::number(fileInfo.size()) + UIGuestControlFileManager::tr(" bytes"); 375 377 if (fileInfo.size() >= m_iKiloByte) 376 378 propertyString += " (" + humanReadableSize(fileInfo.size()) + ")"; 377 379 propertyString += "<br/>"; 378 380 /* Type: */ 379 propertyString += "<b> Type:</b> " + fileTypeString(fileType(fileInfo));381 propertyString += "<b>" + UIGuestControlFileManager::tr("Type") + ":</b> " + fileTypeString(fileType(fileInfo)); 380 382 propertyString += "<br/>"; 381 383 /* Creation Date: */ 382 propertyString += "<b> Created:</b> " + fileInfo.created().toString();384 propertyString += "<b>" + UIGuestControlFileManager::tr("Created") + ":</b> " + fileInfo.created().toString(); 383 385 propertyString += "<br/>"; 384 386 /* Last Modification Date: */ 385 propertyString += "<b> Modified:</b> " + fileInfo.lastModified().toString();387 propertyString += "<b>" + UIGuestControlFileManager::tr("Modified") + ":</b> " + fileInfo.lastModified().toString(); 386 388 propertyString += "<br/>"; 387 389 /* Owner: */ 388 propertyString += "<b> Owner:</b> " + fileInfo.owner();390 propertyString += "<b>" + UIGuestControlFileManager::tr("Owner") + ":</b> " + fileInfo.owner(); 389 391 390 392 return propertyString; … … 407 409 } 408 410 QString propertyString; 409 propertyString += "<b>Selected:</b> " + QString::number(fileCount) + " files "; 410 propertyString += "and " + QString::number(directoryCount) + " directories"; 411 propertyString += "<b>" + UIGuestControlFileManager::tr("Selected") + ":</b> " + QString::number(fileCount) + 412 " " + UIGuestControlFileManager::tr("files") + " "; 413 propertyString += UIGuestControlFileManager::tr("and") + " " + QString::number(directoryCount) + " " + 414 UIGuestControlFileManager::tr("directories"); 411 415 propertyString += "<br/>"; 412 propertyString += "<b>Size:</b> " + QString::number(totalSize) + QString(" bytes"); 416 propertyString += "<b>" + UIGuestControlFileManager::tr("Size") + ":</b> " + QString::number(totalSize) + " " + 417 UIGuestControlFileManager::tr("bytes"); 413 418 if (totalSize >= m_iKiloByte) 414 419 propertyString += " (" + humanReadableSize(totalSize) + ")";
Note:
See TracChangeset
for help on using the changeset viewer.