|
a/src/qtgui/rclmain_w.cpp |
|
b/src/qtgui/rclmain_w.cpp |
|
... |
|
... |
297 |
SortForm sf(0);
|
297 |
SortForm sf(0);
|
298 |
connect(&sf, SIGNAL(sortDataChanged(DocSeqSortSpec)),
|
298 |
connect(&sf, SIGNAL(sortDataChanged(DocSeqSortSpec)),
|
299 |
resList, SLOT(setSortParams(DocSeqSortSpec)));
|
299 |
resList, SLOT(setSortParams(DocSeqSortSpec)));
|
300 |
// Have to call setdata again after sig connected...
|
300 |
// Have to call setdata again after sig connected...
|
301 |
sf.setData();
|
301 |
sf.setData();
|
|
|
302 |
}
|
|
|
303 |
}
|
|
|
304 |
|
|
|
305 |
// This is called by a timer right after we come up. Try to open
|
|
|
306 |
// the database and talk to the user if we can't
|
|
|
307 |
void RclMain::initDbOpen()
|
|
|
308 |
{
|
|
|
309 |
bool needindexconfig = false;
|
|
|
310 |
bool nodb = false;
|
|
|
311 |
string reason;
|
|
|
312 |
if (!maybeOpenDb(reason)) {
|
|
|
313 |
nodb = true;
|
|
|
314 |
switch (QMessageBox::
|
|
|
315 |
#if (QT_VERSION >= 0x030200)
|
|
|
316 |
question
|
|
|
317 |
#else
|
|
|
318 |
information
|
|
|
319 |
#endif
|
|
|
320 |
(this, "Recoll",
|
|
|
321 |
qApp->translate("Main", "Could not open database in ") +
|
|
|
322 |
QString::fromLocal8Bit(rclconfig->getDbDir().c_str()) +
|
|
|
323 |
qApp->translate("Main",
|
|
|
324 |
".\n"
|
|
|
325 |
"Click Cancel if you want to edit the configuration file before indexation starts, or Ok to let it proceed."),
|
|
|
326 |
"Ok", "Cancel", 0, 0)) {
|
|
|
327 |
|
|
|
328 |
case 0: // Ok: indexing is going to start.
|
|
|
329 |
start_indexing(true);
|
|
|
330 |
break;
|
|
|
331 |
|
|
|
332 |
case 1: // Cancel
|
|
|
333 |
needindexconfig = true;
|
|
|
334 |
break;
|
|
|
335 |
}
|
|
|
336 |
}
|
|
|
337 |
|
|
|
338 |
if (needindexconfig) {
|
|
|
339 |
startIndexingAfterConfig = 1;
|
|
|
340 |
showIndexConfig();
|
|
|
341 |
} else {
|
|
|
342 |
if (prefs.startWithAdvSearchOpen)
|
|
|
343 |
showAdvSearchDialog();
|
|
|
344 |
if (prefs.startWithSortToolOpen)
|
|
|
345 |
showSortDialog();
|
|
|
346 |
// If we have something in the search entry, it comes from a
|
|
|
347 |
// command line argument
|
|
|
348 |
if (!nodb && sSearch->hasSearchString())
|
|
|
349 |
QTimer::singleShot(0, sSearch, SLOT(startSimpleSearch()));
|
302 |
}
|
350 |
}
|
303 |
}
|
351 |
}
|
304 |
|
352 |
|
305 |
void RclMain::setStemLang(int id)
|
353 |
void RclMain::setStemLang(int id)
|
306 |
{
|
354 |
{
|