*** empty log message ***

This commit is contained in:
dockes
2005-02-01 08:42:56 +00:00
parent a93e619960
commit cc512e2ec0
11 changed files with 246 additions and 186 deletions
+7 -4
View File
@@ -3,6 +3,7 @@
#include "indexer.h"
#include "debuglog.h"
#include "idxthread.h"
class IdxThread : public QThread {
virtual void run();
@@ -11,9 +12,10 @@ class IdxThread : public QThread {
};
int startindexing;
int indexingdone;
bool indexingstatus;
int stopidxthread;
int indexingdone = 1;
bool indexingstatus = false;
static int stopidxthread;
void IdxThread::run()
{
@@ -24,9 +26,10 @@ void IdxThread::run()
return;
}
if (startindexing) {
indexingdone = indexingstatus = startindexing = 0;
indexingdone = indexingstatus = 0;
fprintf(stderr, "Index thread :start index\n");
indexingstatus = indexer->index();
startindexing = 0;
indexingdone = 1;
}
msleep(100);
+2 -4
View File
@@ -9,13 +9,12 @@
#include "rcldb.h"
#include "rclconfig.h"
#include "pathut.h"
#include "recoll.h"
RclConfig *rclconfig;
Rcl::Db *rcldb;
int recollNeedsExit;
extern void start_idxthread(RclConfig *cnf);
extern void stop_idxthread();
extern int startindexing;
void recollCleanup()
{
@@ -26,7 +25,6 @@ void recollCleanup()
rclconfig = 0;
}
int recollNeedsExit;
static void sigcleanup(int sig)
{
+166 -138
View File
@@ -29,156 +29,157 @@
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout10</cstring>
<cstring>layout3</cstring>
</property>
<vbox>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="QLineEdit">
<property name="name">
<cstring>layout8</cstring>
<cstring>queryText</cstring>
</property>
<property name="frameShape">
<enum>LineEditPanel</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLineEdit">
<property name="name">
<cstring>queryText</cstring>
</property>
<property name="frameShape">
<enum>LineEditPanel</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>Search</cstring>
</property>
<property name="text">
<string>Search</string>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>listPrevPb</cstring>
</property>
<property name="text">
<string>Previous page</string>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>listNextPB</cstring>
</property>
<property name="text">
<string>Next page</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>346</width>
<height>20</height>
</size>
</property>
</spacer>
</hbox>
</widget>
<widget class="QSplitter">
<widget class="QPushButton">
<property name="name">
<cstring>splitter6</cstring>
<cstring>Search</cstring>
</property>
<property name="text">
<string>Search</string>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>clearqPB</cstring>
</property>
<property name="text">
<string>Clear</string>
</property>
<property name="accel">
<string>Ctrl+S</string>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>listPrevPb</cstring>
</property>
<property name="text">
<string>Previous page</string>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>listNextPB</cstring>
</property>
<property name="text">
<string>Next page</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<widget class="QTextEdit">
<property name="name">
<cstring>reslistTE</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QSplitter">
<property name="name">
<cstring>splitter5</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>5</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<widget class="QTextEdit">
<property name="name">
<cstring>previewTextEdit</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QTextEdit">
<property name="name">
<cstring>metaTextEdit</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>346</width>
<height>20</height>
</size>
</property>
</spacer>
</hbox>
</widget>
<widget class="QSplitter">
<property name="name">
<cstring>splitter6</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<widget class="QTextEdit">
<property name="name">
<cstring>reslistTE</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QSplitter">
<property name="name">
<cstring>splitter5</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>5</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<widget class="QTextEdit">
<property name="name">
<cstring>previewTextEdit</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</vbox>
<widget class="QTextEdit">
<property name="name">
<cstring>metaTextEdit</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget>
</widget>
</vbox>
</widget>
@@ -189,6 +190,8 @@
<item text="&amp;File" name="fileMenu">
<separator/>
<separator/>
<action name="fileStart_IndexingAction"/>
<separator/>
<action name="fileExitAction"/>
</item>
<item text="&amp;Help" name="helpMenu">
@@ -212,6 +215,17 @@
<string></string>
</property>
</action>
<action>
<property name="name">
<cstring>fileStart_IndexingAction</cstring>
</property>
<property name="text">
<string>Start Indexing</string>
</property>
<property name="menuText">
<string>Start Indexing</string>
</property>
</action>
</actions>
<connections>
<connection>
@@ -256,6 +270,18 @@
<receiver>RecollMain</receiver>
<slot>reslistTE_clicked(int,int)</slot>
</connection>
<connection>
<sender>fileStart_IndexingAction</sender>
<signal>activated()</signal>
<receiver>RecollMain</receiver>
<slot>fileStart_IndexingAction_activated()</slot>
</connection>
<connection>
<sender>clearqPB</sender>
<signal>clicked()</signal>
<receiver>RecollMain</receiver>
<slot>clearqPB_clicked()</slot>
</connection>
</connections>
<includes>
<include location="local" impldecl="in implementation">recollmain.ui.h</include>
@@ -267,10 +293,12 @@
<slots>
<slot>fileExit()</slot>
<slot>checkExit()</slot>
<slot>reslistTE_doubleClicked( int par, int car )</slot>
<slot>fileStart_IndexingAction_activated()</slot>
<slot>reslistTE_doubleClicked( int par, int )</slot>
<slot>reslistTE_clicked( int par, int car )</slot>
<slot>queryText_returnPressed()</slot>
<slot>Search_clicked()</slot>
<slot>clearqPB_clicked()</slot>
<slot>listPrevPB_clicked()</slot>
<slot>listNextPB_clicked()</slot>
</slots>
+21 -6
View File
@@ -23,24 +23,34 @@
#include "debuglog.h"
#include "mimehandler.h"
#include "pathut.h"
#include "recoll.h"
extern RclConfig *rclconfig;
extern Rcl::Db *rcldb;
extern void recollCleanup();
void RecollMain::fileExit()
{
LOGDEB(("RecollMain: fileExit\n"));
exit(0);
}
extern int recollNeedsExit;
// Misnomer. This is called on a 100ms timer and actually checks for different
// things apart from a need to exit
void RecollMain::checkExit()
{
if (indexingstatus) {
indexingstatus = false;
// Make sure we reopen the db to get the results.
fprintf(stderr, "Indexing done: closing query database\n");
rcldb->close();
}
if (recollNeedsExit)
fileExit();
}
void RecollMain::fileStart_IndexingAction_activated()
{
if (indexingdone == 1)
startindexing = 1;
}
static string plaintorich(const string &in)
{
string out = "<qt><head><title></title></head><body><p>";
@@ -60,7 +70,7 @@ static string urltolocalpath(string url)
}
// Use external viewer to display file
void RecollMain::reslistTE_doubleClicked(int par, int car)
void RecollMain::reslistTE_doubleClicked(int par, int)
{
// restlistTE_clicked(par, car);
Rcl::Doc doc;
@@ -215,6 +225,10 @@ void RecollMain::Search_clicked()
queryText_returnPressed();
}
void RecollMain::clearqPB_clicked()
{
queryText->clear();
}
static const int respagesize = 10;
void RecollMain::listPrevPB_clicked()
@@ -307,3 +321,4 @@ void RecollMain::listNextPB_clicked()
}
}