Commits

medoc committed 0b656cb

let the user override the message about mbox index not up to date

Comments (0)

Files changed (1)

src/qtgui/rclmain_w.cpp

 	    if (rcldb->needUpdate(udi, sig)) {
 		QString msg = 
 		    tr("Index not up to date for this file. "
-		       "Refusing to risk showing the wrong entry.");
-		if (m_indexerState == IXST_NOTRUNNING) {
+		       "Refusing to risk showing the wrong entry. ");
+		bool ixnotact = (m_indexerState == IXST_NOTRUNNING);
+		if (ixnotact) {
 		    msg += tr("Click Ok to update the "
-			      "index for this file, then re-run the "
-			      "query when indexing is done. "
-			      "Else, Cancel.");
+			      "index for this file, then you will need to "
+			      "re-run the query when indexing is done. ");
 		} else {
-		    msg += tr("Indexer running so things should improve when "
-			      "it's done");
-		}
+		    msg += tr("The indexer is running so things should "
+			      "improve when it's done. ");
+		} 
+		msg += tr("Click Cancel to return to the list. "
+			  "Click Ignore to show the preview anyway. ");
+		QMessageBox::StandardButtons bts = 
+		    QMessageBox::Ignore | QMessageBox::Cancel;
+		if (ixnotact)
+		    bts |= QMessageBox::Ok;
 		int rep = 
 		    QMessageBox::warning(0, tr("Warning"), 
-					 msg,
-					 QMessageBox::Ok,
-					 (m_indexerState == IXST_NOTRUNNING) ?
-					 QMessageBox::Cancel : 
-					 QMessageBox::NoButton,
+					 msg, bts,
+					 ixnotact? QMessageBox::Cancel : 
 					 QMessageBox::NoButton);
 		if (m_indexerState == IXST_NOTRUNNING && 
 		    rep == QMessageBox::Ok) {
 		    vector<Rcl::Doc> docs(1, doc);
 		    updateIdxForDocs(docs);
 		}
-		return;
+		if (rep != QMessageBox::Ignore)
+		    return;
 	    }
 	}
     }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.