try to show dialogs or ask for user input while doing advanced find
and replace. In many of these cases we should simply find a way for
avoiding lyx to show a dialog, however an extra info/warning dialog
is better than the GUI freezing and having to kill the process.
+ /// Long operation in progress prevents user from Ok-ing the error dialog
+ bool long_op = theApp()->longOperationStarted();
+ if (long_op)
+ theApp()->stopLongOperation();
+
// Don't use a hourglass cursor while displaying the alert
qApp->setOverrideCursor(Qt::ArrowCursor);
// Don't use a hourglass cursor while displaying the alert
qApp->setOverrideCursor(Qt::ArrowCursor);
}
qApp->restoreOverrideCursor();
}
qApp->restoreOverrideCursor();
+
+ if (long_op)
+ theApp()->startLongOperation();
}
void warning(docstring const & title0, docstring const & message,
}
void warning(docstring const & title0, docstring const & message,
+ /// Long operation in progress prevents user from Ok-ing the error dialog
+ bool long_op = theApp()->longOperationStarted();
+ if (long_op)
+ theApp()->stopLongOperation();
+
// Don't use a hourglass cursor while displaying the alert
qApp->setOverrideCursor(Qt::ArrowCursor);
// Don't use a hourglass cursor while displaying the alert
qApp->setOverrideCursor(Qt::ArrowCursor);
toqstr(message));
qApp->restoreOverrideCursor();
toqstr(message));
qApp->restoreOverrideCursor();
+
+ if (long_op)
+ theApp()->startLongOperation();
}
void information(docstring const & title0, docstring const & message)
}
void information(docstring const & title0, docstring const & message)
docstring const title = bformat(_("LyX: %1$s"), msg);
docstring const title = bformat(_("LyX: %1$s"), msg);
+ /// Long operation in progress prevents user from Ok-ing the error dialog
+ bool long_op = theApp()->longOperationStarted();
+ if (long_op)
+ theApp()->stopLongOperation();
+
bool ok;
QString text = QInputDialog::getText(qApp->focusWidget(),
toqstr(title),
bool ok;
QString text = QInputDialog::getText(qApp->focusWidget(),
toqstr(title),
QLineEdit::Normal,
toqstr(dflt), &ok);
QLineEdit::Normal,
toqstr(dflt), &ok);
+ if (long_op)
+ theApp()->startLongOperation();
+
if (ok) {
response = qstring_to_ucs4(text);
return true;
if (ok) {
response = qstring_to_ucs4(text);
return true;