Changeset 2917 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 29, 2007 2:17:19 PM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r2868 r2917 1552 1552 { 1553 1553 case CEnums::HostDriveCaptured: 1554 name = tr ("Host Drive ", "DVD-ROM tooltip") + 1555 dvd.GetHostDrive().GetName(); 1554 { 1555 QString description = dvd.GetHostDrive().GetDescription(); 1556 if (description.isEmpty()) 1557 { 1558 name = tr ("Host Drive ", "DVD-ROM tooltip") + 1559 dvd.GetHostDrive().GetName(); 1560 } 1561 else 1562 { 1563 name = tr ("Host Drive ", "DVD-ROM tooltip") + 1564 description; 1565 } 1556 1566 break; 1567 } 1557 1568 case CEnums::ImageMounted: 1558 1569 name = dvd.GetImage().GetFilePath(); … … 2187 2198 CHostDVDDrive hostDVD = en.GetNext(); 2188 2199 /** @todo set icon */ 2189 int id = devicesMountDVDMenu->insertItem ( 2190 tr ("Host Drive ") + hostDVD.GetName() 2191 ); 2200 QString description = hostDVD.GetDescription(); 2201 int id; 2202 if (description.isEmpty()) 2203 { 2204 id = devicesMountDVDMenu->insertItem ( 2205 tr ("Host Drive ") + hostDVD.GetName() 2206 ); 2207 } 2208 else 2209 { 2210 id = devicesMountDVDMenu->insertItem ( 2211 tr ("Host Drive ") + description 2212 ); 2213 } 2192 2214 hostDVDMap [id] = hostDVD; 2193 2215 if (machine_state != CEnums::Running) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r2834 r2917 1173 1173 { 1174 1174 CHostDVDDrive drv = dvd.GetHostDrive(); 1175 QString description = drv.GetDescription(); 1176 if (description.isEmpty()) 1177 { 1175 1178 item = item.arg (tr ("Host Drive", "details report (DVD)"), 1176 1179 drv.GetName()); 1180 } 1181 else 1182 { 1183 item = item.arg (tr ("Host Drive", "details report (DVD)"), 1184 description); 1185 } 1177 1186 break; 1178 1187 } -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h
r2915 r2917 1426 1426 CHostDVDDrive hostDVD = en.GetNext(); 1427 1427 /// @todo (r=dmik) set icon? 1428 cbHostDVD->insertItem (hostDVD.GetName(), id); 1428 QString description = hostDVD.GetDescription(); 1429 if (description.isEmpty()) 1430 { 1431 cbHostDVD->insertItem (hostDVD.GetName(), id); 1432 } 1433 else 1434 { 1435 cbHostDVD->insertItem (description, id); 1436 } 1429 1437 hostDVDs [id] = hostDVD; 1430 1438 ++ id; … … 1438 1446 CHostDVDDrive drv = dvd.GetHostDrive(); 1439 1447 QString name = drv.GetName(); 1448 QString description = drv.GetDescription(); 1440 1449 if (coll.FindByName (name).isNull()) 1441 1450 { … … 1444 1453 * add it to the end of the list with a special mark 1445 1454 */ 1446 cbHostDVD->insertItem ("* " + name); 1455 if (description.isEmpty()) 1456 { 1457 cbHostDVD->insertItem ("* " + name); 1458 } 1459 else 1460 { 1461 cbHostDVD->insertItem ("* " + description); 1462 } 1447 1463 cbHostDVD->setCurrentItem (cbHostDVD->count() - 1); 1448 1464 } … … 1450 1466 { 1451 1467 /* this will select the correct item from the prepared list */ 1452 cbHostDVD->setCurrentText (name); 1468 if (description.isEmpty()) 1469 { 1470 cbHostDVD->setCurrentText (name); 1471 } 1472 else 1473 { 1474 cbHostDVD->setCurrentText (description); 1475 } 1453 1476 } 1454 1477 rbHostDVD->setChecked (true);
Note:
See TracChangeset
for help on using the changeset viewer.