Switch to unified view

a/src/qtgui/searchclause_w.cpp b/src/qtgui/searchclause_w.cpp
...
...
117
    case 0:
117
    case 0:
118
    return new SearchDataClauseSimple(SCLT_OR, text, field);
118
    return new SearchDataClauseSimple(SCLT_OR, text, field);
119
    case 1:
119
    case 1:
120
    return new SearchDataClauseSimple(SCLT_AND, text, field);
120
    return new SearchDataClauseSimple(SCLT_AND, text, field);
121
    case 2:
121
    case 2:
122
    {
123
  SearchDataClauseSimple *cl = 
122
    return new SearchDataClauseSimple(SCLT_EXCL, text, field);
124
        new SearchDataClauseSimple(SCLT_OR, text, field);
125
  cl->setexclude(true);
126
  return cl;
127
    }
123
    case 3:
128
    case 3:
124
    return new SearchDataClauseDist(SCLT_PHRASE, text, 
129
    return new SearchDataClauseDist(SCLT_PHRASE, text, 
125
                    proxSlackSB->value(), field);
130
                    proxSlackSB->value(), field);
126
    case 4:
131
    case 4:
127
    return new SearchDataClauseDist(SCLT_NEAR, text,
132
    return new SearchDataClauseDist(SCLT_NEAR, text,
...
...
137
142
138
void SearchClauseW::setFromClause(SearchDataClauseSimple *cl)
143
void SearchClauseW::setFromClause(SearchDataClauseSimple *cl)
139
{
144
{
140
    LOGDEB(("SearchClauseW::setFromClause\n"));
145
    LOGDEB(("SearchClauseW::setFromClause\n"));
141
    switch(cl->getTp()) {
146
    switch(cl->getTp()) {
142
    case SCLT_OR: tpChange(0); break;
147
    case SCLT_OR: if (cl->getexclude()) tpChange(2); else tpChange(0); break;
143
    case SCLT_AND: tpChange(1); break;
148
    case SCLT_AND: tpChange(1); break;
144
    case SCLT_EXCL: tpChange(2); break;
145
    case SCLT_PHRASE: tpChange(3); break;
149
    case SCLT_PHRASE: tpChange(3); break;
146
    case SCLT_NEAR: tpChange(4); break;
150
    case SCLT_NEAR: tpChange(4); break;
147
    case SCLT_FILENAME: tpChange(5); break;
151
    case SCLT_FILENAME: tpChange(5); break;
148
    default: return;
152
    default: return;
149
    }
153
    }
...
...
152
156
153
    QString text = QString::fromUtf8(cl->gettext().c_str());
157
    QString text = QString::fromUtf8(cl->gettext().c_str());
154
    QString field = QString::fromUtf8(cl->getfield().c_str()); 
158
    QString field = QString::fromUtf8(cl->getfield().c_str()); 
155
159
156
    switch(cl->getTp()) {
160
    switch(cl->getTp()) {
157
    case SCLT_OR: case SCLT_AND: case SCLT_EXCL:
161
    case SCLT_OR: case SCLT_AND: 
158
    case SCLT_PHRASE: case SCLT_NEAR:
162
    case SCLT_PHRASE: case SCLT_NEAR:
159
    if (!field.isEmpty()) {
163
    if (!field.isEmpty()) {
160
        int idx = fldCMB->findText(field);
164
        int idx = fldCMB->findText(field);
161
        if (field >= 0) {
165
        if (field >= 0) {
162
        fldCMB->setCurrentIndex(idx);
166
        fldCMB->setCurrentIndex(idx);