help browser selection in prefs
This commit is contained in:
parent
1e806e88e1
commit
baf32fcbc1
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#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
|
#endif
|
||||||
/*
|
/*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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.mainwidth, "/Recoll/geometry/width", Num, 590);
|
||||||
SETTING_RW(prefs.mainheight, "/Recoll/geometry/height", Num, 810);
|
SETTING_RW(prefs.mainheight, "/Recoll/geometry/height", Num, 810);
|
||||||
SETTING_RW(prefs.ssall, "/Recoll/prefs/simpleSearchAll", Bool, false);
|
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.showicons, "/Recoll/prefs/reslist/showicons", Bool, true);
|
||||||
SETTING_RW(prefs.respagesize, "/Recoll/prefs/reslist/pagelen", Num, 8);
|
SETTING_RW(prefs.respagesize, "/Recoll/prefs/reslist/pagelen", Num, 8);
|
||||||
SETTING_RW(prefs.reslistfontfamily, "/Recoll/prefs/reslist/fontFamily", ,
|
SETTING_RW(prefs.reslistfontfamily, "/Recoll/prefs/reslist/fontFamily", ,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#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
|
#endif
|
||||||
/*
|
/*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -49,7 +49,9 @@ using Rcl::AdvSearchData;
|
|||||||
#include "smallut.h"
|
#include "smallut.h"
|
||||||
#include "rclinit.h"
|
#include "rclinit.h"
|
||||||
#include "debuglog.h"
|
#include "debuglog.h"
|
||||||
|
#ifdef WITH_KDE
|
||||||
#include "rclversion.h"
|
#include "rclversion.h"
|
||||||
|
#endif
|
||||||
#include "rclmain.h"
|
#include "rclmain.h"
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#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
|
#endif
|
||||||
/*
|
/*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -501,6 +501,10 @@ void RclMain::showAboutDialog()
|
|||||||
|
|
||||||
void RclMain::startManual()
|
void RclMain::startManual()
|
||||||
{
|
{
|
||||||
|
QString msg = tr("Starting help browser ");
|
||||||
|
if (prefs.htmlBrowser != QString(""))
|
||||||
|
msg += prefs.htmlBrowser;
|
||||||
|
statusBar()->message(msg, 3000);
|
||||||
startHelpBrowser();
|
startHelpBrowser();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -560,7 +564,7 @@ void RclMain::enablePrevPage(bool yesno)
|
|||||||
void RclMain::showQueryDetails()
|
void RclMain::showQueryDetails()
|
||||||
{
|
{
|
||||||
// Break query into lines of reasonable length, avoid cutting words!
|
// Break query into lines of reasonable length, avoid cutting words!
|
||||||
const int ll = 80;
|
const unsigned int ll = 80;
|
||||||
string query = currentQueryData.description;
|
string query = currentQueryData.description;
|
||||||
string oq;
|
string oq;
|
||||||
while (query.length() > 0) {
|
while (query.length() > 0) {
|
||||||
|
|||||||
@ -8,8 +8,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>385</width>
|
<width>455</width>
|
||||||
<height>280</height>
|
<height>238</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="caption">
|
<property name="caption">
|
||||||
@ -39,51 +39,127 @@
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QLayoutWidget">
|
<widget class="QLayoutWidget">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>layout4</cstring>
|
<cstring>layout10</cstring>
|
||||||
</property>
|
</property>
|
||||||
<grid>
|
<vbox>
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>unnamed</cstring>
|
<cstring>unnamed</cstring>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
|
<widget class="QLayoutWidget">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>textLabel1</cstring>
|
<cstring>layout5</cstring>
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Number of entries in a result page</string>
|
|
||||||
</property>
|
</property>
|
||||||
|
<hbox>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>textLabel1</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>5</hsizetype>
|
||||||
|
<vsizetype>5</vsizetype>
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Number of entries in a result page</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QSpinBox">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>pageLenSB</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="minValue">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</hbox>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" row="1" column="0">
|
<widget class="QLayoutWidget">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>textLabel3</cstring>
|
<cstring>layout6</cstring>
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Result list font</string>
|
|
||||||
</property>
|
</property>
|
||||||
|
<hbox>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>textLabel3</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Result list font</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>reslistFontPB</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Helvetica-10</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip" stdset="0">
|
||||||
|
<string>Opens a dialog to select the result list font</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>resetFontPB</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Reset</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip" stdset="0">
|
||||||
|
<string>Resets the result list font to the system default</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</hbox>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" row="1" column="1" rowspan="1" colspan="2">
|
<widget class="QLayoutWidget">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>reslistFontPB</cstring>
|
<cstring>layout9</cstring>
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Helvetica-10</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip" stdset="0">
|
|
||||||
<string>Opens a dialog to select the result list font</string>
|
|
||||||
</property>
|
</property>
|
||||||
|
<hbox>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>textLabel1_3</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>HTML help browser</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>helpBrowserLE</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>helpBrowserPB</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Select file</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</hbox>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QSpinBox" row="0" column="2" rowspan="1" colspan="2">
|
<widget class="QCheckBox">
|
||||||
<property name="name">
|
|
||||||
<cstring>pageLenSB</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="minValue">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="4">
|
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>useIconsCB</cstring>
|
<cstring>useIconsCB</cstring>
|
||||||
</property>
|
</property>
|
||||||
@ -94,18 +170,7 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" row="1" column="3">
|
</vbox>
|
||||||
<property name="name">
|
|
||||||
<cstring>resetFontPB</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Reset</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip" stdset="0">
|
|
||||||
<string>Resets the result list font to the system default</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</grid>
|
|
||||||
</widget>
|
</widget>
|
||||||
</vbox>
|
</vbox>
|
||||||
</widget>
|
</widget>
|
||||||
@ -302,6 +367,7 @@ May be slow for big documents.</string>
|
|||||||
<slot access="protected">accept()</slot>
|
<slot access="protected">accept()</slot>
|
||||||
<slot>showFontDialog()</slot>
|
<slot>showFontDialog()</slot>
|
||||||
<slot>resetReslistFont()</slot>
|
<slot>resetReslistFont()</slot>
|
||||||
|
<slot>showBrowserDialog()</slot>
|
||||||
</slots>
|
</slots>
|
||||||
<functions>
|
<functions>
|
||||||
<function>init()</function>
|
<function>init()</function>
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "qfontdialog.h"
|
#include "qfontdialog.h"
|
||||||
|
#include "qfiledialog.h"
|
||||||
#include "qspinbox.h"
|
#include "qspinbox.h"
|
||||||
#include "qmessagebox.h"
|
#include "qmessagebox.h"
|
||||||
|
|
||||||
@ -34,6 +35,7 @@ void UIPrefsDialog::init()
|
|||||||
reslistFontPB->setText(reslistFontFamily + "-" +
|
reslistFontPB->setText(reslistFontFamily + "-" +
|
||||||
s.setNum(reslistFontSize));
|
s.setNum(reslistFontSize));
|
||||||
}
|
}
|
||||||
|
helpBrowserLE->setText(prefs.htmlBrowser);
|
||||||
// Stemming language combobox
|
// Stemming language combobox
|
||||||
stemLangCMB->insertItem("(no stemming)");
|
stemLangCMB->insertItem("(no stemming)");
|
||||||
list<string> langs;
|
list<string> langs;
|
||||||
@ -66,6 +68,7 @@ void UIPrefsDialog::init()
|
|||||||
replAbsCB->setDown(prefs.queryReplaceAbstract);
|
replAbsCB->setDown(prefs.queryReplaceAbstract);
|
||||||
|
|
||||||
connect(reslistFontPB, SIGNAL(clicked()), this, SLOT(showFontDialog()));
|
connect(reslistFontPB, SIGNAL(clicked()), this, SLOT(showFontDialog()));
|
||||||
|
connect(helpBrowserPB, SIGNAL(clicked()), this, SLOT(showBrowserDialog()));
|
||||||
connect(resetFontPB, SIGNAL(clicked()), this, SLOT(resetReslistFont()));
|
connect(resetFontPB, SIGNAL(clicked()), this, SLOT(resetReslistFont()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,6 +80,8 @@ void UIPrefsDialog::accept()
|
|||||||
prefs.reslistfontfamily = reslistFontFamily;
|
prefs.reslistfontfamily = reslistFontFamily;
|
||||||
prefs.reslistfontsize = reslistFontSize;
|
prefs.reslistfontsize = reslistFontSize;
|
||||||
|
|
||||||
|
prefs.htmlBrowser = helpBrowserLE->text();
|
||||||
|
|
||||||
if (stemLangCMB->currentItem() == 0) {
|
if (stemLangCMB->currentItem() == 0) {
|
||||||
prefs.queryStemLang = "";
|
prefs.queryStemLang = "";
|
||||||
} else {
|
} else {
|
||||||
@ -127,3 +132,14 @@ void UIPrefsDialog::resetReslistFont()
|
|||||||
reslistFontPB->setText(this->font().family() + "-" +
|
reslistFontPB->setText(this->font().family() + "-" +
|
||||||
QString().setNum(this->font().pointSize()));
|
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);
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user