temp ckpt: need to test on real unix

This commit is contained in:
dockes 2009-01-23 15:56:44 +00:00
parent 7b1c4c93ad
commit 4c82cd9c9d
5 changed files with 3646 additions and 3491 deletions

File diff suppressed because it is too large Load Diff

View File

@ -116,7 +116,7 @@ void AdvSearch::init()
restrictCtCB->setEnabled(false);
restrictCtCB->setChecked(m_ignByCats);
fillFileTypes();
setHelpIndex("RCL.SEARCH.COMPLEX");
subtreeCMB->insertStringList(prefs.asearchSubdirHist);
subtreeCMB->setEditText("");
@ -158,6 +158,7 @@ void AdvSearch::saveCnf()
bool AdvSearch::close()
{
setHelpIndex("RCL.SEARCH.SIMPLE");
saveCnf();
return QWidget::close();
}

View File

@ -89,6 +89,11 @@ int recollNeedsExit;
int startIndexingAfterConfig;
RclMain *mainWindow;
static string recollsharedir;
const char *g_helpIndex;
void setHelpIndex(const char *index)
{
g_helpIndex = index;
}
bool maybeOpenDb(string &reason, bool force)
{
@ -303,8 +308,8 @@ int main(int argc, char **argv)
// }
#else
RclMain w;
mainWindow = &w;
RclMain w;
mainWindow = &w;
#endif
if (prefs.mainwidth > 100) {

View File

@ -161,6 +161,8 @@ void RclMain::init()
}
preferencesMenu->setItemChecked(curid, true);
setHelpIndex("RCL.SEARCH.SIMPLE");
// Document categories buttons
catgBGRP->setColumnLayout(1, Qt::Vertical);
list<string> cats;
@ -977,6 +979,7 @@ void RclMain::startNativeViewer(Rcl::Doc doc)
g_dynconf->enterDoc(fn, doc.ipath);
// We should actually monitor these processes so that we can
// delete the temp files when they exit
LOGDEB(("Executing: [%s]\n", ncmd.c_str()));
system(ncmd.c_str());
}
@ -989,6 +992,12 @@ void RclMain::startManual()
doc.url = path_cat(doc.url, rclconfig->getDatadir());
doc.url = path_cat(doc.url, "doc");
doc.url = path_cat(doc.url, "usermanual.html");
LOGDEB(("RclMain::startManual: help index is %s\n",
g_helpIndex?g_helpIndex:"(null)"));
if (g_helpIndex && *g_helpIndex) {
doc.url += "#";
doc.url += g_helpIndex;
}
doc.mimetype = "text/html";
startNativeViewer(doc);
}

View File

@ -29,13 +29,14 @@
// Open the database if needed. We now force a close/open by default
extern bool maybeOpenDb(std::string &reason, bool force = true);
class RclMain;
extern RclMain *mainWindow;
extern RclConfig *rclconfig;
extern Rcl::Db *rcldb;
extern int recollNeedsExit;
extern int startIndexingAfterConfig; // 1st startup
extern RclHistory *g_dynconf;
extern const char *g_helpIndex;
extern void setHelpIndex(const char *index);
#ifdef RCL_USE_ASPELL
class Aspell;
extern Aspell *aspell;