VirtualBox

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


Ignore:
Timestamp:
Apr 5, 2013 9:49:21 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
84780
Message:

FE/Qt: Message-center: More transparent multiple choices handling.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp

    r45337 r45362  
    306306    switch (iButton & AlertButtonMask)
    307307    {
    308         case AlertButton_Ok:     strText = tr("OK");     role = QDialogButtonBox::AcceptRole; break;
    309         case AlertButton_Cancel: strText = tr("Cancel"); role = QDialogButtonBox::RejectRole; break;
    310         case AlertButton_Yes:    strText = tr("Yes");    role = QDialogButtonBox::YesRole; break;
    311         case AlertButton_No:     strText = tr("No");     role = QDialogButtonBox::NoRole; break;
    312         case AlertButton_Ignore: strText = tr("Ignore"); role = QDialogButtonBox::AcceptRole; break;
    313         case AlertButton_Copy:   strText = tr("Copy");   role = QDialogButtonBox::ActionRole; break;
     308        case AlertButton_Ok:      strText = tr("OK");     role = QDialogButtonBox::AcceptRole; break;
     309        case AlertButton_Cancel:  strText = tr("Cancel"); role = QDialogButtonBox::RejectRole; break;
     310        case AlertButton_Choice1: strText = tr("Yes");    role = QDialogButtonBox::YesRole; break;
     311        case AlertButton_Choice2: strText = tr("No");     role = QDialogButtonBox::NoRole; break;
     312        case AlertButton_Copy:    strText = tr("Copy");   role = QDialogButtonBox::ActionRole; break;
    314313        default:
    315314            AssertMsgFailed(("Type %d is not supported!", iButton));
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h

    r45308 r45362  
    4343    AlertButton_Ok            =  0x1,  /* 00000000 00000001 */
    4444    AlertButton_Cancel        =  0x2,  /* 00000000 00000010 */
    45     AlertButton_Yes           =  0x4,  /* 00000000 00000100 */
    46     AlertButton_No            =  0x8,  /* 00000000 00001000 */
    47     AlertButton_Ignore        = 0x10,  /* 00000000 00010000 */
    48     AlertButton_Copy          = 0x20,  /* 00000000 00100000 */
     45    AlertButton_Choice1       =  0x4,  /* 00000000 00000100 */
     46    AlertButton_Choice2       =  0x8,  /* 00000000 00001000 */
     47    AlertButton_Copy          = 0x10,  /* 00000000 00010000 */
    4948    AlertButtonMask           = 0xFF   /* 00000000 11111111 */
    5049};
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r45359 r45362  
    579579           message(mainWindowShown(), MessageType_Question,
    580580                   strText, 0 /* auto-confirm id */,
    581                    AlertButton_Yes,
    582                    AlertButton_No | AlertButtonOption_Default,
     581                   AlertButton_Choice1,
     582                   AlertButton_Choice2 | AlertButtonOption_Default,
    583583                   AlertButton_Cancel | AlertButtonOption_Escape,
    584584                   tr("Delete all files"),
     
    618618                              "ignore this message.</p>"),
    619619                           "warnAboutInaccessibleMedia",
    620                            tr("Check", "inaccessible media message box"), tr("Cancel"), false);
     620                           tr("Ignore"), tr("Check", "inaccessible media message box"));
    621621}
    622622
     
    968968                      .arg(strControllerName),
    969969                   0 /* auto-confirm id */,
    970                    AlertButton_Yes,
    971                    AlertButton_No,
    972                    AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape,
     970                   AlertButton_Choice1,
     971                   AlertButton_Choice2 | AlertButtonOption_Default,
     972                   AlertButton_Cancel | AlertButtonOption_Escape,
    973973                   tr("Create &new disk", "add attachment routine"),
    974974                   tr("&Choose existing disk", "add attachment routine"));
     
    983983                      .arg(strControllerName),
    984984                   0 /* auto-confirm id */,
    985                    AlertButton_Yes,
    986                    AlertButton_No,
    987                    AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape,
     985                   AlertButton_Choice1 | AlertButtonOption_Default,
     986                   AlertButton_Choice2,
     987                   AlertButton_Cancel | AlertButtonOption_Escape,
    988988                   tr("&Choose disk", "add attachment routine"),
    989989                   tr("Leave &empty", "add attachment routine"));
     
    998998                      .arg(strControllerName),
    999999                   0 /* auto-confirm id */,
    1000                    AlertButton_Yes,
    1001                    AlertButton_No,
    1002                    AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape,
     1000                   AlertButton_Choice1 | AlertButtonOption_Default,
     1001                   AlertButton_Choice2,
     1002                   AlertButton_Cancel | AlertButtonOption_Escape,
    10031003                   tr("&Choose disk", "add attachment routine"),
    10041004                   tr("Leave &empty", "add attachment routine"));
     
    12251225                      .arg(strLocation),
    12261226                   0 /* auto-confirm id */,
    1227                    AlertButton_Yes,
    1228                    AlertButton_No | AlertButtonOption_Default,
     1227                   AlertButton_Choice1,
     1228                   AlertButton_Choice2 | AlertButtonOption_Default,
    12291229                   AlertButton_Cancel | AlertButtonOption_Escape,
    12301230                   tr("Delete", "hard disk storage"),
     
    17041704                              .arg(strLogFolder),
    17051705                           0 /* auto-confirm id */,
    1706                            QIMessageBox::tr("Ok"),
    1707                            QIMessageBox::tr("Ignore"));
     1706                           QIMessageBox::tr("OK"),
     1707                           tr("Ignore"));
    17081708}
    17091709
     
    19281928                              .arg(VBoxGlobal::formatSize(uMinVRAM)),
    19291929                           0 /* auto-confirm id */,
    1930                            QIMessageBox::tr("Ignore"));
     1930                           tr("Ignore"));
    19311931}
    19321932
     
    19491949                              .arg(VBoxGlobal::formatSize(uMinVRAM)),
    19501950                           0 /* auto-confirm id */,
    1951                            QIMessageBox::tr("Ignore"));
     1951                           tr("Ignore"));
    19521952}
    19531953
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r45315 r45362  
    11611161                if (rc == AlertButton_Cancel)
    11621162                    return;
    1163                 deleteStorage = rc == AlertButton_Yes;
     1163                deleteStorage = rc == AlertButton_Choice1;
    11641164            }
    11651165
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r45358 r45362  
    192192
    193193    /* Warn the user about inaccessible medium: */
    194     if (it != list.end() && msgCenter().warnAboutInaccessibleMedia())
     194    if (it != list.end() && !msgCenter().warnAboutInaccessibleMedia())
    195195    {
    196196        /* Open the MM window (without refresh): */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp

    r45313 r45362  
    14661466        /* Get iterated machine: */
    14671467        CMachine &machine = machines[iMachineIndex];
    1468         if (iResultCode == AlertButton_Yes)
     1468        if (iResultCode == AlertButton_Choice1)
    14691469        {
    14701470            /* Unregister machine first: */
     
    14901490            }
    14911491        }
    1492         else
     1492        else if (iResultCode == AlertButton_Choice2)
    14931493        {
    14941494            /* Just unregister machine: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r45358 r45362  
    30463046        {
    30473047            int iAnswer = msgCenter().confirmHardDiskAttachmentCreation(strControllerName, this);
    3048             if (iAnswer == AlertButton_Yes)
     3048            if (iAnswer == AlertButton_Choice1)
    30493049                strMediumId = getWithNewHDWizard();
    3050             else if (iAnswer == AlertButton_No)
     3050            else if (iAnswer == AlertButton_Choice2)
    30513051                strMediumId = vboxGlobal().openMediumWithFileOpenDialog(UIMediumType_HardDisk, this, strMachineFolder);
    30523052            break;
     
    30553055        {
    30563056            int iAnswer = msgCenter().confirmOpticalAttachmentCreation(strControllerName, this);
    3057             if (iAnswer == AlertButton_Yes)
     3057            if (iAnswer == AlertButton_Choice1)
    30583058                strMediumId = vboxGlobal().openMediumWithFileOpenDialog(UIMediumType_DVD, this, strMachineFolder);
    3059             else if (iAnswer == AlertButton_No)
     3059            else if (iAnswer == AlertButton_Choice2)
    30603060                strMediumId = vboxGlobal().findMedium(strMediumId).id();
    30613061            break;
     
    30643064        {
    30653065            int iAnswer = msgCenter().confirmFloppyAttachmentCreation(strControllerName, this);
    3066             if (iAnswer == AlertButton_Yes)
     3066            if (iAnswer == AlertButton_Choice1)
    30673067                strMediumId = vboxGlobal().openMediumWithFileOpenDialog(UIMediumType_Floppy, this, strMachineFolder);
    3068             else if (iAnswer == AlertButton_No)
     3068            else if (iAnswer == AlertButton_Choice2)
    30693069                strMediumId = vboxGlobal().findMedium(strMediumId).id();
    30703070            break;
Note: See TracChangeset for help on using the changeset viewer.

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