- Timestamp:
- Nov 21, 2008 3:25:20 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h
r14449 r14467 194 194 public slots: 195 195 196 void trayIconShow (bool aShow = false); 196 197 197 198 private slots: … … 219 220 220 221 QAction *mShowSelectorAction; 221 QAction *m ExitSelectorAction;222 QAction *mHideSystrayMenuAction; 222 223 QAction *mVmConfigAction; 223 224 QAction *mVmDeleteAction; -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
r14456 r14467 1611 1611 mShowSelectorAction->setIcon (VBoxGlobal::iconSet ( 1612 1612 ":/VirtualBox_16px.png")); 1613 m ExitSelectorAction = new QAction (this);1614 Assert (m ExitSelectorAction);1615 m ExitSelectorAction->setIcon (VBoxGlobal::iconSet (1613 mHideSystrayMenuAction = new QAction (this); 1614 Assert (mHideSystrayMenuAction); 1615 mHideSystrayMenuAction->setIcon (VBoxGlobal::iconSet ( 1616 1616 ":/exit_16px.png")); 1617 1617 … … 1674 1674 1675 1675 connect (mShowSelectorAction, SIGNAL (triggered()), mParent, SLOT (showWindow())); 1676 connect (m ExitSelectorAction, SIGNAL (triggered()), mParent, SLOT (fileExit()));1676 connect (mHideSystrayMenuAction, SIGNAL (triggered()), this, SLOT (trayIconShow())); 1677 1677 1678 1678 retranslateUi(); … … 1682 1682 { 1683 1683 hide(); 1684 } 1685 1686 void VBoxTrayIcon::retranslateUi () 1687 { 1688 if (!mActive) 1689 return; 1690 1691 QFont fontBold; 1692 fontBold.setBold (true); 1693 1694 mShowSelectorAction->setText (VBoxVMListView::tr ("Show Selector Window")); 1695 mShowSelectorAction->setStatusTip (VBoxVMListView::tr ("Shows the selector window assigned to this menu")); 1696 mShowSelectorAction->setFont(fontBold); 1697 1698 mHideSystrayMenuAction->setText (VBoxVMListView::tr ("Hide this menu")); 1699 mHideSystrayMenuAction->setStatusTip (VBoxVMListView::tr ("Removes this menu from the systray")); 1700 1701 mVmConfigAction->setText (VBoxVMListView::tr ("&Settings...")); 1702 mVmConfigAction->setStatusTip (VBoxVMListView::tr ("Configure the selected virtual machine")); 1703 1704 mVmDeleteAction->setText (VBoxVMListView::tr ("&Delete")); 1705 mVmDeleteAction->setStatusTip (VBoxVMListView::tr ("Delete the selected virtual machine")); 1706 1707 mVmPauseAction->setText (VBoxVMListView::tr ("&Pause")); 1708 mVmPauseAction->setStatusTip (VBoxVMListView::tr ("Suspend the execution of the virtual machine")); 1709 1710 mVmDiscardAction->setText (VBoxVMListView::tr ("D&iscard")); 1711 mVmDiscardAction->setStatusTip (VBoxVMListView::tr ("Discard the saved state of the selected virtual machine")); 1712 1713 mVmShowLogsAction->setText (VBoxVMListView::tr ("Show &Log...")); 1714 mVmShowLogsAction->setStatusTip (VBoxVMListView::tr ("Show the log files of the selected virtual machine")); 1684 1715 } 1685 1716 … … 1803 1834 } 1804 1835 1805 void VBoxTrayIcon::retranslateUi ()1806 {1807 if (!mActive)1808 return;1809 1810 QFont fontBold;1811 fontBold.setBold (true);1812 1813 mShowSelectorAction->setText (VBoxVMListView::tr ("Show Selector Window"));1814 mShowSelectorAction->setStatusTip (VBoxVMListView::tr ("Shows the selector window assigned to this menu"));1815 mShowSelectorAction->setFont(fontBold);1816 1817 mExitSelectorAction->setText (VBoxVMListView::tr ("Exit Selector Window"));1818 mExitSelectorAction->setStatusTip (VBoxVMListView::tr ("Exits the selector window assigned to this menu"));1819 1820 mVmConfigAction->setText (VBoxVMListView::tr ("&Settings..."));1821 mVmConfigAction->setStatusTip (VBoxVMListView::tr ("Configure the selected virtual machine"));1822 1823 mVmDeleteAction->setText (VBoxVMListView::tr ("&Delete"));1824 mVmDeleteAction->setStatusTip (VBoxVMListView::tr ("Delete the selected virtual machine"));1825 1826 mVmPauseAction->setText (VBoxVMListView::tr ("&Pause"));1827 mVmPauseAction->setStatusTip (VBoxVMListView::tr ("Suspend the execution of the virtual machine"));1828 1829 mVmDiscardAction->setText (VBoxVMListView::tr ("D&iscard"));1830 mVmDiscardAction->setStatusTip (VBoxVMListView::tr ("Discard the saved state of the selected virtual machine"));1831 1832 mVmShowLogsAction->setText (VBoxVMListView::tr ("Show &Log..."));1833 mVmShowLogsAction->setStatusTip (VBoxVMListView::tr ("Show the log files of the selected virtual machine"));1834 }1835 1836 1836 void VBoxTrayIcon::hideSubMenu () 1837 1837 { … … 1907 1907 mTrayIconMenu->addSeparator(); 1908 1908 1909 mTrayIconMenu->addAction (m ExitSelectorAction);1909 mTrayIconMenu->addAction (mHideSystrayMenuAction); 1910 1910 1911 1911 /* We're done constructing the menu, show it */ … … 1927 1927 } 1928 1928 1929 void VBoxTrayIcon::trayIconShow (bool aShow) 1930 { 1931 mActive = aShow; 1932 refresh(); 1933 setVisible (mActive); 1934 1935 VBoxGlobalSettings settings = vboxGlobal().settings(); 1936 settings.setTrayIconEnabled (mActive); 1937 settings.save (vboxGlobal().virtualBox()); 1938 } 1939 1929 1940 void VBoxTrayIcon::vmSettings() 1930 1941 {
Note:
See TracChangeset
for help on using the changeset viewer.