added menu to display missing helpers
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.61 2008-10-07 06:44:23 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.62 2008-10-08 16:15:22 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -42,6 +42,7 @@ static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.61 2008-10-07 06:44:23 dockes E
|
||||
#include "debuglog.h"
|
||||
#include "smallut.h"
|
||||
#include "textsplit.h"
|
||||
#include "readfile.h"
|
||||
|
||||
#ifndef NO_NAMESPACES
|
||||
using namespace std;
|
||||
@@ -454,6 +455,22 @@ string RclConfig::getMimeHandlerDef(const std::string &mtype, bool filtertypes)
|
||||
}
|
||||
return hs;
|
||||
}
|
||||
string RclConfig::getMissingHelperDesc()
|
||||
{
|
||||
string fmiss = path_cat(getConfDir(), "missing");
|
||||
string out;
|
||||
file_to_string(fmiss, out);
|
||||
return out;
|
||||
}
|
||||
void RclConfig::storeMissingHelperDesc(const string &s)
|
||||
{
|
||||
string fmiss = path_cat(getConfDir(), "missing");
|
||||
FILE *fp = fopen(fmiss.c_str(), "w");
|
||||
if (fp) {
|
||||
fwrite(s.c_str(), s.size(), 1, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
// Read definitions for field prefixes, aliases, and hierarchy and arrange
|
||||
// things for speed (theses are used a lot during indexing)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
#ifndef _RCLCONFIG_H_INCLUDED_
|
||||
#define _RCLCONFIG_H_INCLUDED_
|
||||
/* @(#$Id: rclconfig.h,v 1.41 2008-09-16 08:18:30 dockes Exp $ (C) 2004 J.F.Dockes */
|
||||
/* @(#$Id: rclconfig.h,v 1.42 2008-10-08 16:15:22 dockes Exp $ (C) 2004 J.F.Dockes */
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
@@ -161,6 +161,9 @@ class RclConfig {
|
||||
bool getMimeViewerDefs(vector<pair<string, string> >&);
|
||||
bool setMimeViewerDef(const string& mimetype, const string& cmd);
|
||||
|
||||
/** Store/retrieve missing helpers description string */
|
||||
string getMissingHelperDesc();
|
||||
void storeMissingHelperDesc(const string &s);
|
||||
|
||||
/** Find exec file for external filter. cmd is the command name from the
|
||||
* command string returned by getMimeHandlerDef */
|
||||
|
||||
Reference in New Issue
Block a user