Changeset 105195 in vbox
- Timestamp:
- Jul 8, 2024 5:52:35 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r105193 r105195 406 406 UIIndicatorAudio(UIMachine *pMachine) 407 407 : UISessionStateStatusBarIndicator(IndicatorType_Audio, pMachine) 408 , m_fOutputEnabled(false) 409 , m_fInputEnabled(false) 408 410 { 409 411 /* Assign state-icons: */ … … 483 485 UIIndicatorNetwork(UIMachine *pMachine) 484 486 : UISessionStateStatusBarIndicator(IndicatorType_Network, pMachine) 487 , m_fAdaptersPresent(false) 488 , m_fCablesDisconnected(true) 485 489 { 486 490 /* Assign state-icons: */ … … 504 508 { 505 509 QString strFullData; 506 boolfAdaptersPresent = false;507 boolfCablesDisconnected = true;508 m_pMachine->acquireNetworkStatusInfo(strFullData, fAdaptersPresent,fCablesDisconnected);510 m_fAdaptersPresent = false; 511 m_fCablesDisconnected = true; 512 m_pMachine->acquireNetworkStatusInfo(strFullData, m_fAdaptersPresent, m_fCablesDisconnected); 509 513 510 514 /* Show/hide indicator if there are no attachments … … 512 516 if ( parentWidget() 513 517 && parentWidget()->isVisible()) 514 setVisible( fAdaptersPresent);518 setVisible(m_fAdaptersPresent); 515 519 516 520 /* Update tool-tip: */ … … 518 522 setToolTip(s_strTable.arg(strFullData)); 519 523 /* Update indicator state: */ 520 setState(fAdaptersPresent && !fCablesDisconnected ? KDeviceActivity_Idle : KDeviceActivity_Null); 521 } 524 setState(m_fAdaptersPresent && !m_fCablesDisconnected ? KDeviceActivity_Idle : KDeviceActivity_Null); 525 } 526 527 /** Handles translation event. */ 528 virtual void sltRetranslateUI() RT_OVERRIDE 529 { 530 /* Call to base-class: */ 531 UISessionStateStatusBarIndicator::sltRetranslateUI(); 532 533 /* Append description with more info: */ 534 const QString strAdaptersStatus = m_fAdaptersPresent ? tr("Adapters present") : tr("No network adapters"); 535 const QString strCablesStatus = m_fCablesDisconnected ? tr("All cables disconnected") : QString(); 536 m_strDescription = QString("%1, %2, %3").arg(m_strDescription, strAdaptersStatus, strCablesStatus); 537 } 538 539 private: 540 541 /** Holds whether adapters present. */ 542 bool m_fAdaptersPresent; 543 /** Holds whether cables disconnected. */ 544 bool m_fCablesDisconnected; 522 545 }; 523 546
Note:
See TracChangeset
for help on using the changeset viewer.