Remove lookup and highlight actions from chrome

They are better accessed via the selection bar
This commit is contained in:
Kovid Goyal 2020-07-24 17:55:53 +05:30
parent 94c28fc92d
commit 7d00a8cf12
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 0 additions and 11 deletions

View File

@ -20,7 +20,6 @@ from widgets import create_button
# Custom colors for highlights # Custom colors for highlights
# Google lookup for selections # Google lookup for selections
# Export all annots as plain text/JSON # Export all annots as plain text/JSON
# Remove lookup and create highlight buttons from chrome
# Fix selection bar remaining open after removing highlight # Fix selection bar remaining open after removing highlight

View File

@ -314,15 +314,7 @@ class MainOverlay: # {{{
if full_screen_actions.length: if full_screen_actions.length:
actions_div.appendChild(E.ul(*full_screen_actions)) actions_div.appendChild(E.ul(*full_screen_actions))
highlight_action = ac(_('Highlight'), _('Highlight text in the book'),
def(): self.overlay.hide(), self.overlay.view.initiate_create_annotation();, 'highlight')
if runtime.is_standalone_viewer: if runtime.is_standalone_viewer:
actions_div.appendChild(E.ul(
ac(_('Lookup/search word'), _('Lookup or search for the currently selected word'),
def(): self.overlay.hide(), ui_operations.toggle_lookup(True);, 'library')
))
actions_div.lastChild.appendChild(highlight_action)
actions_div.lastChild.appendChild( actions_div.lastChild.appendChild(
ac(_('Browse highlights'), _('Browse all highlights'), ac(_('Browse highlights'), _('Browse all highlights'),
def(): self.overlay.hide(), ui_operations.toggle_highlights();, 'image') def(): self.overlay.hide(), ui_operations.toggle_highlights();, 'image')
@ -350,8 +342,6 @@ class MainOverlay: # {{{
ac(_('Quit'), _('Close the viewer'), ac(_('Quit'), _('Close the viewer'),
def(): self.overlay.hide(), ui_operations.quit();, 'remove'), def(): self.overlay.hide(), ui_operations.quit();, 'remove'),
)) ))
else:
actions_div.appendChild(E.ul(highlight_action))
container.appendChild(set_css(E.div(class_=MAIN_OVERLAY_TS_CLASS, # top section container.appendChild(set_css(E.div(class_=MAIN_OVERLAY_TS_CLASS, # top section
onclick=def (evt):evt.stopPropagation();, onclick=def (evt):evt.stopPropagation();,