Changeset 68883 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Sep 27, 2017 10:13:19 AM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r68663 r68883 815 815 { 816 816 UIIndicatorStateVideoCapture_Disabled = 0, 817 UIIndicatorStateVideoCapture_Enabled = 1 817 UIIndicatorStateVideoCapture_Enabled = 1, 818 UIIndicatorStateVideoCapture_Paused = 2 818 819 }; 819 820 … … 829 830 setStateIcon(UIIndicatorStateVideoCapture_Disabled, UIIconPool::iconSet(":/video_capture_16px.png")); 830 831 setStateIcon(UIIndicatorStateVideoCapture_Enabled, UIIconPool::iconSet(":/movie_reel_16px.png")); 832 setStateIcon(UIIndicatorStateVideoCapture_Paused, UIIconPool::iconSet(":/movie_reel_16px.png")); 831 833 /* Create *enabled* state animation: */ 832 834 m_pAnimation = UIAnimationLoop::installAnimationLoop(this, "rotationAngle", … … 851 853 case UIIndicatorStateVideoCapture_Enabled: 852 854 m_pAnimation->start(); 855 break; 856 case UIIndicatorStateVideoCapture_Paused: 857 m_pAnimation->stop(); 853 858 break; 854 859 default: … … 888 893 /* Get machine: */ 889 894 const CMachine machine = m_pSession->machine(); 895 const bool fMachinePaused = m_pSession->isPaused(); 890 896 891 897 /* Update indicator state early: */ 892 setState(machine.GetVideoCaptureEnabled()); 898 if (!machine.GetVideoCaptureEnabled()) 899 setState(UIIndicatorStateVideoCapture_Disabled); 900 else if (!fMachinePaused) 901 setState(UIIndicatorStateVideoCapture_Enabled); 902 else 903 setState(UIIndicatorStateVideoCapture_Paused); 893 904 894 905 /* Prepare tool-tip: */ … … 906 917 } 907 918 case UIIndicatorStateVideoCapture_Enabled: 919 case UIIndicatorStateVideoCapture_Paused: 908 920 { 909 921 strFullData += s_strTableRow2 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r68508 r68883 71 71 72 72 /* Update indicator-pool and virtualization stuff: */ 73 updateAppearanceOf(UIVisualElement_IndicatorPoolStuff | UIVisualElement_ FeaturesStuff);73 updateAppearanceOf(UIVisualElement_IndicatorPoolStuff | UIVisualElement_VideoCapture | UIVisualElement_FeaturesStuff); 74 74 } 75 75 … … 611 611 if (iElement & UIVisualElement_IndicatorPoolStuff) 612 612 m_pIndicatorsPool->setAutoUpdateIndicatorStates(statusBar()->isVisible() && uisession()->isRunning()); 613 /* Update status-bar indicator-pool appearance only when status-bar is visible and VM is running: */ 614 if (statusBar()->isVisible() && uisession()->isRunning()) 615 { 616 if (iElement & UIVisualElement_HDStuff) 617 m_pIndicatorsPool->updateAppearance(IndicatorType_HardDisks); 618 if (iElement & UIVisualElement_CDStuff) 619 m_pIndicatorsPool->updateAppearance(IndicatorType_OpticalDisks); 620 if (iElement & UIVisualElement_FDStuff) 621 m_pIndicatorsPool->updateAppearance(IndicatorType_FloppyDisks); 622 if (iElement & UIVisualElement_AudioStuff) 623 m_pIndicatorsPool->updateAppearance(IndicatorType_Audio); 624 if (iElement & UIVisualElement_NetworkStuff) 625 m_pIndicatorsPool->updateAppearance(IndicatorType_Network); 626 if (iElement & UIVisualElement_USBStuff) 627 m_pIndicatorsPool->updateAppearance(IndicatorType_USB); 628 if (iElement & UIVisualElement_SharedFolderStuff) 629 m_pIndicatorsPool->updateAppearance(IndicatorType_SharedFolders); 630 if (iElement & UIVisualElement_Display) 631 m_pIndicatorsPool->updateAppearance(IndicatorType_Display); 632 if (iElement & UIVisualElement_VideoCapture) 633 m_pIndicatorsPool->updateAppearance(IndicatorType_VideoCapture); 634 if (iElement & UIVisualElement_FeaturesStuff) 635 m_pIndicatorsPool->updateAppearance(IndicatorType_Features); 613 /* Update status-bar indicator-pool appearance only when status-bar is visible: */ 614 if (statusBar()->isVisible()) 615 { 616 /* If VM is running: */ 617 if (uisession()->isRunning()) 618 { 619 if (iElement & UIVisualElement_HDStuff) 620 m_pIndicatorsPool->updateAppearance(IndicatorType_HardDisks); 621 if (iElement & UIVisualElement_CDStuff) 622 m_pIndicatorsPool->updateAppearance(IndicatorType_OpticalDisks); 623 if (iElement & UIVisualElement_FDStuff) 624 m_pIndicatorsPool->updateAppearance(IndicatorType_FloppyDisks); 625 if (iElement & UIVisualElement_AudioStuff) 626 m_pIndicatorsPool->updateAppearance(IndicatorType_Audio); 627 if (iElement & UIVisualElement_NetworkStuff) 628 m_pIndicatorsPool->updateAppearance(IndicatorType_Network); 629 if (iElement & UIVisualElement_USBStuff) 630 m_pIndicatorsPool->updateAppearance(IndicatorType_USB); 631 if (iElement & UIVisualElement_SharedFolderStuff) 632 m_pIndicatorsPool->updateAppearance(IndicatorType_SharedFolders); 633 if (iElement & UIVisualElement_Display) 634 m_pIndicatorsPool->updateAppearance(IndicatorType_Display); 635 if (iElement & UIVisualElement_FeaturesStuff) 636 m_pIndicatorsPool->updateAppearance(IndicatorType_Features); 637 } 638 /* If VM is running or paused: */ 639 if (uisession()->isRunning() || uisession()->isPaused()) 640 { 641 if (iElement & UIVisualElement_VideoCapture) 642 m_pIndicatorsPool->updateAppearance(IndicatorType_VideoCapture); 643 } 636 644 } 637 645 }
Note:
See TracChangeset
for help on using the changeset viewer.