Changeset 94294 in vbox
- Timestamp:
- Mar 17, 2022 1:44:25 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp
r94089 r94294 2752 2752 }; 2753 2753 2754 /** Simple action extension, used as 'Perform Clear' action class. */ 2755 class UIActionMenuManagerMediumPerformClear : public UIActionSimple 2756 { 2757 Q_OBJECT; 2758 2759 public: 2760 2761 /** Constructs action passing @a pParent to the base-class. */ 2762 UIActionMenuManagerMediumPerformClear(UIActionPool *pParent) 2763 : UIActionSimple(pParent) 2764 { 2765 setShortcutContext(Qt::WidgetWithChildrenShortcut); 2766 setIcon(0, UIIconPool::iconSetFull(":/hd_remove_32px.png", ":/hd_remove_16px.png", 2767 ":/hd_remove_disabled_32px.png", ":/hd_remove_disabled_16px.png")); 2768 setIcon(1, UIIconPool::iconSetFull(":/cd_remove_32px.png", ":/cd_remove_16px.png", 2769 ":/cd_remove_disabled_32px.png", ":/cd_remove_disabled_16px.png")); 2770 setIcon(2, UIIconPool::iconSetFull(":/fd_remove_32px.png", ":/fd_remove_16px.png", 2771 ":/fd_remove_disabled_32px.png", ":/fd_remove_disabled_16px.png")); 2772 } 2773 2774 protected: 2775 2776 /** Returns shortcut extra-data ID. */ 2777 virtual QString shortcutExtraDataID() const RT_OVERRIDE 2778 { 2779 return QString("Clear"); 2780 } 2781 2782 /** Returns default shortcut. */ 2783 virtual QKeySequence defaultShortcut(UIActionPoolType) const RT_OVERRIDE 2784 { 2785 return QKeySequence(); 2786 } 2787 2788 /** Handles translation event. */ 2789 virtual void retranslateUi() RT_OVERRIDE 2790 { 2791 setName(QApplication::translate("UIActionPool", "&Clear")); 2792 setShortcutScope(QApplication::translate("UIActionPool", "Media Manager")); 2793 setStatusTip(QApplication::translate("UIActionPool", "remove all inaccessible media")); 2794 setToolTip( QApplication::translate("UIActionPool", "Remove All Inaccessible Media") 2795 + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString()))); 2796 } 2797 }; 2754 2798 2755 2799 /** Menu action extension, used as 'Network' menu class. */ … … 3690 3734 m_pool[UIActionIndexMN_M_Medium_T_Search] = new UIActionMenuManagerMediumToggleSearch(this); 3691 3735 m_pool[UIActionIndexMN_M_Medium_S_Refresh] = new UIActionMenuManagerMediumPerformRefresh(this); 3736 m_pool[UIActionIndexMN_M_Medium_S_Clear] = new UIActionMenuManagerMediumPerformClear(this); 3692 3737 3693 3738 /* Network Manager actions: */ … … 4376 4421 /* 'Release' action: */ 4377 4422 fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_S_Release)) || fSeparator; 4423 /* 'Clean' action: */ 4424 fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_S_Clear)) || fSeparator; 4378 4425 /* 'Search' action: */ 4379 4426 fSeparator = addAction(pMenu, action(UIActionIndexMN_M_Medium_T_Search)) || fSeparator; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.h
r94089 r94294 165 165 UIActionIndexMN_M_Medium_T_Search, 166 166 UIActionIndexMN_M_Medium_S_Refresh, 167 UIActionIndexMN_M_Medium_S_Clear, 167 168 168 169 /* Network Manager actions: */ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r93868 r94294 525 525 } 526 526 527 void UIMediumManagerWidget::sltClear() 528 { 529 } 530 527 531 void UIMediumManagerWidget::sltToggleMediumDetailsVisibility(bool fVisible) 528 532 { … … 754 758 addAction(m_pActionPool->action(UIActionIndexMN_M_Medium_S_Remove)); 755 759 addAction(m_pActionPool->action(UIActionIndexMN_M_Medium_S_Release)); 760 addAction(m_pActionPool->action(UIActionIndexMN_M_Medium_S_Clear)); 756 761 addAction(m_pActionPool->action(UIActionIndexMN_M_Medium_T_Search)); 757 762 addAction(m_pActionPool->action(UIActionIndexMN_M_Medium_T_Details)); … … 771 776 connect(m_pActionPool->action(UIActionIndexMN_M_Medium_S_Release), &QAction::triggered, 772 777 this, &UIMediumManagerWidget::sltReleaseMedium); 778 connect(m_pActionPool->action(UIActionIndexMN_M_Medium_S_Clear), &QAction::triggered, 779 this, &UIMediumManagerWidget::sltClear); 773 780 connect(m_pActionPool->action(UIActionIndexMN_M_Medium_T_Details), &QAction::toggled, 774 781 this, &UIMediumManagerWidget::sltToggleMediumDetailsVisibility); … … 827 834 m_pToolBar->addAction(m_pActionPool->action(UIActionIndexMN_M_Medium_S_Remove)); 828 835 m_pToolBar->addAction(m_pActionPool->action(UIActionIndexMN_M_Medium_S_Release)); 836 m_pToolBar->addAction(m_pActionPool->action(UIActionIndexMN_M_Medium_S_Clear)); 829 837 m_pToolBar->addAction(m_pActionPool->action(UIActionIndexMN_M_Medium_T_Search)); 830 838 m_pToolBar->addAction(m_pActionPool->action(UIActionIndexMN_M_Medium_T_Details)); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.h
r93990 r94294 179 179 /** Handles command to release medium. */ 180 180 void sltReleaseMedium(); 181 /** Removes all inaccessible media. */ 182 void sltClear(); 181 183 /** Handles command to make medium details @a fVisible. */ 182 184 void sltToggleMediumDetailsVisibility(bool fVisible);
Note:
See TracChangeset
for help on using the changeset viewer.