recoll GUI: add menu option to retry failed files
This commit is contained in:
parent
1e6f56522e
commit
7876fba5f7
@ -60,11 +60,20 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusbar"/>
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
<widget class="QMenuBar" name="MenuBar">
|
<widget class="QMenuBar" name="MenuBar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
<widget class="QMenu" name="fileMenu">
|
<widget class="QMenu" name="fileMenu">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&File</string>
|
<string>&File</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="fileToggleIndexingAction"/>
|
<addaction name="fileToggleIndexingAction"/>
|
||||||
|
<addaction name="fileRetryFailedAction"/>
|
||||||
<addaction name="fileRebuildIndexAction"/>
|
<addaction name="fileRebuildIndexAction"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="fileEraseSearchHistoryAction"/>
|
<addaction name="fileEraseSearchHistoryAction"/>
|
||||||
@ -461,6 +470,20 @@
|
|||||||
<string>Query Fragments</string>
|
<string>Query Fragments</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="fileRetryFailedAction">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string> With failed files retrying</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Next update will retry previously failed files</string>
|
||||||
|
</property>
|
||||||
|
<property name="name" stdset="0">
|
||||||
|
<cstring>fileToggleIndexingAction</cstring>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="2" margin="2"/>
|
<layoutdefault spacing="2" margin="2"/>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
|||||||
@ -449,6 +449,7 @@ void RclMain::init()
|
|||||||
|
|
||||||
fileRebuildIndexAction->setEnabled(false);
|
fileRebuildIndexAction->setEnabled(false);
|
||||||
fileToggleIndexingAction->setEnabled(false);
|
fileToggleIndexingAction->setEnabled(false);
|
||||||
|
fileRetryFailedAction->setEnabled(false);
|
||||||
// Start timer on a slow period (used for checking ^C). Will be
|
// Start timer on a slow period (used for checking ^C). Will be
|
||||||
// speeded up during indexing
|
// speeded up during indexing
|
||||||
periodictimer->start(1000);
|
periodictimer->start(1000);
|
||||||
@ -793,6 +794,7 @@ void RclMain::periodic100()
|
|||||||
m_indexerState = IXST_RUNNINGMINE;
|
m_indexerState = IXST_RUNNINGMINE;
|
||||||
fileToggleIndexingAction->setText(tr("Stop &Indexing"));
|
fileToggleIndexingAction->setText(tr("Stop &Indexing"));
|
||||||
fileToggleIndexingAction->setEnabled(true);
|
fileToggleIndexingAction->setEnabled(true);
|
||||||
|
fileRetryFailedAction->setEnabled(false);
|
||||||
fileRebuildIndexAction->setEnabled(false);
|
fileRebuildIndexAction->setEnabled(false);
|
||||||
periodictimer->setInterval(200);
|
periodictimer->setInterval(200);
|
||||||
} else {
|
} else {
|
||||||
@ -800,6 +802,7 @@ void RclMain::periodic100()
|
|||||||
if (pidfile.open() == 0) {
|
if (pidfile.open() == 0) {
|
||||||
m_indexerState = IXST_NOTRUNNING;
|
m_indexerState = IXST_NOTRUNNING;
|
||||||
fileToggleIndexingAction->setText(tr("Update &Index"));
|
fileToggleIndexingAction->setText(tr("Update &Index"));
|
||||||
|
fileRetryFailedAction->setEnabled(true);
|
||||||
fileToggleIndexingAction->setEnabled(true);
|
fileToggleIndexingAction->setEnabled(true);
|
||||||
fileRebuildIndexAction->setEnabled(true);
|
fileRebuildIndexAction->setEnabled(true);
|
||||||
periodictimer->setInterval(1000);
|
periodictimer->setInterval(1000);
|
||||||
@ -808,6 +811,7 @@ void RclMain::periodic100()
|
|||||||
m_indexerState = IXST_RUNNINGNOTMINE;
|
m_indexerState = IXST_RUNNINGNOTMINE;
|
||||||
fileToggleIndexingAction->setText(tr("Stop &Indexing"));
|
fileToggleIndexingAction->setText(tr("Stop &Indexing"));
|
||||||
fileToggleIndexingAction->setEnabled(true);
|
fileToggleIndexingAction->setEnabled(true);
|
||||||
|
fileRetryFailedAction->setEnabled(false);
|
||||||
fileRebuildIndexAction->setEnabled(false);
|
fileRebuildIndexAction->setEnabled(false);
|
||||||
periodictimer->setInterval(200);
|
periodictimer->setInterval(200);
|
||||||
}
|
}
|
||||||
@ -838,7 +842,7 @@ void RclMain::periodic100()
|
|||||||
fileExit();
|
fileExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This gets called when the "update iindex" action is activated. It executes
|
// This gets called when the "update index" action is activated. It executes
|
||||||
// the requested action, and disables the menu entry. This will be
|
// the requested action, and disables the menu entry. This will be
|
||||||
// re-enabled by the indexing status check
|
// re-enabled by the indexing status check
|
||||||
void RclMain::toggleIndexing()
|
void RclMain::toggleIndexing()
|
||||||
@ -885,6 +889,8 @@ void RclMain::toggleIndexing()
|
|||||||
vector<string> args;
|
vector<string> args;
|
||||||
args.push_back("-c");
|
args.push_back("-c");
|
||||||
args.push_back(theconfig->getConfDir());
|
args.push_back(theconfig->getConfDir());
|
||||||
|
if (fileRetryFailedAction->isChecked())
|
||||||
|
args.push_back("-k");
|
||||||
m_idxproc = new ExecCmd;
|
m_idxproc = new ExecCmd;
|
||||||
m_idxproc->startExec("recollindex", args, false, false);
|
m_idxproc->startExec("recollindex", args, false, false);
|
||||||
}
|
}
|
||||||
@ -1529,6 +1535,7 @@ void RclMain::updateIdxForDocs(vector<Rcl::Doc>& docs)
|
|||||||
fileToggleIndexingAction->setText(tr("Stop &Indexing"));
|
fileToggleIndexingAction->setText(tr("Stop &Indexing"));
|
||||||
}
|
}
|
||||||
fileToggleIndexingAction->setEnabled(false);
|
fileToggleIndexingAction->setEnabled(false);
|
||||||
|
fileRetryFailedAction->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user