Switch to unified view

a/src/qtgui/preview_w.cpp b/src/qtgui/preview_w.cpp
...
...
269
    connect(searchTextCMB, SIGNAL(editTextChanged(const QString&)), 
269
    connect(searchTextCMB, SIGNAL(editTextChanged(const QString&)), 
270
        this, SLOT(searchTextChanged(const QString&)));
270
        this, SLOT(searchTextChanged(const QString&)));
271
    connect(nextButton, SIGNAL(clicked()), this, SLOT(nextPressed()));
271
    connect(nextButton, SIGNAL(clicked()), this, SLOT(nextPressed()));
272
    connect(prevButton, SIGNAL(clicked()), this, SLOT(prevPressed()));
272
    connect(prevButton, SIGNAL(clicked()), this, SLOT(prevPressed()));
273
    connect(clearPB, SIGNAL(clicked()), searchTextCMB, SLOT(clearEditText()));
273
    connect(clearPB, SIGNAL(clicked()), searchTextCMB, SLOT(clearEditText()));
274
    connect(pvTab, SIGNAL(currentChanged(QWidget *)), 
274
    connect(pvTab, SIGNAL(currentChanged(int)), 
275
        this, SLOT(currentChanged(QWidget *)));
275
        this, SLOT(currentChanged(int)));
276
    connect(bt, SIGNAL(clicked()), this, SLOT(closeCurrentTab()));
276
    connect(bt, SIGNAL(clicked()), this, SLOT(closeCurrentTab()));
277
277
278
    m_dynSearchActive = false;
278
    m_dynSearchActive = false;
279
    m_canBeep = true;
279
    m_canBeep = true;
280
    if (prefs.pvwidth > 100) {
280
    if (prefs.pvwidth > 100) {
281
    resize(prefs.pvwidth, prefs.pvheight);
281
    resize(prefs.pvwidth, prefs.pvheight);
282
    }
282
    }
283
    m_loading = false;
283
    m_loading = false;
284
    currentChanged(pvTab->currentWidget());
284
    currentChanged(pvTab->currentIndex());
285
    m_justCreated = true;
285
    m_justCreated = true;
286
}
286
}
287
287
288
void Preview::closeEvent(QCloseEvent *e)
288
void Preview::closeEvent(QCloseEvent *e)
289
{
289
{
...
...
534
    LOGDEB2(("Preview::prevPressed\n"));
534
    LOGDEB2(("Preview::prevPressed\n"));
535
    doSearch(searchTextCMB->currentText(), true, true);
535
    doSearch(searchTextCMB->currentText(), true, true);
536
}
536
}
537
537
538
// Called when user clicks on tab
538
// Called when user clicks on tab
539
void Preview::currentChanged(QWidget * tw)
539
void Preview::currentChanged(int index)
540
{
540
{
541
    LOGDEB2(("PreviewTextEdit::currentChanged\n"));
541
    LOGDEB2(("PreviewTextEdit::currentChanged\n"));
542
    QWidget *tw = pvTab->widget(index);
542
    PreviewTextEdit *edit = 
543
    PreviewTextEdit *edit = 
543
    tw->findChild<PreviewTextEdit*>("pvEdit");
544
    tw->findChild<PreviewTextEdit*>("pvEdit");
544
    LOGDEB1(("Preview::currentChanged(). Editor: %p\n", edit));
545
    LOGDEB1(("Preview::currentChanged(). Editor: %p\n", edit));
545
    
546
    
546
    if (edit == 0) {
547
    if (edit == 0) {