GUI: Automatically popup the "show missing helpers" dialog after first indexing
This commit is contained in:
parent
95ef518ec7
commit
96a04211af
@ -621,6 +621,10 @@ void RclMain::periodic100()
|
||||
if (status) {
|
||||
QMessageBox::warning(0, "Recoll",
|
||||
tr("Indexing failed"));
|
||||
} else {
|
||||
// On the first run, show missing helpers. We only do this once
|
||||
if (m_firstIndexing)
|
||||
showMissingHelpers();
|
||||
}
|
||||
string reason;
|
||||
maybeOpenDb(reason, 1);
|
||||
@ -713,6 +717,11 @@ void RclMain::toggleIndexing()
|
||||
break;
|
||||
case IXST_NOTRUNNING:
|
||||
{
|
||||
// Could also mean that no helpers are missing, but then we
|
||||
// won't try to show a message anyway (which is what
|
||||
// firstIndexing is used for)
|
||||
m_firstIndexing = theconfig->getMissingHelperDesc().empty();
|
||||
|
||||
vector<string> args;
|
||||
args.push_back("-c");
|
||||
args.push_back(theconfig->getConfDir());
|
||||
@ -739,6 +748,10 @@ void RclMain::rebuildIndex()
|
||||
QMessageBox::Cancel,
|
||||
QMessageBox::NoButton);
|
||||
if (rep == QMessageBox::Ok) {
|
||||
// Could also mean that no helpers are missing, but then we
|
||||
// won't try to show a message anyway (which is what
|
||||
// firstIndexing is used for)
|
||||
m_firstIndexing = theconfig->getMissingHelperDesc().empty();
|
||||
vector<string> args;
|
||||
args.push_back("-c");
|
||||
args.push_back(theconfig->getConfDir());
|
||||
@ -1058,13 +1071,18 @@ void RclMain::showAboutDialog()
|
||||
void RclMain::showMissingHelpers()
|
||||
{
|
||||
string miss = theconfig->getMissingHelperDesc();
|
||||
QString msg = tr("External applications/commands needed and not found "
|
||||
QString msg = QString::fromAscii("<p>") +
|
||||
tr("External applications/commands needed and not found "
|
||||
"for indexing your file types:\n\n");
|
||||
msg += "(<i>";
|
||||
msg += QString::fromLocal8Bit(theconfig->getConfDir().c_str());
|
||||
msg += "/missing</i>):<pre>\n";
|
||||
if (!miss.empty()) {
|
||||
msg += QString::fromUtf8(miss.c_str());
|
||||
} else {
|
||||
msg += tr("No helpers found missing");
|
||||
}
|
||||
msg += "</pre>";
|
||||
QMessageBox::information(this, tr("Missing helper programs"), msg);
|
||||
}
|
||||
|
||||
|
||||
@ -71,7 +71,8 @@ public:
|
||||
m_idxproc(0),
|
||||
m_sortspecnochange(false),
|
||||
m_indexerState(IXST_RUNNINGNOTMINE),
|
||||
m_queryActive(false)
|
||||
m_queryActive(false),
|
||||
m_firstIndexing(false)
|
||||
{
|
||||
setupUi(this);
|
||||
init();
|
||||
@ -177,6 +178,7 @@ private:
|
||||
RefCntr<DocSequence> m_source;
|
||||
IndexerState m_indexerState;
|
||||
bool m_queryActive;
|
||||
bool m_firstIndexing;
|
||||
|
||||
// If set on init, will be displayed either through ext app, or
|
||||
// preview (if no ext app set)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user