Switch to unified view

a/src/qtgui/uiprefs_w.cpp b/src/qtgui/uiprefs_w.cpp
...
...
55
    m_viewAction = 0;
55
    m_viewAction = 0;
56
56
57
    connect(viewActionPB, SIGNAL(clicked()), this, SLOT(showViewAction()));
57
    connect(viewActionPB, SIGNAL(clicked()), this, SLOT(showViewAction()));
58
    connect(reslistFontPB, SIGNAL(clicked()), this, SLOT(showFontDialog()));
58
    connect(reslistFontPB, SIGNAL(clicked()), this, SLOT(showFontDialog()));
59
    connect(resetFontPB, SIGNAL(clicked()), this, SLOT(resetReslistFont()));
59
    connect(resetFontPB, SIGNAL(clicked()), this, SLOT(resetReslistFont()));
60
    connect(stylesheetPB, SIGNAL(clicked()), this, SLOT(showStylesheetDialog()));
61
    connect(resetSSPB, SIGNAL(clicked()), this, SLOT(resetStylesheet()));
60
62
61
    connect(addExtraDbPB, SIGNAL(clicked()), 
63
    connect(addExtraDbPB, SIGNAL(clicked()), 
62
        this, SLOT(addExtraDbPB_clicked()));
64
        this, SLOT(addExtraDbPB_clicked()));
63
    connect(delExtraDbPB, SIGNAL(clicked()), 
65
    connect(delExtraDbPB, SIGNAL(clicked()), 
64
        this, SLOT(delExtraDbPB_clicked()));
66
        this, SLOT(delExtraDbPB_clicked()));
...
...
114
                   s.setNum(this->font().pointSize()));
116
                   s.setNum(this->font().pointSize()));
115
    } else {
117
    } else {
116
    reslistFontPB->setText(reslistFontFamily + "-" +
118
    reslistFontPB->setText(reslistFontFamily + "-" +
117
                   s.setNum(reslistFontSize));
119
                   s.setNum(reslistFontSize));
118
    }
120
    }
121
122
    // Style sheet
123
    stylesheetFile = prefs.stylesheetFile;
124
    if (stylesheetFile.isEmpty()) {
125
  stylesheetPB->setText(tr("Choose"));
126
    } else {
127
  string nm = path_getsimple((const char *)stylesheetFile.toLocal8Bit());
128
  stylesheetPB->setText(QString::fromLocal8Bit(nm.c_str()));
129
    }
130
119
    rlfTE->setPlainText(prefs.reslistformat);
131
    rlfTE->setPlainText(prefs.reslistformat);
120
132
121
    // Stemming language combobox
133
    // Stemming language combobox
122
    stemLangCMB->clear();
134
    stemLangCMB->clear();
123
    stemLangCMB->addItem(g_stringNoStem);
135
    stemLangCMB->addItem(g_stringNoStem);
...
...
183
    prefs.qtermcolor = qtermColorLE->text();
195
    prefs.qtermcolor = qtermColorLE->text();
184
    prefs.abssep = abssepLE->text();
196
    prefs.abssep = abssepLE->text();
185
197
186
    prefs.reslistfontfamily = reslistFontFamily;
198
    prefs.reslistfontfamily = reslistFontFamily;
187
    prefs.reslistfontsize = reslistFontSize;
199
    prefs.reslistfontsize = reslistFontSize;
200
    prefs.stylesheetFile = stylesheetFile;
188
    prefs.reslistformat =  rlfTE->toPlainText();
201
    prefs.reslistformat =  rlfTE->toPlainText();
189
    if (prefs.reslistformat.trimmed().isEmpty()) {
202
    if (prefs.reslistformat.trimmed().isEmpty()) {
190
    prefs.reslistformat = prefs.dfltResListFormat;
203
    prefs.reslistformat = prefs.dfltResListFormat;
191
    rlfTE->setPlainText(prefs.reslistformat);
204
    rlfTE->setPlainText(prefs.reslistformat);
192
    }
205
    }
206
193
    prefs.creslistformat = (const char*)prefs.reslistformat.toUtf8();
207
    prefs.creslistformat = (const char*)prefs.reslistformat.toUtf8();
194
208
195
    if (stemLangCMB->currentIndex() == 0) {
209
    if (stemLangCMB->currentIndex() == 0) {
196
    prefs.queryStemLang = "";
210
    prefs.queryStemLang = "";
197
    } else if (stemLangCMB->currentIndex() == 1) {
211
    } else if (stemLangCMB->currentIndex() == 1) {
...
...
287
        reslistFontSize = 0;
301
        reslistFontSize = 0;
288
    }
302
    }
289
    }
303
    }
290
}
304
}
291
305
306
void UIPrefsDialog::showStylesheetDialog()
307
{
308
    stylesheetFile = myGetFileName(false, "Select stylesheet file", true);
309
    string nm = path_getsimple((const char *)stylesheetFile.toLocal8Bit());
310
    stylesheetPB->setText(QString::fromLocal8Bit(nm.c_str()));
311
}
312
313
void UIPrefsDialog::resetStylesheet()
314
{
315
    stylesheetFile = "";
316
    stylesheetPB->setText(tr("Choose"));
317
}
318
292
void UIPrefsDialog::resetReslistFont()
319
void UIPrefsDialog::resetReslistFont()
293
{
320
{
294
    reslistFontFamily = "";
321
    reslistFontFamily = "";
295
    reslistFontSize = 0;
322
    reslistFontSize = 0;
296
    reslistFontPB->setText(this->font().family() + "-" +
323
    reslistFontPB->setText(this->font().family() + "-" +