Changeset 14455 in vbox
- Timestamp:
- Nov 21, 2008 1:15:28 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 39725
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobalSettings.h
r10219 r14455 47 47 QString languageId; 48 48 QString maxGuestRes; 49 bool trayIconEnabled; 49 50 50 51 friend class VBoxGlobalSettings; … … 61 62 Q_PROPERTY (QString languageId READ languageId WRITE setLanguageId) 62 63 Q_PROPERTY (QString maxGuestRes READ maxGuestRes WRITE setMaxGuestRes) 64 Q_PROPERTY (bool trayIconEnabled READ trayIconEnabled WRITE setTrayIconEnabled) 63 65 64 66 public: … … 103 105 } 104 106 107 bool trayIconEnabled() const { return data()->trayIconEnabled; } 108 void setTrayIconEnabled (bool enabled) { 109 mData()->trayIconEnabled = enabled; 110 } 111 105 112 // 106 113 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobalSettings.cpp
r10219 r14455 60 60 languageId = QString::null; 61 61 maxGuestRes = "auto"; 62 trayIconEnabled = true; 62 63 } 63 64 … … 69 70 languageId = that.languageId; 70 71 maxGuestRes = that.maxGuestRes; 72 trayIconEnabled = that.trayIconEnabled; 71 73 } 72 74 … … 82 84 guiFeatures == that.guiFeatures && 83 85 languageId == that.languageId && 84 maxGuestRes == that.maxGuestRes); 86 maxGuestRes == that.maxGuestRes && 87 trayIconEnabled == that.trayIconEnabled); 85 88 } 86 89 … … 103 106 gPropertyMap[] = 104 107 { 105 { "GUI/Input/HostKey", "hostKey", "\\d*[1-9]\\d*", true }, 106 { "GUI/Input/AutoCapture", "autoCapture", "true|false", true }, 107 { "GUI/Customizations", "guiFeatures", "\\S+", true }, 108 { "GUI/LanguageID", "languageId", gVBoxLangIDRegExp, true }, 109 { "GUI/MaxGuestResolution", "maxGuestRes", "\\d*[1-9]\\d*,\\d*[1-9]\\d*|any|auto", true } 108 { "GUI/Input/HostKey", "hostKey", "\\d*[1-9]\\d*", true }, 109 { "GUI/Input/AutoCapture", "autoCapture", "true|false", true }, 110 { "GUI/Customizations", "guiFeatures", "\\S+", true }, 111 { "GUI/LanguageID", "languageId", gVBoxLangIDRegExp, true }, 112 { "GUI/MaxGuestResolution", "maxGuestRes", "\\d*[1-9]\\d*,\\d*[1-9]\\d*|any|auto", true }, 113 { "GUI/TrayIcon/Enabled", "trayIconEnabled", "true|false", true } 110 114 }; 111 115 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
r14449 r14455 1607 1607 mShowSelectorAction->setIcon (VBoxGlobal::iconSet ( 1608 1608 ":/VirtualBox_16px.png")); 1609 mShowSelectorAction->setText (VBoxVMListView::tr ("Show Selector Window"));1610 mShowSelectorAction->setStatusTip (VBoxVMListView::tr ("Shows the selector window assigned to this menu"));1611 1609 mExitSelectorAction = new QAction (this); 1612 1610 Assert (mExitSelectorAction); 1613 1611 mExitSelectorAction->setIcon (VBoxGlobal::iconSet ( 1614 1612 ":/exit_16px.png")); 1615 mExitSelectorAction->setText (VBoxVMListView::tr ("Exit Selector Window"));1616 mExitSelectorAction->setStatusTip (VBoxVMListView::tr ("Exits the selector window assigned to this menu"));1617 1613 1618 1614 mVmConfigAction = new QAction (this); … … 1671 1667 VBoxGlobalSettings settings = vboxGlobal().settings(); 1672 1668 mActive = QSystemTrayIcon::isSystemTrayAvailable() && 1673 !settings.isFeatureActive ("noSystrayMenu");1669 settings.trayIconEnabled(); 1674 1670 1675 1671 connect (mShowSelectorAction, SIGNAL (triggered()), mParent, SLOT (showWindow())); … … 1801 1797 pMenu->addAction (mVmStartAction); 1802 1798 pMenu->addAction (mVmPauseAction); 1803 pMenu->addAction (mVmDeleteAction);1804 1799 } 1805 1800 … … 1808 1803 if (!mActive) 1809 1804 return; 1805 1806 QFont fontBold; 1807 fontBold.setBold (true); 1808 1809 mShowSelectorAction->setText (VBoxVMListView::tr ("Show Selector Window")); 1810 mShowSelectorAction->setStatusTip (VBoxVMListView::tr ("Shows the selector window assigned to this menu")); 1811 mShowSelectorAction->setFont(fontBold); 1812 1813 mExitSelectorAction->setText (VBoxVMListView::tr ("Exit Selector Window")); 1814 mExitSelectorAction->setStatusTip (VBoxVMListView::tr ("Exits the selector window assigned to this menu")); 1810 1815 1811 1816 mVmConfigAction->setText (VBoxVMListView::tr ("&Settings...")); … … 1862 1867 1863 1868 mTrayIconMenu->addAction (mShowSelectorAction); 1869 1870 if (mVMModel->rowCount() > 0) 1871 mTrayIconMenu->addSeparator(); 1864 1872 1865 1873 for (int i = 0; i < mVMModel->rowCount(); i++, iCurItemCount++) … … 1892 1900 } 1893 1901 1902 if (mVMModel->rowCount() > 0) 1903 mTrayIconMenu->addSeparator(); 1904 1894 1905 mTrayIconMenu->addAction (mExitSelectorAction); 1895 1906
Note:
See TracChangeset
for help on using the changeset viewer.