|
a/src/qtgui/rclmain_w.cpp |
|
b/src/qtgui/rclmain_w.cpp |
|
... |
|
... |
619 |
if (exited) {
|
619 |
if (exited) {
|
620 |
deleteZ(m_idxproc);
|
620 |
deleteZ(m_idxproc);
|
621 |
if (status) {
|
621 |
if (status) {
|
622 |
QMessageBox::warning(0, "Recoll",
|
622 |
QMessageBox::warning(0, "Recoll",
|
623 |
tr("Indexing failed"));
|
623 |
tr("Indexing failed"));
|
|
|
624 |
} else {
|
|
|
625 |
// On the first run, show missing helpers. We only do this once
|
|
|
626 |
if (m_firstIndexing)
|
|
|
627 |
showMissingHelpers();
|
624 |
}
|
628 |
}
|
625 |
string reason;
|
629 |
string reason;
|
626 |
maybeOpenDb(reason, 1);
|
630 |
maybeOpenDb(reason, 1);
|
627 |
} else {
|
631 |
} else {
|
628 |
// update/show status even if the status file did not
|
632 |
// update/show status even if the status file did not
|
|
... |
|
... |
711 |
}
|
715 |
}
|
712 |
}
|
716 |
}
|
713 |
break;
|
717 |
break;
|
714 |
case IXST_NOTRUNNING:
|
718 |
case IXST_NOTRUNNING:
|
715 |
{
|
719 |
{
|
|
|
720 |
// Could also mean that no helpers are missing, but then we
|
|
|
721 |
// won't try to show a message anyway (which is what
|
|
|
722 |
// firstIndexing is used for)
|
|
|
723 |
m_firstIndexing = theconfig->getMissingHelperDesc().empty();
|
|
|
724 |
|
716 |
vector<string> args;
|
725 |
vector<string> args;
|
717 |
args.push_back("-c");
|
726 |
args.push_back("-c");
|
718 |
args.push_back(theconfig->getConfDir());
|
727 |
args.push_back(theconfig->getConfDir());
|
719 |
m_idxproc = new ExecCmd;
|
728 |
m_idxproc = new ExecCmd;
|
720 |
m_idxproc->startExec("recollindex", args, false, false);
|
729 |
m_idxproc->startExec("recollindex", args, false, false);
|
|
... |
|
... |
737 |
"from scratch ?"),
|
746 |
"from scratch ?"),
|
738 |
QMessageBox::Ok,
|
747 |
QMessageBox::Ok,
|
739 |
QMessageBox::Cancel,
|
748 |
QMessageBox::Cancel,
|
740 |
QMessageBox::NoButton);
|
749 |
QMessageBox::NoButton);
|
741 |
if (rep == QMessageBox::Ok) {
|
750 |
if (rep == QMessageBox::Ok) {
|
|
|
751 |
// Could also mean that no helpers are missing, but then we
|
|
|
752 |
// won't try to show a message anyway (which is what
|
|
|
753 |
// firstIndexing is used for)
|
|
|
754 |
m_firstIndexing = theconfig->getMissingHelperDesc().empty();
|
742 |
vector<string> args;
|
755 |
vector<string> args;
|
743 |
args.push_back("-c");
|
756 |
args.push_back("-c");
|
744 |
args.push_back(theconfig->getConfDir());
|
757 |
args.push_back(theconfig->getConfDir());
|
745 |
args.push_back("-z");
|
758 |
args.push_back("-z");
|
746 |
m_idxproc = new ExecCmd;
|
759 |
m_idxproc = new ExecCmd;
|
|
... |
|
... |
1056 |
}
|
1069 |
}
|
1057 |
|
1070 |
|
1058 |
void RclMain::showMissingHelpers()
|
1071 |
void RclMain::showMissingHelpers()
|
1059 |
{
|
1072 |
{
|
1060 |
string miss = theconfig->getMissingHelperDesc();
|
1073 |
string miss = theconfig->getMissingHelperDesc();
|
|
|
1074 |
QString msg = QString::fromAscii("<p>") +
|
1061 |
QString msg = tr("External applications/commands needed and not found "
|
1075 |
tr("External applications/commands needed and not found "
|
1062 |
"for indexing your file types:\n\n");
|
1076 |
"for indexing your file types:\n\n");
|
|
|
1077 |
msg += "(<i>";
|
|
|
1078 |
msg += QString::fromLocal8Bit(theconfig->getConfDir().c_str());
|
|
|
1079 |
msg += "/missing</i>):<pre>\n";
|
1063 |
if (!miss.empty()) {
|
1080 |
if (!miss.empty()) {
|
1064 |
msg += QString::fromUtf8(miss.c_str());
|
1081 |
msg += QString::fromUtf8(miss.c_str());
|
1065 |
} else {
|
1082 |
} else {
|
1066 |
msg += tr("No helpers found missing");
|
1083 |
msg += tr("No helpers found missing");
|
1067 |
}
|
1084 |
}
|
|
|
1085 |
msg += "</pre>";
|
1068 |
QMessageBox::information(this, tr("Missing helper programs"), msg);
|
1086 |
QMessageBox::information(this, tr("Missing helper programs"), msg);
|
1069 |
}
|
1087 |
}
|
1070 |
|
1088 |
|
1071 |
void RclMain::showActiveTypes()
|
1089 |
void RclMain::showActiveTypes()
|
1072 |
{
|
1090 |
{
|