mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-22 01:03:11 +02:00
Allow clearing search history via context menu
This commit is contained in:
parent
b0377d7eb5
commit
d54f29bc0e
1 changed files with 6 additions and 0 deletions
|
|
@ -170,6 +170,12 @@ def save_history(self):
|
|||
self.history_saved.emit(self.text(), self.history)
|
||||
return ret
|
||||
|
||||
def contextMenuEvent(self, event):
|
||||
menu = self.lineEdit().createStandardContextMenu()
|
||||
menu.addSeparator()
|
||||
menu.addAction(_('Clear search history'), self.clear_history)
|
||||
menu.exec_(event.globalPos())
|
||||
|
||||
|
||||
class SearchInput(QWidget): # {{{
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue