Fix "match any" not working in the search dialog.

This commit is contained in:
Kovid Goyal 2008-02-05 23:02:30 +00:00
parent 0da16c5640
commit df8f2d88d0
3 changed files with 8 additions and 4 deletions

View File

@ -84,5 +84,8 @@ class SearchDialog(Ui_Dialog, QDialog):
token = tok.token()
if token:
ans.append(token)
return ' '.join(ans)
ans = ' '.join(ans)
if self.match_any.isChecked():
ans = '['+ans+']'
return ans

View File

@ -21,7 +21,7 @@
<item>
<layout class="QVBoxLayout" >
<item>
<widget class="QRadioButton" name="radioButton" >
<widget class="QRadioButton" name="match_all" >
<property name="text" >
<string>Match a&amp;ll of the following criteria</string>
</property>
@ -31,7 +31,7 @@
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_2" >
<widget class="QRadioButton" name="match_any" >
<property name="text" >
<string>Match a&amp;ny of the following criteria</string>
</property>

View File

@ -755,3 +755,4 @@ class SearchBox(QLineEdit):
self.setText(txt)
self.emit(SIGNAL('search(PyQt_PyObject, PyQt_PyObject)'), txt, False)
self.end(False)
self.initial_state = False