Switch to unified view

a/src/qtgui/rclmain_w.cpp b/src/qtgui/rclmain_w.cpp
...
...
701
    }
701
    }
702
    }       
702
    }       
703
    break;
703
    break;
704
    case IXST_NOTRUNNING:
704
    case IXST_NOTRUNNING:
705
    {
705
    {
706
    list<string> args;
706
    vector<string> args;
707
    args.push_back("-c");
707
    args.push_back("-c");
708
    args.push_back(theconfig->getConfDir());
708
    args.push_back(theconfig->getConfDir());
709
    m_idxproc = new ExecCmd;
709
    m_idxproc = new ExecCmd;
710
    m_idxproc->startExec("recollindex", args, false, false);
710
    m_idxproc->startExec("recollindex", args, false, false);
711
    }
711
    }
...
...
727
                    "from scratch ?"),
727
                    "from scratch ?"),
728
                     QMessageBox::Ok,
728
                     QMessageBox::Ok,
729
                     QMessageBox::Cancel,
729
                     QMessageBox::Cancel,
730
                     QMessageBox::NoButton);
730
                     QMessageBox::NoButton);
731
    if (rep == QMessageBox::Ok) {
731
    if (rep == QMessageBox::Ok) {
732
        list<string> args;
732
        vector<string> args;
733
        args.push_back("-c");
733
        args.push_back("-c");
734
        args.push_back(theconfig->getConfDir());
734
        args.push_back(theconfig->getConfDir());
735
        args.push_back("-z");
735
        args.push_back("-z");
736
        m_idxproc = new ExecCmd;
736
        m_idxproc = new ExecCmd;
737
        m_idxproc->startExec("recollindex", args, false, false);
737
        m_idxproc->startExec("recollindex", args, false, false);
...
...
1254
    return;
1254
    return;
1255
    }
1255
    }
1256
    
1256
    
1257
    vector<string> paths;
1257
    vector<string> paths;
1258
    if (ConfIndexer::docsToPaths(docs, paths)) {
1258
    if (ConfIndexer::docsToPaths(docs, paths)) {
1259
    list<string> args;
1259
    vector<string> args;
1260
    args.push_back("-c");
1260
    args.push_back("-c");
1261
    args.push_back(theconfig->getConfDir());
1261
    args.push_back(theconfig->getConfDir());
1262
    args.push_back("-i");
1262
    args.push_back("-i");
1263
    args.insert(args.end(), paths.begin(), paths.end());
1263
    args.insert(args.end(), paths.begin(), paths.end());
1264
    m_idxproc = new ExecCmd;
1264
    m_idxproc = new ExecCmd;
...
...
1520
    bool ignoreipath = false;
1520
    bool ignoreipath = false;
1521
    if (attrs.get("ignoreipath", cmdplusattr))
1521
    if (attrs.get("ignoreipath", cmdplusattr))
1522
        ignoreipath = stringToBool(cmdplusattr);
1522
        ignoreipath = stringToBool(cmdplusattr);
1523
1523
1524
    // Split the command line
1524
    // Split the command line
1525
    list<string> lcmd;
1525
    vector<string> lcmd;
1526
    if (!stringToStrings(cmd, lcmd)) {
1526
    if (!stringToStrings(cmd, lcmd)) {
1527
    QMessageBox::warning(0, "Recoll", 
1527
    QMessageBox::warning(0, "Recoll", 
1528
                 tr("Bad viewer command line for %1: [%2]\n"
1528
                 tr("Bad viewer command line for %1: [%2]\n"
1529
                "Please check the mimeconf file")
1529
                "Please check the mimeconf file")
1530
                 .arg(QString::fromAscii(doc.mimetype.c_str()))
1530
                 .arg(QString::fromAscii(doc.mimetype.c_str()))
...
...
1631
            url = string("file://") + fn;
1631
            url = string("file://") + fn;
1632
        }
1632
        }
1633
    }
1633
    }
1634
1634
1635
    // Get rid of the command name. lcmd is now argv[1...n]
1635
    // Get rid of the command name. lcmd is now argv[1...n]
1636
    lcmd.pop_front();
1636
    lcmd.erase(lcmd.begin());
1637
1637
1638
    // Substitute %xx inside arguments
1638
    // Substitute %xx inside arguments
1639
    string efftime;
1639
    string efftime;
1640
    if (!doc.dmtime.empty() || !doc.fmtime.empty()) {
1640
    if (!doc.dmtime.empty() || !doc.fmtime.empty()) {
1641
        efftime = doc.dmtime.empty() ? doc.fmtime : doc.dmtime;
1641
        efftime = doc.dmtime.empty() ? doc.fmtime : doc.dmtime;
...
...
1656
    for (map<string,string>::const_iterator it = doc.meta.begin();
1656
    for (map<string,string>::const_iterator it = doc.meta.begin();
1657
         it != doc.meta.end(); it++) {
1657
         it != doc.meta.end(); it++) {
1658
        subs[it->first] = it->second;
1658
        subs[it->first] = it->second;
1659
    }
1659
    }
1660
    string ncmd;
1660
    string ncmd;
1661
    for (list<string>::iterator it = lcmd.begin(); 
1661
    for (vector<string>::iterator it = lcmd.begin(); 
1662
         it != lcmd.end(); it++) {
1662
         it != lcmd.end(); it++) {
1663
        pcSubst(*it, ncmd, subs);
1663
        pcSubst(*it, ncmd, subs);
1664
        LOGDEB(("%s->%s\n", it->c_str(), ncmd.c_str()));
1664
        LOGDEB(("%s->%s\n", it->c_str(), ncmd.c_str()));
1665
        *it = ncmd;
1665
        *it = ncmd;
1666
    }
1666
    }