VirtualBox

Changeset 51199 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
May 6, 2014 4:06:13 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: 6660: Advanced extra-data management framework: Integrate GUI_SuppressMessages.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r51198 r51199  
    203203}
    204204
    205 void UIExtraDataManager::setRecentListOfHardDrives(const QStringList &strValue)
    206 {
    207     setExtraDataStringList(GUI_RecentListHD, strValue);
    208 }
    209 
    210 void UIExtraDataManager::setRecentListOfOpticalDisks(const QStringList &strValue)
    211 {
    212     setExtraDataStringList(GUI_RecentListCD, strValue);
    213 }
    214 
    215 void UIExtraDataManager::setRecentListOfFloppyDisks(const QStringList &strValue)
    216 {
    217     setExtraDataStringList(GUI_RecentListFD, strValue);
     205void UIExtraDataManager::setRecentListOfHardDrives(const QStringList &value)
     206{
     207    setExtraDataStringList(GUI_RecentListHD, value);
     208}
     209
     210void UIExtraDataManager::setRecentListOfOpticalDisks(const QStringList &value)
     211{
     212    setExtraDataStringList(GUI_RecentListCD, value);
     213}
     214
     215void UIExtraDataManager::setRecentListOfFloppyDisks(const QStringList &value)
     216{
     217    setExtraDataStringList(GUI_RecentListFD, value);
     218}
     219
     220QStringList UIExtraDataManager::suppressedMessages() const
     221{
     222    return extraDataStringList(GUI_SuppressMessages);
     223}
     224
     225void UIExtraDataManager::setSuppressedMessages(const QStringList &value)
     226{
     227    setExtraDataStringList(GUI_SuppressMessages, value);
    218228}
    219229
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r51198 r51199  
    9595    /** Returns recent floppy-disk list. */
    9696    QStringList recentListOfFloppyDisks() const;
    97     /** Defines recent hard-drive list as @a strValue. */
    98     void setRecentListOfHardDrives(const QStringList &strValue);
    99     /** Defines recent optical-disk list as @a strValue. */
    100     void setRecentListOfOpticalDisks(const QStringList &strValue);
    101     /** Defines recent floppy-disk list as @a strValue. */
    102     void setRecentListOfFloppyDisks(const QStringList &strValue);
     97    /** Defines recent hard-drive list as @a value. */
     98    void setRecentListOfHardDrives(const QStringList &value);
     99    /** Defines recent optical-disk list as @a value. */
     100    void setRecentListOfOpticalDisks(const QStringList &value);
     101    /** Defines recent floppy-disk list as @a value. */
     102    void setRecentListOfFloppyDisks(const QStringList &value);
     103
     104    /** Returns list of the supressed messages for the Message/Popup center frameworks. */
     105    QStringList suppressedMessages() const;
     106    /** Defines list of the supressed messages for the Message/Popup center frameworks as @a value. */
     107    void setSuppressedMessages(const QStringList &value);
    103108
    104109#ifdef VBOX_GUI_WITH_NETWORK_MANAGER
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r50719 r51199  
    4040#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
    4141#include "UIModalWindowManager.h"
     42#include "UIExtraDataManager.h"
    4243#include "UIMedium.h"
    4344#ifdef VBOX_OSE
     
    25262527void UIMessageCenter::sltResetSuppressedMessages()
    25272528{
    2528     CVirtualBox vbox = vboxGlobal().virtualBox();
    2529     vbox.SetExtraData(GUI_SuppressMessages, QString());
     2529    /* Nullify suppressed message list: */
     2530    gEDataManager->setSuppressedMessages(QStringList());
    25302531}
    25312532
     
    27132714    {
    27142715        vbox = vboxGlobal().virtualBox();
    2715         confirmedMessageList = vbox.GetExtraData(GUI_SuppressMessages).split(',');
     2716        confirmedMessageList = gEDataManager->suppressedMessages();
    27162717        if (   confirmedMessageList.contains(strAutoConfirmId)
    27172718            || confirmedMessageList.contains("allMessageBoxes")
     
    28002801        {
    28012802            confirmedMessageList << strAutoConfirmId;
    2802             vbox.SetExtraData(GUI_SuppressMessages, confirmedMessageList.join(","));
     2803            gEDataManager->setSuppressedMessages(confirmedMessageList);
    28032804        }
    28042805    }
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp

    r50138 r51199  
    2525#include "VBoxGlobal.h"
    2626#include "UIHostComboEditor.h"
     27#include "UIExtraDataManager.h"
    2728
    2829/* Other VBox includes: */
     
    246247    if ((iButton1 || iButton2) && fProposeAutoConfirmation)
    247248    {
    248         QStringList confirmedPopupList = vboxGlobal().virtualBox().GetExtraData(GUI_SuppressMessages).split(',');
     249        const QStringList confirmedPopupList = gEDataManager->suppressedMessages();
    249250        if (   confirmedPopupList.contains(strPopupPaneID)
    250251            || confirmedPopupList.contains("allPopupPanes")
     
    326327void UIPopupCenter::sltPopupPaneDone(QString strPopupPaneID, int iResultCode)
    327328{
    328     /* Was the result auto-confirmated? */
     329    /* Remember auto-confirmation fact (if necessary): */
    329330    if (iResultCode & AlertOption_AutoConfirmed)
    330     {
    331         /* Remember auto-confirmation fact: */
    332         QStringList confirmedPopupList = vboxGlobal().virtualBox().GetExtraData(GUI_SuppressMessages).split(',');
    333         confirmedPopupList << strPopupPaneID;
    334         vboxGlobal().virtualBox().SetExtraData(GUI_SuppressMessages, confirmedPopupList.join(","));
    335     }
     331        gEDataManager->setSuppressedMessages(gEDataManager->suppressedMessages() << strPopupPaneID);
    336332
    337333    /* Notify listeners: */
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