small typo fixes

This commit is contained in:
dockes 2006-09-15 16:49:27 +00:00
parent 5e82897242
commit de7a312051
5 changed files with 60 additions and 32 deletions

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.18 2006-09-13 15:31:06 dockes Exp $ (C) 2005 Jean-Francois Dockes"; static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.19 2006-09-15 16:49:27 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
@ -135,12 +135,11 @@ void rwSettings(bool writing)
"/Recoll/prefs/startWithAdvSearchOpen", Bool, false); "/Recoll/prefs/startWithAdvSearchOpen", Bool, false);
SETTING_RW(prefs.startWithSortToolOpen, SETTING_RW(prefs.startWithSortToolOpen,
"/Recoll/prefs/startWithSortToolOpen", Bool, false); "/Recoll/prefs/startWithSortToolOpen", Bool, false);
SETTING_RW(prefs.showicons, "/Recoll/prefs/reslist/showicons", Bool, true); SETTING_RW(prefs.showicons, "/Recoll/prefs/reslist/showicons", Bool, true);
SETTING_RW(prefs.autoSearchOnWS, "/Recoll/prefs/reslist/autoSearchOnWS", SETTING_RW(prefs.autoSearchOnWS, "/Recoll/prefs/reslist/autoSearchOnWS",
Bool, false); Bool, false);
SETTING_RW(prefs.ssearchAutoPhrase, SETTING_RW(prefs.ssearchAutoPhrase,
"/Recoll/prefs/startWithSortToolOpen", Bool, false); "/Recoll/prefs/ssearchAutoPhrase", Bool, false);
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", ,
""); "");
@ -216,7 +215,7 @@ void rwSettings(bool writing)
prefs.allExtraDbs.end()) prefs.allExtraDbs.end())
continue; continue;
if (!Rcl::Db::testDbDir(dbdir)) { if (!Rcl::Db::testDbDir(dbdir)) {
LOGERR(("Not a xapian database: [%s]\n", dbdir.c_str())); LOGERR(("Not a xapian index: [%s]\n", dbdir.c_str()));
continue; continue;
} }
prefs.allExtraDbs.push_back(dbdir); prefs.allExtraDbs.push_back(dbdir);

View File

