Changeset 5804 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Nov 20, 2007 4:59:20 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r5803 r5804 254 254 const QString &aResult); 255 255 256 bool confirmInputCapture ();256 bool confirmInputCapture (bool *aAutoConfirmed = NULL); 257 257 void remindAboutAutoCapture(); 258 258 void remindAboutMouseIntegration (bool aSupportsAbsolute); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r5803 r5804 1961 1961 // captureMouse (true); 1962 1962 } 1963 1964 /* reset the single-time disable capture flag */ 1965 if (mDisableAutoCapture) 1966 mDisableAutoCapture = false; 1963 1967 } 1964 1968 else … … 2231 2235 * dialog result itself */ 2232 2236 mDisableAutoCapture = true; 2233 ok = vboxProblem().confirmInputCapture(); 2234 mDisableAutoCapture = false; 2237 bool autoConfirmed = false; 2238 ok = vboxProblem().confirmInputCapture (&autoConfirmed); 2239 if (autoConfirmed) 2240 mDisableAutoCapture = false; 2241 /* otherwise, the disable flag will be reset in 2242 * the next console view's foucs in event (since 2243 * may happen asynchronously on some platforms, 2244 * after we return from this code) */ 2235 2245 } 2246 2236 2247 if (ok) 2237 2248 { … … 2572 2583 * dialog result itself */ 2573 2584 mDisableAutoCapture = true; 2574 bool ok = vboxProblem().confirmInputCapture(); 2575 mDisableAutoCapture = false; 2585 bool autoConfirmed = false; 2586 bool ok = vboxProblem().confirmInputCapture (&autoConfirmed); 2587 if (autoConfirmed) 2588 mDisableAutoCapture = false; 2589 /* otherwise, the disable flag will be reset in 2590 * the next console view's foucs in event (since 2591 * may happen asynchronously on some platforms, 2592 * after we return from this code) */ 2593 2576 2594 if (ok) 2577 2595 { -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r5803 r5804 1447 1447 /** 1448 1448 * @return @c true if the user has confirmed input capture (this is always 1449 * the case if the dialog was autoconfirmed). 1449 * the case if the dialog was autoconfirmed). @a aAutoConfirmed, when not 1450 * NULL, will receive @c true if the dialog wasn't actually shown. 1450 1451 */ 1451 bool VBoxProblemReporter::confirmInputCapture ()1452 { 1453 return messageOkCancel(&vboxGlobal().consoleWnd(), Info,1452 bool VBoxProblemReporter::confirmInputCapture (bool *aAutoConfirmed /* = NULL */) 1453 { 1454 int rc = message (&vboxGlobal().consoleWnd(), Info, 1454 1455 tr ("<p>You have <b>clicked the mouse</b> inside the Virtual Machine display " 1455 1456 "or pressed the <b>host key</b>. This will cause the Virtual Machine to " … … 1471 1472 .arg (QIHotKeyEdit::keyName (vboxGlobal().settings().hostKey())), 1472 1473 "confirmInputCapture", 1474 QIMessageBox::Ok | QIMessageBox::Default, 1475 QIMessageBox::Cancel | QIMessageBox::Escape, 1476 0, 1473 1477 tr ("Capture", "do input capture")); 1478 1479 if (aAutoConfirmed) 1480 *aAutoConfirmed = (rc & AutoConfirmed); 1481 1482 return (rc & QIMessageBox::ButtonMask) == QIMessageBox::Ok; 1474 1483 } 1475 1484 … … 1575 1584 bool VBoxProblemReporter::remindAboutInaccessibleMedia() 1576 1585 { 1577 int rc = message ( 1578 &vboxGlobal().selectorWnd(), 1579 Warning, 1586 int rc = message (&vboxGlobal().selectorWnd(), Warning, 1580 1587 tr ("<p>One or more of the registered virtual hard disks, CD/DVD or " 1581 1588 "floppy media are not currently accessible. As a result, you will " 1582 1589 "not be able to operate virtual machines that use these media until " 1583 1590 "they become accessible later.</p>" 1584 "<p>Press <b> OK</b> to open the Virtual Disk Manager window and "1591 "<p>Press <b>Check</b> to open the Virtual Disk Manager window and " 1585 1592 "see what media are inaccessible, or press <b>Ignore</b> to " 1586 1593 "ignore this message.</p>"), 1587 1594 "remindAboutInaccessibleMedia", 1588 1595 QIMessageBox::Ok | QIMessageBox::Default, 1589 QIMessageBox::Ignore | QIMessageBox::Escape 1590 ); 1591 1592 return rc == QIMessageBox::Ok && !(rc & AutoConfirmed); 1596 QIMessageBox::Ignore | QIMessageBox::Escape, 1597 0, 1598 tr ("Check", "inaccessible media message box")); 1599 1600 return rc == QIMessageBox::Ok; /* implies !AutoConfirmed */ 1593 1601 } 1594 1602
Note:
See TracChangeset
for help on using the changeset viewer.