diff --git a/src/frontends/qt2/Alert_pimpl.C b/src/frontends/qt2/Alert_pimpl.C index 2684883c4d..1b040722ce 100644 --- a/src/frontends/qt2/Alert_pimpl.C +++ b/src/frontends/qt2/Alert_pimpl.C @@ -10,6 +10,7 @@ #include +#include #include #include #include @@ -31,21 +32,30 @@ using std::make_pair; void alert_pimpl(string const & s1, string const & s2, string const & s3) { - QMessageBox::warning(0, "LyX", + QWidget * const parent = qApp->focusWidget() ? + qApp->focusWidget() : qApp->mainWidget(); + + QMessageBox::warning(parent, "LyX", toqstr(s1 + '\n' + '\n' + s2 + '\n' + s3)); } bool askQuestion_pimpl(string const & s1, string const & s2, string const & s3) { - return !(QMessageBox::information(0, "LyX", toqstr(s1 + '\n' + s2 + '\n' + s3), + QWidget * const parent = qApp->focusWidget() ? + qApp->focusWidget() : qApp->mainWidget(); + + return !(QMessageBox::information(parent, "LyX", toqstr(s1 + '\n' + s2 + '\n' + s3), qt_("&Yes"), qt_("&No"), 0, 1)); } int askConfirmation_pimpl(string const & s1, string const & s2, string const & s3) { - return (QMessageBox::information(0, "LyX", toqstr(s1 + '\n' + s2 + '\n' + s3), + QWidget * const parent = qApp->focusWidget() ? + qApp->focusWidget() : qApp->mainWidget(); + + return (QMessageBox::information(parent, "LyX", toqstr(s1 + '\n' + s2 + '\n' + s3), qt_("&Yes"), qt_("&No"), qt_("&Cancel"), 0, 2)) + 1; } diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 267af46755..66acdf90e0 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2006-01-09 Jürgen Spitzmüller + + * Alert_pimpl.C: Make alert dialogs modular, thus preventing that + they are hidden behind the main window (bug 1977). + 2006-01-08 Jürgen Spitzmüller * ui/QRefDialogBase.ui: re-connect the refsLB->Selected signal diff --git a/status.13x b/status.13x index a80d047ab5..6b69534bf9 100644 --- a/status.13x +++ b/status.13x @@ -79,6 +79,9 @@ What's new - Enable Instant Preview to work if the path to the external GhostScript executable contains spaces. (bug 2193). +- The error/warning/confirmation dialogs aren't hidden behind the main + window anymore [Qt only] (bug 1977). + * Configuration/Installation: - Enable TeXFiles.sh to run when its path contains spaces.