From 1429832542b25d7dfc7b19d9f6488b4433733ada Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sun, 6 Jun 2010 14:17:29 +0100 Subject: [PATCH] Remove 'refinement' from search box, because the model doesn't use it (and I had removed it there) --- src/calibre/gui2/search_box.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/calibre/gui2/search_box.py b/src/calibre/gui2/search_box.py index c6e0425d38..74f60c76f8 100644 --- a/src/calibre/gui2/search_box.py +++ b/src/calibre/gui2/search_box.py @@ -57,7 +57,7 @@ class SearchBox2(QComboBox): INTERVAL = 1500 #: Time to wait before emitting search signal MAX_COUNT = 25 - search = pyqtSignal(object, object) + search = pyqtSignal(object) def __init__(self, parent=None): QComboBox.__init__(self, parent) @@ -97,7 +97,7 @@ class SearchBox2(QComboBox): self.help_state = False def clear_to_help(self): - self.search.emit('', False) + self.search.emit('') self._in_a_search = False self.setEditText(self.help_text) if self.timer is not None: # Turn off any timers that got started in setEditText @@ -158,9 +158,8 @@ class SearchBox2(QComboBox): if not text or text == self.help_text: return self.clear() self.help_state = False - refinement = text.startswith(self.prev_search) and ':' not in text self.prev_search = text - self.search.emit(text, refinement) + self.search.emit(text) idx = self.findText(text, Qt.MatchFixedString) self.block_signals(True) @@ -195,7 +194,7 @@ class SearchBox2(QComboBox): if self.timer is not None: # Turn off any timers that got started in setEditText self.killTimer(self.timer) self.timer = None - self.search.emit(txt, False) + self.search.emit(txt) self.line_edit.end(False) self.initial_state = False