Changeset 105196 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 8, 2024 5:58:06 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r105195 r105196 166 166 m_strDescription = tr("%1 status-bar indicator", "like 'hard-disk status-bar indicator'") 167 167 .arg(gpConverter->toString(type())); 168 169 /* Update appearance finally: */170 updateAppearance();171 168 } 172 169 … … 196 193 connect(m_pMachine, &UIMachine::sigMediumChange, 197 194 this, &UIIndicatorHardDrive::updateAppearance); 198 /* Translate finally: */199 sltRetranslateUI();195 /* Update & translate finally: */ 196 updateAppearance(); 200 197 } 201 198 … … 221 218 /* Update indicator state: */ 222 219 setState(m_cAttachmentsCount ? KDeviceActivity_Idle : KDeviceActivity_Null); 220 221 /* Retranslate finally: */ 222 sltRetranslateUI(); 223 223 } 224 224 … … 266 266 connect(m_pMachine, &UIMachine::sigMediumChange, 267 267 this, &UIIndicatorOpticalDisks::updateAppearance); 268 /* Translate finally: */269 sltRetranslateUI();268 /* Update & translate finally: */ 269 updateAppearance(); 270 270 } 271 271 … … 291 291 /* Update indicator state: */ 292 292 setState(m_cAttachmentsMountedCount ? KDeviceActivity_Idle : KDeviceActivity_Null); 293 294 /* Retranslate finally: */ 295 sltRetranslateUI(); 293 296 } 294 297 … … 339 342 connect(m_pMachine, &UIMachine::sigMediumChange, 340 343 this, &UIIndicatorFloppyDisks::updateAppearance); 341 /* Translate finally: */342 sltRetranslateUI();344 /* Update & translate finally: */ 345 updateAppearance(); 343 346 } 344 347 … … 364 367 /* Update indicator state: */ 365 368 setState(m_cAttachmentsMountedCount ? KDeviceActivity_Idle : KDeviceActivity_Null); 369 370 /* Retranslate finally: */ 371 sltRetranslateUI(); 366 372 } 367 373 … … 421 427 connect(m_pMachine, &UIMachine::sigAudioAdapterChange, 422 428 this, &UIIndicatorAudio::updateAppearance); 423 /* Translate finally: */424 sltRetranslateUI();429 /* Update & translate finally: */ 430 updateAppearance(); 425 431 } 426 432 … … 452 458 enmState = (AudioState)(enmState | AudioState_InputOn); 453 459 setState(enmState); 460 461 /* Retranslate finally: */ 462 sltRetranslateUI(); 454 463 } 455 464 … … 498 507 connect(m_pMachine, &UIMachine::sigNetworkAdapterChange, 499 508 this, &UIIndicatorNetwork::updateAppearance); 500 /* Translate finally: */501 sltRetranslateUI();509 /* Update & translate finally: */ 510 updateAppearance(); 502 511 } 503 512 … … 523 532 /* Update indicator state: */ 524 533 setState(m_fAdaptersPresent && !m_fCablesDisconnected ? KDeviceActivity_Idle : KDeviceActivity_Null); 534 535 /* Retranslate finally: */ 536 sltRetranslateUI(); 525 537 } 526 538 … … 569 581 connect(m_pMachine, &UIMachine::sigUSBDeviceStateChange, 570 582 this, &UIIndicatorUSB::updateAppearance); 571 /* Translate finally: */572 sltRetranslateUI();583 /* Update & translate finally: */ 584 updateAppearance(); 573 585 } 574 586 … … 593 605 /* Update indicator state: */ 594 606 setState(fUsbEnabled ? KDeviceActivity_Idle : KDeviceActivity_Null); 607 608 /* Retranslate finally: */ 609 sltRetranslateUI(); 595 610 } 596 611 }; … … 618 633 connect(m_pMachine, &UIMachine::sigSharedFolderChange, 619 634 this, &UIIndicatorSharedFolders::updateAppearance); 620 /* Translate finally: */621 sltRetranslateUI();635 /* Update & translate finally: */ 636 updateAppearance(); 622 637 } 623 638 … … 636 651 /* Update indicator state: */ 637 652 setState(fFoldersPresent ? KDeviceActivity_Idle : KDeviceActivity_Null); 653 654 /* Retranslate finally: */ 655 sltRetranslateUI(); 638 656 } 639 657 }; … … 666 684 connect(m_pMachine, &UIMachine::sigMachineStateChange, 667 685 this, &UIIndicatorDisplay::updateAppearance); 668 /* Translate finally: */669 sltRetranslateUI();686 /* Update & translate finally: */ 687 updateAppearance(); 670 688 } 671 689 … … 692 710 } 693 711 setState(enmState); 712 713 /* Retranslate finally: */ 714 sltRetranslateUI(); 694 715 } 695 716 }; … … 735 756 "rotationAngleStart", "rotationAngleFinal", 736 757 1000); 737 /* Translate finally: */738 sltRetranslateUI();758 /* Update & translate finally: */ 759 updateAppearance(); 739 760 } 740 761 … … 791 812 } 792 813 setState(enmState); 814 815 /* Retranslate finally: */ 816 sltRetranslateUI(); 793 817 } 794 818 … … 873 897 sltHandleMachineStateChange(); 874 898 } 875 /* Translate finally: */876 sltRetranslateUI();899 /* Update & translate finally: */ 900 updateAppearance(); 877 901 } 878 902 … … 935 959 /* Update indicator state: */ 936 960 setState(enmEngine); 961 962 /* Retranslate finally: */ 963 sltRetranslateUI(); 937 964 } 938 965 … … 989 1016 connect(m_pMachine, &UIMachine::sigMouseStateChange, 990 1017 this, static_cast<void(UIIndicatorMouse::*)(int)>(&UIIndicatorMouse::setState)); // us to blame .. 991 /* Translate finally: */992 sltRetranslateUI();1018 /* Update & translate finally: */ 1019 updateAppearance(); 993 1020 } 994 1021 … … 1024 1051 /* Update tool-tip: */ 1025 1052 setToolTip(strToolTip.arg(strFullData)); 1053 1054 /* Retranslate finally: */ 1055 sltRetranslateUI(); 1026 1056 } 1027 1057 … … 1068 1098 connect(m_pMachine, &UIMachine::sigKeyboardStateChange, 1069 1099 this, static_cast<void(UIIndicatorKeyboard::*)(int)>(&UIIndicatorKeyboard::setState)); // us to blame .. 1070 /* Translate finally: */1071 sltRetranslateUI();1100 /* Update & translate finally: */ 1101 updateAppearance(); 1072 1102 } 1073 1103 … … 1091 1121 /* Update tool-tip: */ 1092 1122 setToolTip(strToolTip.arg(strFullData)); 1123 1124 /* Retranslate finally: */ 1125 sltRetranslateUI(); 1093 1126 } 1094 1127 }; … … 1106 1139 /* Make sure host-combination label will be updated: */ 1107 1140 connect(gEDataManager, &UIExtraDataManager::sigRuntimeUIHostKeyCombinationChange, 1108 this, &UIIndicatorKeyboardExtension::sltUpdateAppearance); 1109 /* Translate finally: */ 1110 sltRetranslateUI(); 1141 this, &UIIndicatorKeyboardExtension::updateAppearance); 1111 1142 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 1112 1143 this, &UIIndicatorKeyboardExtension::sltRetranslateUI); 1113 } 1114 1115 public slots: 1144 /* Update & translate finally: */ 1145 updateAppearance(); 1146 } 1147 1148 protected slots: 1116 1149 1117 1150 /** Update routine. */ 1118 void sltUpdateAppearance() 1119 { 1151 void updateAppearance() 1152 { 1153 /* Update combination: */ 1120 1154 setText(UIHostCombo::toReadableString(gEDataManager->hostKeyCombination())); 1121 } 1122 1123 private slots: 1155 1156 /* Retranslate finally: */ 1157 sltRetranslateUI(); 1158 } 1124 1159 1125 1160 /** Retranslation routine. */ 1126 1161 void sltRetranslateUI() 1127 1162 { 1128 sltUpdateAppearance();1129 1163 setToolTip(QApplication::translate("UIMachineWindowNormal", 1130 1164 "Shows the currently assigned Host key.<br>"
Note:
See TracChangeset
for help on using the changeset viewer.