Changeset 1726 in vbox for trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h
- Timestamp:
- Mar 27, 2007 12:04:17 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h
r1718 r1726 233 233 Assert (!pxErroneous.isNull()); 234 234 235 pxHD = QPixmap::fromMimeSource ("diskim_16px.png");236 pxCD = QPixmap::fromMimeSource ("cd_16px.png");237 pxFD = QPixmap::fromMimeSource ("fd_16px.png");235 pxHD = VBoxGlobal::iconSet ("hd_16px.png", "hd_disabled_16px.png"); 236 pxCD = VBoxGlobal::iconSet ("cd_16px.png", "cd_disabled_16px.png"); 237 pxFD = VBoxGlobal::iconSet ("fd_16px.png", "fd_disabled_16px.png"); 238 238 239 239 /* setup tab widget icons */ 240 twImages->setTabIconSet (twImages->page (0), 241 VBoxGlobal::iconSet ("hd_16px.png", 242 "hd_disabled_16px.png")); 243 twImages->setTabIconSet (twImages->page (1), 244 VBoxGlobal::iconSet ("cd_16px.png", 245 "cd_disabled_16px.png")); 246 twImages->setTabIconSet (twImages->page (2), 247 VBoxGlobal::iconSet ("fd_16px.png", 248 "fd_disabled_16px.png")); 249 240 twImages->setTabIconSet (twImages->page (0), pxHD); 241 twImages->setTabIconSet (twImages->page (1), pxCD); 242 twImages->setTabIconSet (twImages->page (2), pxFD); 250 243 251 244 /* setup image list views */ … … 1253 1246 1254 1247 1248 DiskImageItem* VBoxDiskImageManagerDlg::searchItem (QListView *aList, 1249 VBoxMedia::Status aStatus) 1250 { 1251 DiskImageItemIterator iterator (aList); 1252 while (*iterator) 1253 { 1254 if ((*iterator)->getStatus() == aStatus) 1255 return *iterator; 1256 ++iterator; 1257 } 1258 return 0; 1259 } 1260 1261 1255 1262 void VBoxDiskImageManagerDlg::setup (int aType, bool aDoSelect, 1256 1263 const QUuid *aTargetVMId /* = NULL */, … … 1327 1334 { 1328 1335 /* load default tab icons */ 1329 twImages->changeTab (twImages->page (0), 1330 QIconSet (pxHD), 1336 twImages->changeTab (twImages->page (0), pxHD, 1331 1337 twImages->tabLabel (twImages->page (0))); 1332 twImages->changeTab (twImages->page (1), 1333 QIconSet (pxCD), 1338 twImages->changeTab (twImages->page (1), pxCD, 1334 1339 twImages->tabLabel (twImages->page (1))); 1335 twImages->changeTab (twImages->page (2), 1336 QIconSet (pxFD), 1340 twImages->changeTab (twImages->page (2), pxFD, 1337 1341 twImages->tabLabel (twImages->page (2))); 1338 1342 … … 1488 1492 delete item; 1489 1493 setCurrentItem (listView, listView->currentItem()); 1494 /* search the list for inaccessible media */ 1495 if (!searchItem (listView, VBoxMedia::Inaccessible) && 1496 !searchItem (listView, VBoxMedia::Error)) 1497 { 1498 QWidget *wt = aType == VBoxDefs::HD ? twImages->page (0) : 1499 aType == VBoxDefs::CD ? twImages->page (1) : 1500 aType == VBoxDefs::FD ? twImages->page (2) : 0; 1501 const QIconSet &set = aType == VBoxDefs::HD ? pxHD : 1502 aType == VBoxDefs::CD ? pxCD : 1503 aType == VBoxDefs::FD ? pxFD : QIconSet(); 1504 Assert (wt && !set.isNull()); /* atype should be the correct one */ 1505 twImages->changeTab (wt, set, twImages->tabLabel (wt)); 1506 } 1490 1507 } 1491 1508
Note:
See TracChangeset
for help on using the changeset viewer.