mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 02:28:19 +00:00
Make alert dialogs modular, thus preventing that they are hidden behind the main window (bug 1977)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@10717 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a0a923307c
commit
c920d104ab
@ -10,6 +10,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qlineedit.h>
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-01-09 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* 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 <j.spitzmueller@gmx.de>
|
||||
|
||||
* ui/QRefDialogBase.ui: re-connect the refsLB->Selected signal
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user