Switch to unified view

a/src/qtgui/rclmain_w.cpp b/src/qtgui/rclmain_w.cpp
...
...
447
        m_trayicon = 0;
447
        m_trayicon = 0;
448
    }
448
    }
449
449
450
    fileRebuildIndexAction->setEnabled(false);
450
    fileRebuildIndexAction->setEnabled(false);
451
    fileToggleIndexingAction->setEnabled(false);
451
    fileToggleIndexingAction->setEnabled(false);
452
    fileRetryFailedAction->setEnabled(false);
452
    // Start timer on a slow period (used for checking ^C). Will be
453
    // Start timer on a slow period (used for checking ^C). Will be
453
    // speeded up during indexing
454
    // speeded up during indexing
454
    periodictimer->start(1000);
455
    periodictimer->start(1000);
455
}
456
}
456
457
...
...
791
    IndexerState prevstate = m_indexerState;
792
    IndexerState prevstate = m_indexerState;
792
    if (m_idxproc) {
793
    if (m_idxproc) {
793
    m_indexerState = IXST_RUNNINGMINE;
794
    m_indexerState = IXST_RUNNINGMINE;
794
    fileToggleIndexingAction->setText(tr("Stop &Indexing"));
795
    fileToggleIndexingAction->setText(tr("Stop &Indexing"));
795
    fileToggleIndexingAction->setEnabled(true);
796
    fileToggleIndexingAction->setEnabled(true);
797
        fileRetryFailedAction->setEnabled(false);
796
    fileRebuildIndexAction->setEnabled(false);
798
    fileRebuildIndexAction->setEnabled(false);
797
    periodictimer->setInterval(200);
799
    periodictimer->setInterval(200);
798
    } else {
800
    } else {
799
    Pidfile pidfile(theconfig->getPidfile());
801
    Pidfile pidfile(theconfig->getPidfile());
800
    if (pidfile.open() == 0) {
802
    if (pidfile.open() == 0) {
801
        m_indexerState = IXST_NOTRUNNING;
803
        m_indexerState = IXST_NOTRUNNING;
802
        fileToggleIndexingAction->setText(tr("Update &Index"));
804
        fileToggleIndexingAction->setText(tr("Update &Index"));
805
            fileRetryFailedAction->setEnabled(true);
803
        fileToggleIndexingAction->setEnabled(true);
806
        fileToggleIndexingAction->setEnabled(true);
804
        fileRebuildIndexAction->setEnabled(true);
807
        fileRebuildIndexAction->setEnabled(true);
805
        periodictimer->setInterval(1000);
808
        periodictimer->setInterval(1000);
806
    } else {
809
    } else {
807
        // Real time or externally started batch indexer running
810
        // Real time or externally started batch indexer running
808
        m_indexerState = IXST_RUNNINGNOTMINE;
811
        m_indexerState = IXST_RUNNINGNOTMINE;
809
        fileToggleIndexingAction->setText(tr("Stop &Indexing"));
812
        fileToggleIndexingAction->setText(tr("Stop &Indexing"));
810
        fileToggleIndexingAction->setEnabled(true);
813
        fileToggleIndexingAction->setEnabled(true);
814
            fileRetryFailedAction->setEnabled(false);
811
        fileRebuildIndexAction->setEnabled(false);
815
        fileRebuildIndexAction->setEnabled(false);
812
        periodictimer->setInterval(200);
816
        periodictimer->setInterval(200);
813
    }       
817
    }       
814
    }
818
    }
815
819
...
...
836
840
837
    if (recollNeedsExit)
841
    if (recollNeedsExit)
838
    fileExit();
842
    fileExit();
839
}
843
}
840
844
841
// This gets called when the "update iindex" action is activated. It executes
845
// This gets called when the "update index" action is activated. It executes
842
// the requested action, and disables the menu entry. This will be
846
// the requested action, and disables the menu entry. This will be
843
// re-enabled by the indexing status check
847
// re-enabled by the indexing status check
844
void RclMain::toggleIndexing()
848
void RclMain::toggleIndexing()
845
{
849
{
846
    switch (m_indexerState) {
850
    switch (m_indexerState) {
...
...
883
    m_firstIndexing = !theconfig->getMissingHelperDesc(mhd);
887
    m_firstIndexing = !theconfig->getMissingHelperDesc(mhd);
884
888
885
    vector<string> args;
889
    vector<string> args;
886
    args.push_back("-c");
890
    args.push_back("-c");
887
    args.push_back(theconfig->getConfDir());
891
    args.push_back(theconfig->getConfDir());
892
        if (fileRetryFailedAction->isChecked())
893
            args.push_back("-k");
888
    m_idxproc = new ExecCmd;
894
    m_idxproc = new ExecCmd;
889
    m_idxproc->startExec("recollindex", args, false, false);
895
    m_idxproc->startExec("recollindex", args, false, false);
890
    }
896
    }
891
    break;
897
    break;
892
    case IXST_UNKNOWN:
898
    case IXST_UNKNOWN:
...
...
1527
    m_idxproc = new ExecCmd;
1533
    m_idxproc = new ExecCmd;
1528
    m_idxproc->startExec("recollindex", args, false, false);
1534
    m_idxproc->startExec("recollindex", args, false, false);
1529
    fileToggleIndexingAction->setText(tr("Stop &Indexing"));
1535
    fileToggleIndexingAction->setText(tr("Stop &Indexing"));
1530
    }
1536
    }
1531
    fileToggleIndexingAction->setEnabled(false);
1537
    fileToggleIndexingAction->setEnabled(false);
1538
    fileRetryFailedAction->setEnabled(false);
1532
}
1539
}
1533
1540
1534
/** 
1541
/** 
1535
 * Open a preview window for a given document, no linking to result list
1542
 * Open a preview window for a given document, no linking to result list
1536
 *
1543
 *