make sure we only show the automatic missing helpers dialog once
This commit is contained in:
parent
0f89eab100
commit
5aad9d50e1
6 changed files with 31 additions and 17 deletions
|
@ -24,8 +24,9 @@
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include <set>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <list>
|
||||||
|
using std::list;
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -642,12 +643,13 @@ bool RclConfig::valueSplitAttributes(const string& whole, string& value,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string RclConfig::getMissingHelperDesc() const
|
bool RclConfig::getMissingHelperDesc(string& out) const
|
||||||
{
|
{
|
||||||
string fmiss = path_cat(getConfDir(), "missing");
|
string fmiss = path_cat(getConfDir(), "missing");
|
||||||
string out;
|
out.clear();
|
||||||
file_to_string(fmiss, out);
|
if (!file_to_string(fmiss, out))
|
||||||
return out;
|
return false;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RclConfig::storeMissingHelperDesc(const string &s)
|
void RclConfig::storeMissingHelperDesc(const string &s)
|
||||||
|
|
|
@ -17,22 +17,18 @@
|
||||||
#ifndef _RCLCONFIG_H_INCLUDED_
|
#ifndef _RCLCONFIG_H_INCLUDED_
|
||||||
#define _RCLCONFIG_H_INCLUDED_
|
#define _RCLCONFIG_H_INCLUDED_
|
||||||
|
|
||||||
#include <list>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
|
||||||
#ifndef NO_NAMESPACES
|
|
||||||
using std::list;
|
|
||||||
using std::string;
|
using std::string;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using std::pair;
|
using std::pair;
|
||||||
using std::set;
|
using std::set;
|
||||||
using std::map;
|
using std::map;
|
||||||
using std::set;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "conftree.h"
|
#include "conftree.h"
|
||||||
#include "smallut.h"
|
#include "smallut.h"
|
||||||
|
@ -247,7 +243,7 @@ class RclConfig {
|
||||||
bool mimeViewerNeedsUncomp(const string &mimetype) const;
|
bool mimeViewerNeedsUncomp(const string &mimetype) const;
|
||||||
|
|
||||||
/** Store/retrieve missing helpers description string */
|
/** Store/retrieve missing helpers description string */
|
||||||
string getMissingHelperDesc() const;
|
bool getMissingHelperDesc(string&) const;
|
||||||
void storeMissingHelperDesc(const string &s);
|
void storeMissingHelperDesc(const string &s);
|
||||||
|
|
||||||
/** Find exec file for external filter. cmd is the command name from the
|
/** Find exec file for external filter. cmd is the command name from the
|
||||||
|
|
|
@ -720,7 +720,8 @@ void RclMain::toggleIndexing()
|
||||||
// Could also mean that no helpers are missing, but then we
|
// Could also mean that no helpers are missing, but then we
|
||||||
// won't try to show a message anyway (which is what
|
// won't try to show a message anyway (which is what
|
||||||
// firstIndexing is used for)
|
// firstIndexing is used for)
|
||||||
m_firstIndexing = theconfig->getMissingHelperDesc().empty();
|
string mhd;
|
||||||
|
m_firstIndexing = !theconfig->getMissingHelperDesc(mhd);
|
||||||
|
|
||||||
vector<string> args;
|
vector<string> args;
|
||||||
args.push_back("-c");
|
args.push_back("-c");
|
||||||
|
@ -751,7 +752,8 @@ void RclMain::rebuildIndex()
|
||||||
// Could also mean that no helpers are missing, but then we
|
// Could also mean that no helpers are missing, but then we
|
||||||
// won't try to show a message anyway (which is what
|
// won't try to show a message anyway (which is what
|
||||||
// firstIndexing is used for)
|
// firstIndexing is used for)
|
||||||
m_firstIndexing = theconfig->getMissingHelperDesc().empty();
|
string mhd;
|
||||||
|
m_firstIndexing = !theconfig->getMissingHelperDesc(mhd);
|
||||||
vector<string> args;
|
vector<string> args;
|
||||||
args.push_back("-c");
|
args.push_back("-c");
|
||||||
args.push_back(theconfig->getConfDir());
|
args.push_back(theconfig->getConfDir());
|
||||||
|
@ -1069,7 +1071,11 @@ void RclMain::showAboutDialog()
|
||||||
|
|
||||||
void RclMain::showMissingHelpers()
|
void RclMain::showMissingHelpers()
|
||||||
{
|
{
|
||||||
string miss = theconfig->getMissingHelperDesc();
|
string miss;
|
||||||
|
if (!theconfig->getMissingHelperDesc(miss)) {
|
||||||
|
QMessageBox::information(this, "", tr("Indexing did not run yet"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
QString msg = QString::fromAscii("<p>") +
|
QString msg = QString::fromAscii("<p>") +
|
||||||
tr("External applications/commands needed and not found "
|
tr("External applications/commands needed and not found "
|
||||||
"for indexing your file types:\n\n");
|
"for indexing your file types:\n\n");
|
||||||
|
@ -1128,8 +1134,8 @@ void RclMain::showActiveTypes()
|
||||||
|
|
||||||
// Substract the types for missing helpers (the docs are indexed
|
// Substract the types for missing helpers (the docs are indexed
|
||||||
// by name only):
|
// by name only):
|
||||||
string miss = theconfig->getMissingHelperDesc();
|
string miss;
|
||||||
if (!miss.empty()) {
|
if (theconfig->getMissingHelperDesc(miss) && !miss.empty()) {
|
||||||
FIMissingStore st(miss);
|
FIMissingStore st(miss);
|
||||||
map<string, set<string> >::const_iterator it;
|
map<string, set<string> >::const_iterator it;
|
||||||
for (it = st.m_typesForMissing.begin();
|
for (it = st.m_typesForMissing.begin();
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#include <list>
|
||||||
|
using std::list;
|
||||||
|
|
||||||
#include "docseqdb.h"
|
#include "docseqdb.h"
|
||||||
#include "rcldb.h"
|
#include "rcldb.h"
|
||||||
#include "debuglog.h"
|
#include "debuglog.h"
|
||||||
|
|
|
@ -17,7 +17,10 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <list>
|
||||||
|
using std::list;
|
||||||
|
|
||||||
#include "docseqhist.h"
|
#include "docseqhist.h"
|
||||||
#include "rcldb.h"
|
#include "rcldb.h"
|
||||||
|
|
|
@ -39,6 +39,10 @@
|
||||||
<h2><a name="b_latest">recoll 1.18.1</a></h2>
|
<h2><a name="b_latest">recoll 1.18.1</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
<li>When no indexing helper applications are actually missing,
|
||||||
|
an ennoying popup is shown in the GUI at each end of a batch
|
||||||
|
indexing run (it's supposed to be shown only once).</li>
|
||||||
|
|
||||||
<li>Weird data in filter output text (e.g.: produced by some
|
<li>Weird data in filter output text (e.g.: produced by some
|
||||||
versions of pdftotext) can cause an error which will halt
|
versions of pdftotext) can cause an error which will halt
|
||||||
the processing of the document, which becomes
|
the processing of the document, which becomes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue