Switch to unified view

a/src/qtgui/rclmain_w.cpp b/src/qtgui/rclmain_w.cpp
...
...
1552
    }
1552
    }
1553
    exefile.clear();
1553
    exefile.clear();
1554
    return false;
1554
    return false;
1555
}
1555
}
1556
1556
1557
void RclMain::newDupsW(const Rcl::Doc, const vector<Rcl::Doc> dups)
1558
{
1559
    ListDialog dialog;
1560
    dialog.setWindowTitle(tr("Duplicate documents"));
1561
1562
    dialog.groupBox->setTitle(tr("These Urls ( | ipath) share the same"
1563
               " content:"));
1564
    // We replace the list with an editor so that the user can copy/paste
1565
    delete dialog.listWidget;
1566
    QTextEdit *editor = new QTextEdit(dialog.groupBox);
1567
    editor->setReadOnly(TRUE);
1568
    dialog.horizontalLayout->addWidget(editor);
1569
1570
    for (vector<Rcl::Doc>::const_iterator it = dups.begin(); 
1571
   it != dups.end(); it++) {
1572
  if (it->ipath.empty()) 
1573
      editor->append(QString::fromLocal8Bit(it->url.c_str()));
1574
  else 
1575
      editor->append(QString::fromLocal8Bit(it->url.c_str()) + " | " +
1576
             QString::fromUtf8(it->ipath.c_str()));
1577
    }
1578
    editor->moveCursor(QTextCursor::Start);
1579
    editor->ensureCursorVisible();
1580
    dialog.exec();
1581
}
1582
1557
void RclMain::showSnippets(Rcl::Doc doc)
1583
void RclMain::showSnippets(Rcl::Doc doc)
1558
{
1584
{
1559
    SnippetsW *sp = new SnippetsW(doc, m_source);
1585
    SnippetsW *sp = new SnippetsW(doc, m_source);
1560
    connect(sp, SIGNAL(startNativeViewer(Rcl::Doc, int, QString)),
1586
    connect(sp, SIGNAL(startNativeViewer(Rcl::Doc, int, QString)),
1561
        this, SLOT(startNativeViewer(Rcl::Doc, int, QString)));
1587
        this, SLOT(startNativeViewer(Rcl::Doc, int, QString)));