Changeset 1757 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 28, 2007 9:53:17 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 19925
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h
r1371 r1757 95 95 bool aRefreshSnapshots = true, 96 96 bool aRefreshDescription = true); 97 98 void mediaEnumStarted(); 97 99 void mediaEnumFinished (const VBoxMediaList &); 98 100 … … 133 135 QPoint normal_pos; 134 136 QSize normal_size; 137 138 bool doneInaccessibleWarningOnce : 1; 135 139 }; 136 140 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r1706 r1757 409 409 if (!vboxGlobal_inited) 410 410 { 411 / / check that the QApplication instance is created411 /* check that a QApplication instance is created */ 412 412 if (qApp) 413 413 { 414 414 vboxGlobal_inited = true; 415 415 vboxGlobal_instance.init(); 416 / / add our cleanup handler to the list of Qt post routines416 /* add our cleanup handler to the list of Qt post routines */ 417 417 qAddPostRoutine (vboxGlobalCleanup); 418 418 } … … 436 436 } 437 437 438 // @note 439 // we don't assign gs to our gset member here, because VBoxCallback 440 // will update gset as necessary when new settings are successfullly 441 // sent to the VirtualBox server by gs.save() 438 /* We don't assign gs to our gset member here, because VBoxCallback 439 * will update gset as necessary when new settings are successfullly 440 * sent to the VirtualBox server by gs.save(). */ 442 441 443 442 return true; … … 612 611 Assert (!aPredict || aHD.GetParent().isNull()); 613 612 614 /// @todo (r=dmik) later: we need to keep *all* media (including all hard disk 615 // children) in the current media list in order for the following to work. 616 // VBoxMedia media; 617 // if (!findMedia (CUnknown (aHD), media)) 618 // { 619 // /* media may be new and not alredy in the media list, request refresh */ 620 // startEnumeratingMedia(); 621 // if (!findMedia (CUnknown (aHD), media)) 622 // AssertFailed(); 623 // } 613 VBoxMedia media; 614 if (!findMedia (CUnknown (aHD), media)) 615 { 616 /* media may be new and not alredy in the media list, request refresh */ 617 startEnumeratingMedia(); 618 if (!findMedia (CUnknown (aHD), media)) 619 AssertFailed(); 620 } 624 621 625 622 CHardDisk root = aHD.GetRoot(); … … 636 633 details += ", "; 637 634 638 /// @todo (r=dmik)prepend the details with the warning/error635 /// @todo prepend the details with the warning/error 639 636 // icon when not accessible 640 637 641 /// @todo (r=dmik) later: we need to keep *all* media (including all hard disk 642 // children) in the current media list in order for the following to work. 643 // switch (media.status) 644 // { 645 // case VBoxMedia::Unknown: 646 // details += tr ("<i>Checking...</i>", "hard disk"); 647 // break; 648 // case VBoxMedia::Ok: 638 switch (media.status) 639 { 640 case VBoxMedia::Unknown: 641 details += tr ("<i>Checking...</i>", "hard disk"); 642 break; 643 case VBoxMedia::Ok: 649 644 details += formatSize (root.GetSize() * _1M); 650 //break;651 //case VBoxMedia::Error:652 //case VBoxMedia::Inaccessible:653 // details += tr ("Inaccessible", "hard disk");654 //break;655 //}645 break; 646 case VBoxMedia::Error: 647 case VBoxMedia::Inaccessible: 648 details += tr ("<i>Inaccessible</i>", "hard disk"); 649 break; 650 } 656 651 657 652 return details; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r1371 r1757 374 374 WFlags aFlags) 375 375 : QMainWindow (aParent, aName, aFlags) 376 , doneInaccessibleWarningOnce (false) 376 377 { 377 378 if (aSelf) … … 580 581 this, SLOT (vmSettings (const QString &))); 581 582 582 /* listen to "media enumeration finished" signals */ 583 /* listen to media enumeration signals */ 584 connect (&vboxGlobal(), SIGNAL (mediaEnumStarted()), 585 this, SLOT (mediaEnumStarted())); 583 586 connect (&vboxGlobal(), SIGNAL (mediaEnumFinished (const VBoxMediaList &)), 584 587 this, SLOT (mediaEnumFinished (const VBoxMediaList &))); … … 1216 1219 } 1217 1220 1218 void VBoxSelectorWnd::mediaEnum Finished (const VBoxMediaList &list)1221 void VBoxSelectorWnd::mediaEnumStarted() 1219 1222 { 1220 1223 /* refresh the current details to pick up hard disk sizes */ 1221 1224 vmListBoxCurrentChanged (true /* aRefreshDetails */); 1225 } 1226 1227 void VBoxSelectorWnd::mediaEnumFinished (const VBoxMediaList &list) 1228 { 1229 /* refresh the current details to pick up hard disk sizes */ 1230 vmListBoxCurrentChanged (true /* aRefreshDetails */); 1231 1232 /* we warn about inaccessible media only once (after media emumeration 1233 * started from main() at startup), to avoid annoying the user */ 1234 if (doneInaccessibleWarningOnce) 1235 return; 1236 1237 doneInaccessibleWarningOnce = true; 1222 1238 1223 1239 do … … 1247 1263 } 1248 1264 while (0); 1249 1250 /* we react to the media enumeration event only once (after media1251 * emumeration started from main() at startup), and then disconnect1252 * to avoid annoying the user */1253 disconnect (&vboxGlobal(), SIGNAL (mediaEnumFinished (const VBoxMediaList &)),1254 this, SLOT (mediaEnumFinished (const VBoxMediaList &)));1255 1265 } 1256 1266
Note:
See TracChangeset
for help on using the changeset viewer.