This commit is contained in:
Kovid Goyal 2010-12-01 10:22:55 -07:00
commit d4861d6801
2 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,7 @@ class SearchBox2(QComboBox):
c = self.line_edit.completer() c = self.line_edit.completer()
c.setCompletionMode(c.PopupCompletion) c.setCompletionMode(c.PopupCompletion)
c.highlighted[QString].connect(self.completer_used) c.highlighted[QString].connect(self.completer_used)
c.activated[QString].connect(self.history_selected)
self.line_edit.key_pressed.connect(self.key_pressed, type=Qt.DirectConnection) self.line_edit.key_pressed.connect(self.key_pressed, type=Qt.DirectConnection)
self.activated.connect(self.history_selected) self.activated.connect(self.history_selected)

View File

@ -253,6 +253,7 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
self.connect(self.vertical_scrollbar, SIGNAL('valueChanged(int)'), self.connect(self.vertical_scrollbar, SIGNAL('valueChanged(int)'),
lambda x: self.goto_page(x/100.)) lambda x: self.goto_page(x/100.))
self.search.search.connect(self.find) self.search.search.connect(self.find)
self.search.focus_to_library.connect(lambda: self.view.setFocus(Qt.OtherFocusReason))
self.connect(self.toc, SIGNAL('clicked(QModelIndex)'), self.toc_clicked) self.connect(self.toc, SIGNAL('clicked(QModelIndex)'), self.toc_clicked)
self.connect(self.reference, SIGNAL('goto(PyQt_PyObject)'), self.goto) self.connect(self.reference, SIGNAL('goto(PyQt_PyObject)'), self.goto)