VirtualBox

Changeset 15664 in vbox


Ignore:
Timestamp:
Dec 18, 2008 2:46:02 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: Added option to enable/disable the real time VM preview in the dock
icon.

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDefs.h

    r15164 r15664  
    162162#ifdef Q_WS_MAC
    163163    static const char* GUI_RealtimeDockIconUpdateEnabled;
    164 #endif
     164#endif /* Q_WS_MAC */
    165165    static const char* GUI_PassCAD;
    166166};
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobalSettings.h

    r14455 r15664  
    4848    QString maxGuestRes;
    4949    bool trayIconEnabled;
     50    bool dockPreviewEnabled;
    5051
    5152    friend class VBoxGlobalSettings;
     
    6364    Q_PROPERTY (QString maxGuestRes READ maxGuestRes WRITE setMaxGuestRes)
    6465    Q_PROPERTY (bool trayIconEnabled READ trayIconEnabled WRITE setTrayIconEnabled)
     66    Q_PROPERTY (bool dockPreviewEnabled READ dockPreviewEnabled WRITE setDockPreviewEnabled)
    6567
    6668public:
     
    106108
    107109    bool trayIconEnabled() const { return data()->trayIconEnabled; }
    108     void setTrayIconEnabled (bool enabled) {
     110    void setTrayIconEnabled (bool enabled)
     111    {
    109112        mData()->trayIconEnabled = enabled;
    110113    }
     114
     115    bool dockPreviewEnabled() const { return data()->dockPreviewEnabled; }
     116    void setDockPreviewEnabled (bool enabled)
     117    {
     118        mData()->dockPreviewEnabled = enabled;
     119    }
     120
    111121
    112122    //
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDefs.cpp

    r15164 r15664  
    5151#ifdef Q_WS_MAC
    5252const char* VBoxDefs::GUI_RealtimeDockIconUpdateEnabled = "GUI/RealtimeDockIconUpdateEnabled";
    53 #endif
     53#endif /* Q_WS_MAC */
    5454const char* VBoxDefs::GUI_PassCAD = "GUI/PassCAD";
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGLSettingsGeneral.cpp

    r15098 r15664  
    3333#ifndef VBOX_GUI_WITH_SYSTRAY
    3434    mCbCheckTrayIcon->hide();
    35 #endif
     35#endif /* VBOX_GUI_WITH_SYSTRAY */
     36#ifndef Q_WS_MAC
     37    mCbCheckDockPreview->hide();
     38#endif /* Q_WS_MAC */
    3639
    3740    mPsHardDisk->setHomeDir (vboxGlobal().virtualBox().GetHomeFolder());
     
    5154    mPsVRDP->setPath (aProps.GetRemoteDisplayAuthLibrary());
    5255    mCbCheckTrayIcon->setChecked (aGs.trayIconEnabled());
     56#ifdef Q_WS_MAC
     57    mCbCheckDockPreview->setChecked (aGs.dockPreviewEnabled());
     58#endif /* Q_WS_MAC */
    5359}
    5460
     
    6369        aProps.SetRemoteDisplayAuthLibrary (mPsVRDP->path());
    6470    aGs.setTrayIconEnabled (mCbCheckTrayIcon->isChecked());
     71#ifdef Q_WS_MAC
     72    aGs.setDockPreviewEnabled (mCbCheckDockPreview->isChecked());
     73#endif /* Q_WS_MAC */
    6574}
    6675
     
    7180    setTabOrder (mPsMach, mPsVRDP);
    7281    setTabOrder (mPsVRDP, mCbCheckTrayIcon);
     82#ifdef Q_WS_MAC
     83    setTabOrder (mCbCheckTrayIcon, mCbCheckDockPreview);
     84#endif /* Q_WS_MAC */
    7385}
    7486
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobalSettings.cpp

    r14908 r15664  
    6161    maxGuestRes = "auto";
    6262    trayIconEnabled = false;
     63    dockPreviewEnabled = true;
    6364}
    6465
     
    7172    maxGuestRes = that.maxGuestRes;
    7273    trayIconEnabled = that.trayIconEnabled;
     74    dockPreviewEnabled = that.dockPreviewEnabled;
    7375}
    7476
     
    8587         languageId  == that.languageId &&
    8688         maxGuestRes == that.maxGuestRes &&
    87          trayIconEnabled == that.trayIconEnabled);
     89         trayIconEnabled == that.trayIconEnabled
     90         && dockPreviewEnabled == that.dockPreviewEnabled
     91        );
    8892}
    8993
     
    106110gPropertyMap[] =
    107111{
    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 }
     112    { "GUI/Input/HostKey",                         "hostKey",            "\\d*[1-9]\\d*", true },
     113    { "GUI/Input/AutoCapture",                     "autoCapture",        "true|false", true },
     114    { "GUI/Customizations",                        "guiFeatures",        "\\S+", true },
     115    { "GUI/LanguageID",                            "languageId",         gVBoxLangIDRegExp, true },
     116    { "GUI/MaxGuestResolution",                    "maxGuestRes",        "\\d*[1-9]\\d*,\\d*[1-9]\\d*|any|auto", true },
     117    { "GUI/TrayIcon/Enabled",                      "trayIconEnabled",    "true|false", true },
     118#ifdef Q_WS_MAC
     119    { VBoxDefs::GUI_RealtimeDockIconUpdateEnabled, "dockPreviewEnabled", "true|false", true }
     120#endif /* Q_WS_MAC */
    114121};
    115122
  • trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxGLSettingsGeneral.ui

    r14479 r15664  
    136136    </widget>
    137137   </item>
    138    <item row="6" column="0" colspan="3" >
     138   <item row="6" column="1" colspan="2" >
     139    <widget class="QCheckBox" name="mCbCheckDockPreview" >
     140     <property name="whatsThis" >
     141      <string>When checked, the Dock Icon will reflect the VM window content in realtime.</string>
     142     </property>
     143     <property name="text" >
     144      <string>&amp;Dock Icon Realtime Preview</string>
     145     </property>
     146     <property name="checked" >
     147      <bool>true</bool>
     148     </property>
     149    </widget>
     150   </item>
     151   <item row="7" column="0" colspan="3" >
    139152    <spacer>
    140153     <property name="orientation" >
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette