|
a/src/qtgui/rclmain_w.cpp |
|
b/src/qtgui/rclmain_w.cpp |
|
... |
|
... |
943 |
* @param mod keyboards modifiers like ControlButton, ShiftButton
|
943 |
* @param mod keyboards modifiers like ControlButton, ShiftButton
|
944 |
*/
|
944 |
*/
|
945 |
void RclMain::startPreview(int docnum, Rcl::Doc doc, int mod)
|
945 |
void RclMain::startPreview(int docnum, Rcl::Doc doc, int mod)
|
946 |
{
|
946 |
{
|
947 |
LOGDEB(("startPreview(%d, doc, %d)\n", docnum, mod));
|
947 |
LOGDEB(("startPreview(%d, doc, %d)\n", docnum, mod));
|
|
|
948 |
|
|
|
949 |
// Document up to date check. We do this only if ipath is not
|
|
|
950 |
// empty as this does not appear to be a serious issue for single
|
|
|
951 |
// docs (the main actual problem is displaying the wrong message
|
|
|
952 |
// from a compacted mail folder)
|
|
|
953 |
if (!doc.ipath.empty()) {
|
|
|
954 |
string udi, sig;
|
|
|
955 |
doc.getmeta(Rcl::Doc::keyudi, &udi);
|
|
|
956 |
FileInterner::makesig(doc, sig);
|
|
|
957 |
if (rcldb && !udi.empty()) {
|
|
|
958 |
if (rcldb->needUpdate(udi, sig)) {
|
|
|
959 |
fprintf(stderr, "AFTER UPDATE CHECK-1\n");
|
|
|
960 |
QMessageBox::warning(0, tr("Warning"),
|
|
|
961 |
tr("Index not up to date for this file. "
|
|
|
962 |
"Refusing to risk showing the wrong "
|
|
|
963 |
"data. Please run indexing"),
|
|
|
964 |
QMessageBox::Ok,
|
|
|
965 |
QMessageBox::NoButton);
|
|
|
966 |
return;
|
|
|
967 |
}
|
|
|
968 |
}
|
|
|
969 |
}
|
|
|
970 |
|
948 |
if (mod & Qt::ShiftModifier) {
|
971 |
if (mod & Qt::ShiftModifier) {
|
949 |
// User wants new preview window
|
972 |
// User wants new preview window
|
950 |
curPreview = 0;
|
973 |
curPreview = 0;
|
951 |
}
|
974 |
}
|
952 |
if (curPreview == 0) {
|
975 |
if (curPreview == 0) {
|