@ -17,7 +17,7 @@
#ifndef _GUIUTILS_H_INCLUDED_ #ifndef _GUIUTILS_H_INCLUDED_
#define _GUIUTILS_H_INCLUDED_ #define _GUIUTILS_H_INCLUDED_
/* /*
* @(#$Id: guiutils.h,v 1.10 2006-09-13 15:31:06 dockes Exp $ (C) 2005 Jean-Francois Dockes * @(#$Id: guiutils.h,v 1.11 2006-09-15 16:49:27 dockes Exp $ (C) 2005 Jean-Francois Dockes
* jean-francois.dockes@wanadoo.fr * jean-francois.dockes@wanadoo.fr
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -66,7 +66,7 @@ class PrefsPack {
bool queryReplaceAbstract; bool queryReplaceAbstract;
bool startWithAdvSearchOpen; bool startWithAdvSearchOpen;
bool startWithSortToolOpen; bool startWithSortToolOpen;
// Extra query databases. This are encoded to base64 before storing // Extra query indexes. This are encoded to base64 before storing
// to the qt settings file to avoid any bin string/ charset conv issues // to the qt settings file to avoid any bin string/ charset conv issues
list<string> allExtraDbs; list<string> allExtraDbs;
list<string> activeExtraDbs; list<string> activeExtraDbs;

View File

@ -3,21 +3,36 @@ LANGUAGE = C++
CONFIG += qt warn_on thread release debug CONFIG += qt warn_on thread release debug
HEADERS += rclmain.h rclreslist.h HEADERS += \
advsearch_w.h \
preview_w.h \
rclmain.h \
rclreslist.h \
sort_w.h \
ssearch_w.h \
uiprefs_w.h
SOURCES += main.cpp \
rclmain.cpp \ SOURCES += \
idxthread.cpp \
plaintorich.cpp \
guiutils.cpp \ guiutils.cpp \
rclreslist.cpp idxthread.cpp \
main.cpp \
plaintorich.cpp \
rclmain.cpp \
rclreslist.cpp \
advsearch_w.cpp \
preview_w.cpp \
sort_w.cpp \
ssearch_w.cpp \
uiprefs_w.cpp
FORMS = recollmain.ui \ FORMS = \
advsearch.ui \ advsearch.ui \
preview.ui \ preview.ui \
recollmain.ui \
sort.ui \ sort.ui \
uiprefs.ui \ ssearchb.ui \
ssearchb.ui uiprefs.ui
IMAGES = images/asearch.png \ IMAGES = images/asearch.png \
images/history.png \ images/history.png \

View File

@ -260,6 +260,20 @@
<string>A search for [rolling stones] (2 terms) will be changed to [rolling or stones or (rolling phrase 2 stones)].</string> <string>A search for [rolling stones] (2 terms) will be changed to [rolling or stones or (rolling phrase 2 stones)].</string>
</property> </property>
</widget> </widget>
<widget class="Line">
<property name="name">
<cstring>line2</cstring>
</property>
<property name="frameShape">
<enum>HLine</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
</widget>
<widget class="QCheckBox"> <widget class="QCheckBox">
<property name="name"> <property name="name">
<cstring>buildAbsCB</cstring> <cstring>buildAbsCB</cstring>
@ -400,7 +414,7 @@ May be slow for big documents.</string>
<cstring>ExtraDb</cstring> <cstring>ExtraDb</cstring>
</property> </property>
<attribute name="title"> <attribute name="title">
<string>External Databases</string> <string>External Indexes</string>
</attribute> </attribute>
<vbox> <vbox>
<property name="name"> <property name="name">
@ -422,10 +436,10 @@ May be slow for big documents.</string>
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Add database</string> <string>Add index</string>
</property> </property>
<property name="toolTip" stdset="0"> <property name="toolTip" stdset="0">
<string>Select the xapiandb directory for the database you want to add, then click Add Database</string> <string>Select the xapiandb directory for the index you want to add, then click Add Index</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="QLineEdit">
@ -439,7 +453,7 @@ May be slow for big documents.</string>
</size> </size>
</property> </property>
<property name="toolTip" stdset="0"> <property name="toolTip" stdset="0">
<string>Select the xapiandb directory for the database you want to add, then click Add Database</string> <string>Select the xapiandb directory for the index you want to add, then click Add Index</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="QPushButton">
@ -450,7 +464,7 @@ May be slow for big documents.</string>
<string>Browse</string> <string>Browse</string>
</property> </property>
<property name="toolTip" stdset="0"> <property name="toolTip" stdset="0">
<string>Select the xapiandb directory for the database you want to add, then click Add Database</string> <string>Select the xapiandb directory for the index you want to add, then click Add Index</string>
</property> </property>
</widget> </widget>
</hbox> </hbox>
@ -476,10 +490,10 @@ May be slow for big documents.</string>
<cstring>textLabel2_2</cstring> <cstring>textLabel2_2</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>All databases</string> <string>All indexes</string>
</property> </property>
<property name="toolTip" stdset="0"> <property name="toolTip" stdset="0">
<string>Databases currently not used</string> <string>Indexes currently not used</string>
</property> </property>
</widget> </widget>
<widget class="QListBox"> <widget class="QListBox">
@ -580,10 +594,10 @@ May be slow for big documents.</string>
<cstring>textLabel5</cstring> <cstring>textLabel5</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Active databases</string> <string>Active indexes</string>
</property> </property>
<property name="toolTip" stdset="0"> <property name="toolTip" stdset="0">
<string>Databases that will be searched in addition to the main one</string> <string>Indexes that will be searched in addition to the main one</string>
</property> </property>
</widget> </widget>
<widget class="QListBox"> <widget class="QListBox">

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: uiprefs_w.cpp,v 1.5 2006-09-13 15:31:07 dockes Exp $ (C) 2005 J.F.Dockes"; static char rcsid[] = "@(#$Id: uiprefs_w.cpp,v 1.6 2006-09-15 16:49:27 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
@ -105,7 +105,7 @@ void UIPrefsDialog::init()
} }
replAbsCB->setChecked(prefs.queryReplaceAbstract); replAbsCB->setChecked(prefs.queryReplaceAbstract);
// Initialize the extra databases listboxes // Initialize the extra indexes listboxes
QStringList ql; QStringList ql;
for (list<string>::iterator it = prefs.allExtraDbs.begin(); for (list<string>::iterator it = prefs.allExtraDbs.begin();
it != prefs.allExtraDbs.end(); it++) { it != prefs.allExtraDbs.end(); it++) {
@ -233,7 +233,7 @@ void UIPrefsDialog::showBrowserDialog()
} }
//////////////////////////////////////////// ////////////////////////////////////////////
// External / extra search databases setup // External / extra search indexes setup
// TBD: a way to remove entry from 'all' list (del button?) // TBD: a way to remove entry from 'all' list (del button?)
void UIPrefsDialog::extraDbTextChanged(const QString &text) void UIPrefsDialog::extraDbTextChanged(const QString &text)
@ -292,7 +292,7 @@ void UIPrefsDialog::delADbPB_clicked()
} }
/** /**
* Remove all extra search databases from the active list * Remove all extra search indexes from the active list
*/ */
void UIPrefsDialog::delAADbPB_clicked() void UIPrefsDialog::delAADbPB_clicked()
{ {
@ -313,7 +313,7 @@ void UIPrefsDialog::addExtraDbPB_clicked()
path_catslash(dbdir); path_catslash(dbdir);
if (!Rcl::Db::testDbDir(dbdir)) { if (!Rcl::Db::testDbDir(dbdir)) {
QMessageBox::warning(0, "Recoll", QMessageBox::warning(0, "Recoll",
tr("The selected directory does not appear to be a Xapian database")); tr("The selected directory does not appear to be a Xapian index"));
return; return;
} }
struct stat st1, st2; struct stat st1, st2;
@ -326,13 +326,13 @@ void UIPrefsDialog::addExtraDbPB_clicked()
fprintf(stderr, "rcldbdir: [%s]\n", rcldbdir.c_str()); fprintf(stderr, "rcldbdir: [%s]\n", rcldbdir.c_str());
if (st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino) { if (st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino) {
QMessageBox::warning(0, "Recoll", QMessageBox::warning(0, "Recoll",
tr("This is the main/local database!")); tr("This is the main/local index!"));
return; return;
} }
if (allDbsLB->findItem(extraDbLE->text(), if (allDbsLB->findItem(extraDbLE->text(),
Qt::CaseSensitive|Qt::ExactMatch)) { Qt::CaseSensitive|Qt::ExactMatch)) {
QMessageBox::warning(0, "Recoll", QMessageBox::warning(0, "Recoll",
tr("The selected directory is already in the database list")); tr("The selected directory is already in the index list"));
return; return;
} }
allDbsLB->insertItem(extraDbLE->text()); allDbsLB->insertItem(extraDbLE->text());
@ -345,7 +345,7 @@ void UIPrefsDialog::browseDbPB_clicked()
bool savedh = fdia.showHiddenFiles(); bool savedh = fdia.showHiddenFiles();
fdia.setShowHiddenFiles(true); fdia.setShowHiddenFiles(true);
QString s = QFileDialog::getExistingDirectory("", this, 0, QString s = QFileDialog::getExistingDirectory("", this, 0,
tr("Select directory holding xapian database (ie: /home/someone/.recoll/xapiandb)")); tr("Select xapian index directory (ie: /home/buddy/.recoll/xapiandb)"));
fdia.setShowHiddenFiles(savedh); fdia.setShowHiddenFiles(savedh);
if (s) if (s)