diff --git a/src/qtgui/guiutils.cpp b/src/qtgui/guiutils.cpp
index 081738e4..0d8664ca 100644
--- a/src/qtgui/guiutils.cpp
+++ b/src/qtgui/guiutils.cpp
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.1 2006-01-27 13:43:04 dockes Exp $ (C) 2005 Jean-Francois Dockes";
+static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.2 2006-01-30 09:28:50 dockes Exp $ (C) 2005 Jean-Francois Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -114,6 +114,7 @@ void rwSettings(bool writing)
SETTING_RW(prefs.mainwidth, "/Recoll/geometry/width", Num, 590);
SETTING_RW(prefs.mainheight, "/Recoll/geometry/height", Num, 810);
SETTING_RW(prefs.ssall, "/Recoll/prefs/simpleSearchAll", Bool, false);
+ SETTING_RW(prefs.htmlBrowser, "/Recoll/prefs/htmlBrowser", , "");
SETTING_RW(prefs.showicons, "/Recoll/prefs/reslist/showicons", Bool, true);
SETTING_RW(prefs.respagesize, "/Recoll/prefs/reslist/pagelen", Num, 8);
SETTING_RW(prefs.reslistfontfamily, "/Recoll/prefs/reslist/fontFamily", ,
diff --git a/src/qtgui/main.cpp b/src/qtgui/main.cpp
index 1988c8a7..e611a8a2 100644
--- a/src/qtgui/main.cpp
+++ b/src/qtgui/main.cpp
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "@(#$Id: main.cpp,v 1.35 2006-01-26 14:00:18 dockes Exp $ (C) 2005 J.F.Dockes";
+static char rcsid[] = "@(#$Id: main.cpp,v 1.36 2006-01-30 09:28:50 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -49,7 +49,9 @@ using Rcl::AdvSearchData;
#include "smallut.h"
#include "rclinit.h"
#include "debuglog.h"
+#ifdef WITH_KDE
#include "rclversion.h"
+#endif
#include "rclmain.h"
#include "guiutils.h"
diff --git a/src/qtgui/rclmain.cpp b/src/qtgui/rclmain.cpp
index 7397668f..089fd88c 100644
--- a/src/qtgui/rclmain.cpp
+++ b/src/qtgui/rclmain.cpp
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.10 2006-01-27 13:42:02 dockes Exp $ (C) 2005 J.F.Dockes";
+static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.11 2006-01-30 09:28:50 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -501,6 +501,10 @@ void RclMain::showAboutDialog()
void RclMain::startManual()
{
+ QString msg = tr("Starting help browser ");
+ if (prefs.htmlBrowser != QString(""))
+ msg += prefs.htmlBrowser;
+ statusBar()->message(msg, 3000);
startHelpBrowser();
}
@@ -560,7 +564,7 @@ void RclMain::enablePrevPage(bool yesno)
void RclMain::showQueryDetails()
{
// Break query into lines of reasonable length, avoid cutting words!
- const int ll = 80;
+ const unsigned int ll = 80;
string query = currentQueryData.description;
string oq;
while (query.length() > 0) {
diff --git a/src/qtgui/uiprefs.ui b/src/qtgui/uiprefs.ui
index e6ec58b8..93dd0cb4 100644
--- a/src/qtgui/uiprefs.ui
+++ b/src/qtgui/uiprefs.ui
@@ -8,8 +8,8 @@
0
0
- 385
- 280
+ 455
+ 238
@@ -39,51 +39,127 @@
- layout4
+ layout10
-
+
unnamed
-
+
- textLabel1
-
-
- Number of entries in a result page
+ layout5
+
+
+ unnamed
+
+
+
+ textLabel1
+
+
+
+ 5
+ 5
+ 1
+ 0
+
+
+
+ Number of entries in a result page
+
+
+
+
+ pageLenSB
+
+
+ 1
+
+
+ 8
+
+
+
-
+
- textLabel3
-
-
- Result list font
+ layout6
+
+
+ unnamed
+
+
+
+ textLabel3
+
+
+ Result list font
+
+
+
+
+ reslistFontPB
+
+
+ Helvetica-10
+
+
+ Opens a dialog to select the result list font
+
+
+
+
+ resetFontPB
+
+
+ Reset
+
+
+ Resets the result list font to the system default
+
+
+
-
+
- reslistFontPB
-
-
- Helvetica-10
-
-
- Opens a dialog to select the result list font
+ layout9
+
+
+ unnamed
+
+
+
+ textLabel1_3
+
+
+ HTML help browser
+
+
+
+
+ helpBrowserLE
+
+
+
+ 200
+ 0
+
+
+
+
+
+ helpBrowserPB
+
+
+ Select file
+
+
+
-
-
- pageLenSB
-
-
- 1
-
-
- 8
-
-
-
+
useIconsCB
@@ -94,18 +170,7 @@
true
-
-
- resetFontPB
-
-
- Reset
-
-
- Resets the result list font to the system default
-
-
-
+
@@ -302,6 +367,7 @@ May be slow for big documents.
accept()
showFontDialog()
resetReslistFont()
+ showBrowserDialog()
init()
diff --git a/src/qtgui/uiprefs.ui.h b/src/qtgui/uiprefs.ui.h
index 7c982bbc..61a0ee86 100644
--- a/src/qtgui/uiprefs.ui.h
+++ b/src/qtgui/uiprefs.ui.h
@@ -11,6 +11,7 @@
*****************************************************************************/
#include "qfontdialog.h"
+#include "qfiledialog.h"
#include "qspinbox.h"
#include "qmessagebox.h"
@@ -34,6 +35,7 @@ void UIPrefsDialog::init()
reslistFontPB->setText(reslistFontFamily + "-" +
s.setNum(reslistFontSize));
}
+ helpBrowserLE->setText(prefs.htmlBrowser);
// Stemming language combobox
stemLangCMB->insertItem("(no stemming)");
list langs;
@@ -66,6 +68,7 @@ void UIPrefsDialog::init()
replAbsCB->setDown(prefs.queryReplaceAbstract);
connect(reslistFontPB, SIGNAL(clicked()), this, SLOT(showFontDialog()));
+ connect(helpBrowserPB, SIGNAL(clicked()), this, SLOT(showBrowserDialog()));
connect(resetFontPB, SIGNAL(clicked()), this, SLOT(resetReslistFont()));
}
@@ -77,6 +80,8 @@ void UIPrefsDialog::accept()
prefs.reslistfontfamily = reslistFontFamily;
prefs.reslistfontsize = reslistFontSize;
+ prefs.htmlBrowser = helpBrowserLE->text();
+
if (stemLangCMB->currentItem() == 0) {
prefs.queryStemLang = "";
} else {
@@ -127,3 +132,14 @@ void UIPrefsDialog::resetReslistFont()
reslistFontPB->setText(this->font().family() + "-" +
QString().setNum(this->font().pointSize()));
}
+
+void UIPrefsDialog::showBrowserDialog()
+{
+ QString s = QFileDialog::getOpenFileName("/usr",
+ "",
+ this,
+ "open file dialog",
+ "Choose a file" );
+ if (s)
+ helpBrowserLE->setText(s);
+}