add allTerms checkbutton, save state in settings
This commit is contained in:
parent
4682f9be9b
commit
315f8cdb33
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: main.cpp,v 1.22 2005-12-13 12:42:59 dockes Exp $ (C) 2005 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: main.cpp,v 1.23 2005-12-13 17:20:46 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -12,6 +12,7 @@ static char rcsid[] = "@(#$Id: main.cpp,v 1.22 2005-12-13 12:42:59 dockes Exp $
|
|||||||
#include <qtimer.h>
|
#include <qtimer.h>
|
||||||
#include <qmessagebox.h>
|
#include <qmessagebox.h>
|
||||||
#include <qsettings.h>
|
#include <qsettings.h>
|
||||||
|
#include <qcheckbox.h>
|
||||||
|
|
||||||
|
|
||||||
#include "rcldb.h"
|
#include "rcldb.h"
|
||||||
@ -76,6 +77,8 @@ void recollCleanup()
|
|||||||
settings.setPath("Recoll.org", "Recoll");
|
settings.setPath("Recoll.org", "Recoll");
|
||||||
settings.writeEntry( "/Recoll/geometry/width", width);
|
settings.writeEntry( "/Recoll/geometry/width", width);
|
||||||
settings.writeEntry("/Recoll/geometry/height", height);
|
settings.writeEntry("/Recoll/geometry/height", height);
|
||||||
|
settings.writeEntry("/Recoll/prefs/simpleSearchAll",
|
||||||
|
mainWindow->allTermsCB->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_idxthread();
|
stop_idxthread();
|
||||||
@ -114,13 +117,14 @@ int main( int argc, char ** argv )
|
|||||||
settings.setPath("Recoll.org", "Recoll");
|
settings.setPath("Recoll.org", "Recoll");
|
||||||
int width = settings.readNumEntry( "/Recoll/geometry/width", 590);
|
int width = settings.readNumEntry( "/Recoll/geometry/width", 590);
|
||||||
int height = settings.readNumEntry( "/Recoll/geometry/height", 810);
|
int height = settings.readNumEntry( "/Recoll/geometry/height", 810);
|
||||||
|
bool ssall = settings.readBoolEntry( "/Recoll/prefs/simpleSearchAll", 0);
|
||||||
QSize s(width, height);
|
QSize s(width, height);
|
||||||
|
|
||||||
// Create main window and set its size to previous session's
|
// Create main window and set its size to previous session's
|
||||||
RecollMain w;
|
RecollMain w;
|
||||||
mainWindow = &w;
|
mainWindow = &w;
|
||||||
w.resize(s);
|
w.resize(s);
|
||||||
|
w.allTermsCB->setDown(ssall);
|
||||||
string reason;
|
string reason;
|
||||||
rclconfig = recollinit(recollCleanup, sigcleanup, reason);
|
rclconfig = recollinit(recollCleanup, sigcleanup, reason);
|
||||||
if (!rclconfig || !rclconfig->ok()) {
|
if (!rclconfig || !rclconfig->ok()) {
|
||||||
|
|||||||
@ -74,6 +74,17 @@
|
|||||||
<string>Search</string>
|
<string>Search</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QCheckBox">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>allTermsCB</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&All terms</string>
|
||||||
|
</property>
|
||||||
|
<property name="accel">
|
||||||
|
<string>Alt+A</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
<widget class="QLineEdit">
|
<widget class="QLineEdit">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>queryText</cstring>
|
<cstring>queryText</cstring>
|
||||||
@ -154,21 +165,21 @@
|
|||||||
<cstring>Toolbar</cstring>
|
<cstring>Toolbar</cstring>
|
||||||
</property>
|
</property>
|
||||||
<property name="label">
|
<property name="label">
|
||||||
<string>Toolbar</string>
|
<string>Search tools</string>
|
||||||
</property>
|
</property>
|
||||||
<action name="prevPageAction"/>
|
<action name="toolsAdvanced_SearchAction"/>
|
||||||
<action name="nextPageAction"/>
|
<action name="toolsSort_parametersAction"/>
|
||||||
|
<action name="toolsDoc_HistoryAction"/>
|
||||||
</toolbar>
|
</toolbar>
|
||||||
<toolbar dock="2">
|
<toolbar dock="2">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>Toolbar1</cstring>
|
<cstring>Toolbar1</cstring>
|
||||||
</property>
|
</property>
|
||||||
<property name="label">
|
<property name="label">
|
||||||
<string>Tools</string>
|
<string>Result list</string>
|
||||||
</property>
|
</property>
|
||||||
<action name="toolsAdvanced_SearchAction"/>
|
<action name="prevPageAction"/>
|
||||||
<action name="toolsSort_parametersAction"/>
|
<action name="nextPageAction"/>
|
||||||
<action name="toolsDoc_HistoryAction"/>
|
|
||||||
</toolbar>
|
</toolbar>
|
||||||
</toolbars>
|
</toolbars>
|
||||||
<actions>
|
<actions>
|
||||||
|
|||||||
@ -29,6 +29,7 @@ using std::pair;
|
|||||||
#include <qstatusbar.h>
|
#include <qstatusbar.h>
|
||||||
#include <qwindowdefs.h>
|
#include <qwindowdefs.h>
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
|
#include <qcheckbox.h>
|
||||||
|
|
||||||
#include "recoll.h"
|
#include "recoll.h"
|
||||||
#include "debuglog.h"
|
#include "debuglog.h"
|
||||||
@ -389,7 +390,11 @@ void RecollMain::startSimpleSearch()
|
|||||||
Rcl::AdvSearchData sdata;
|
Rcl::AdvSearchData sdata;
|
||||||
|
|
||||||
QCString u8 = queryText->text().utf8();
|
QCString u8 = queryText->text().utf8();
|
||||||
sdata.orwords = u8;
|
if (allTermsCB->isChecked())
|
||||||
|
sdata.allwords = u8;
|
||||||
|
else
|
||||||
|
sdata.orwords = u8;
|
||||||
|
|
||||||
startAdvSearch(sdata);
|
startAdvSearch(sdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user