mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Allow clearing search history via context menu
This commit is contained in:
parent
b0377d7eb5
commit
d54f29bc0e
@ -170,6 +170,12 @@ class SearchBox(HistoryComboBox):
|
||||
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…
x
Reference in New Issue
Block a user