VirtualBox

Ignore:
Timestamp:
Mar 27, 2007 12:04:17 PM (18 years ago)
Author:
vboxsync
Message:

1703: Redesign the Virtual Disk Manager dialog:

  1. Removing the last inaccessible image from VDM list changes tab icon to the normal one.
  2. The disabled tab icons are now corrected.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h

    r1718 r1726  
    233233    Assert (!pxErroneous.isNull());
    234234
    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");
    238238
    239239    /* 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);
    250243
    251244    /* setup image list views */
     
    12531246
    12541247
     1248DiskImageItem* 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
    12551262void VBoxDiskImageManagerDlg::setup (int aType, bool aDoSelect,
    12561263                                     const QUuid *aTargetVMId /* = NULL */,
     
    13271334{
    13281335    /* load default tab icons */
    1329     twImages->changeTab (twImages->page (0),
    1330                          QIconSet (pxHD),
     1336    twImages->changeTab (twImages->page (0), pxHD,
    13311337                         twImages->tabLabel (twImages->page (0)));
    1332     twImages->changeTab (twImages->page (1),
    1333                          QIconSet (pxCD),
     1338    twImages->changeTab (twImages->page (1), pxCD,
    13341339                         twImages->tabLabel (twImages->page (1)));
    1335     twImages->changeTab (twImages->page (2),
    1336                          QIconSet (pxFD),
     1340    twImages->changeTab (twImages->page (2), pxFD,
    13371341                         twImages->tabLabel (twImages->page (2)));
    13381342
     
    14881492    delete item;
    14891493    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    }
    14901507}
    14911508
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette