mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont mark keyboard shortcuts for translation. Fixes #1280403 [Double key assignment (in german only?)](https://bugs.launchpad.net/calibre/+bug/1280403)
This commit is contained in:
parent
1bfc388e4b
commit
865d0ed90e
@ -68,11 +68,11 @@ class AddAction(InterfaceAction):
|
|||||||
self.add_recursive_multiple)
|
self.add_recursive_multiple)
|
||||||
self.add_menu.addSeparator()
|
self.add_menu.addSeparator()
|
||||||
ma('add-empty', _('Add Empty book. (Book entry with no formats)'),
|
ma('add-empty', _('Add Empty book. (Book entry with no formats)'),
|
||||||
shortcut=_('Shift+Ctrl+E')).triggered.connect(self.add_empty)
|
shortcut='Shift+Ctrl+E').triggered.connect(self.add_empty)
|
||||||
ma('add-isbn', _('Add from ISBN')).triggered.connect(self.add_from_isbn)
|
ma('add-isbn', _('Add from ISBN')).triggered.connect(self.add_from_isbn)
|
||||||
self.add_menu.addSeparator()
|
self.add_menu.addSeparator()
|
||||||
ma('add-formats', _('Add files to selected book records'),
|
ma('add-formats', _('Add files to selected book records'),
|
||||||
triggered=self.add_formats, shortcut=_('Shift+A'))
|
triggered=self.add_formats, shortcut='Shift+A')
|
||||||
self.add_menu.addSeparator()
|
self.add_menu.addSeparator()
|
||||||
ma('add-config', _('Control the adding of books'),
|
ma('add-config', _('Control the adding of books'),
|
||||||
triggered=self.add_config)
|
triggered=self.add_config)
|
||||||
|
@ -23,8 +23,8 @@ class NextMatchAction(InterfaceAction):
|
|||||||
self.can_move = None
|
self.can_move = None
|
||||||
self.qaction.triggered.connect(self.move_forward)
|
self.qaction.triggered.connect(self.move_forward)
|
||||||
self.create_action(spec=(_('Move to previous item'), 'arrow-up.png',
|
self.create_action(spec=(_('Move to previous item'), 'arrow-up.png',
|
||||||
_('Move to previous highlighted item'), [_('Shift+N'),
|
_('Move to previous highlighted item'), ['Shift+N',
|
||||||
_('Shift+F3')]), attr='p_action')
|
'Shift+F3']), attr='p_action')
|
||||||
self.gui.addAction(self.p_action)
|
self.gui.addAction(self.p_action)
|
||||||
self.p_action.triggered.connect(self.move_backward)
|
self.p_action.triggered.connect(self.move_backward)
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ from calibre.constants import DEBUG, isosx
|
|||||||
class PreferencesAction(InterfaceAction):
|
class PreferencesAction(InterfaceAction):
|
||||||
|
|
||||||
name = 'Preferences'
|
name = 'Preferences'
|
||||||
action_spec = (_('Preferences'), 'config.png', _('Configure calibre'), _('Ctrl+P'))
|
action_spec = (_('Preferences'), 'config.png', _('Configure calibre'), 'Ctrl+P')
|
||||||
action_add_menu = True
|
action_add_menu = True
|
||||||
action_menu_clone_qaction = _('Change calibre behavior')
|
action_menu_clone_qaction = _('Change calibre behavior')
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ from calibre.gui2.actions import InterfaceAction
|
|||||||
class RestartAction(InterfaceAction):
|
class RestartAction(InterfaceAction):
|
||||||
|
|
||||||
name = 'Restart'
|
name = 'Restart'
|
||||||
action_spec = (_('Restart'), None, _('Restart calibre'), _('Ctrl+R'))
|
action_spec = (_('Restart'), None, _('Restart calibre'), 'Ctrl+R')
|
||||||
|
|
||||||
def genesis(self):
|
def genesis(self):
|
||||||
self.qaction.triggered.connect(self.restart)
|
self.qaction.triggered.connect(self.restart)
|
||||||
|
@ -22,11 +22,11 @@ class SimilarBooksAction(InterfaceAction):
|
|||||||
def genesis(self):
|
def genesis(self):
|
||||||
m = self.qaction.menu()
|
m = self.qaction.menu()
|
||||||
for text, icon, target, shortcut in [
|
for text, icon, target, shortcut in [
|
||||||
(_('Books by same author'), 'user_profile.png', 'authors', _('Alt+A')),
|
(_('Books by same author'), 'user_profile.png', 'authors', 'Alt+A'),
|
||||||
(_('Books in this series'), 'books_in_series.png', 'series',
|
(_('Books in this series'), 'books_in_series.png', 'series',
|
||||||
_('Alt+Shift+S')),
|
'Alt+Shift+S'),
|
||||||
(_('Books by this publisher'), 'publisher.png', 'publisher', _('Alt+P')),
|
(_('Books by this publisher'), 'publisher.png', 'publisher', 'Alt+P'),
|
||||||
(_('Books with the same tags'), 'tags.png', 'tags', _('Alt+T')),]:
|
(_('Books with the same tags'), 'tags.png', 'tags', 'Alt+T'),]:
|
||||||
ac = self.create_action(spec=(text, icon, None, shortcut),
|
ac = self.create_action(spec=(text, icon, None, shortcut),
|
||||||
attr=target)
|
attr=target)
|
||||||
m.addAction(ac)
|
m.addAction(ac)
|
||||||
|
@ -115,7 +115,7 @@ class LibraryWidget(Splitter): # {{{
|
|||||||
orientation=orientation, parent=parent,
|
orientation=orientation, parent=parent,
|
||||||
connect_button=not config['separate_cover_flow'],
|
connect_button=not config['separate_cover_flow'],
|
||||||
side_index=idx, initial_side_size=size, initial_show=False,
|
side_index=idx, initial_side_size=size, initial_show=False,
|
||||||
shortcut=_('Shift+Alt+B'))
|
shortcut='Shift+Alt+B')
|
||||||
parent.library_view = BooksView(parent)
|
parent.library_view = BooksView(parent)
|
||||||
parent.library_view.setObjectName('library_view')
|
parent.library_view.setObjectName('library_view')
|
||||||
stack = QStackedWidget(self)
|
stack = QStackedWidget(self)
|
||||||
@ -137,7 +137,7 @@ class Stack(QStackedWidget): # {{{
|
|||||||
parent.tb_splitter = Splitter('tag_browser_splitter',
|
parent.tb_splitter = Splitter('tag_browser_splitter',
|
||||||
_('Tag Browser'), I('tags.png'),
|
_('Tag Browser'), I('tags.png'),
|
||||||
parent=parent, side_index=0, initial_side_size=200,
|
parent=parent, side_index=0, initial_side_size=200,
|
||||||
shortcut=_('Shift+Alt+T'))
|
shortcut='Shift+Alt+T')
|
||||||
parent.tb_splitter.state_changed.connect(
|
parent.tb_splitter.state_changed.connect(
|
||||||
self.tb_widget.set_pane_is_visible, Qt.QueuedConnection)
|
self.tb_widget.set_pane_is_visible, Qt.QueuedConnection)
|
||||||
parent.tb_splitter.addWidget(self.tb_widget)
|
parent.tb_splitter.addWidget(self.tb_widget)
|
||||||
@ -245,7 +245,7 @@ class StatusBar(QStatusBar): # {{{
|
|||||||
class GridViewButton(LayoutButton): # {{{
|
class GridViewButton(LayoutButton): # {{{
|
||||||
|
|
||||||
def __init__(self, gui):
|
def __init__(self, gui):
|
||||||
sc = _('Shift+Alt+G')
|
sc = 'Shift+Alt+G'
|
||||||
LayoutButton.__init__(self, I('grid.png'), _('Cover Grid'), parent=gui, shortcut=sc)
|
LayoutButton.__init__(self, I('grid.png'), _('Cover Grid'), parent=gui, shortcut=sc)
|
||||||
self.set_state_to_show()
|
self.set_state_to_show()
|
||||||
self.action_toggle = QAction(self.icon(), _('Toggle') + ' ' + self.label, self)
|
self.action_toggle = QAction(self.icon(), _('Toggle') + ' ' + self.label, self)
|
||||||
@ -384,7 +384,7 @@ class LayoutMixin(object): # {{{
|
|||||||
self.bd_splitter = Splitter('book_details_splitter',
|
self.bd_splitter = Splitter('book_details_splitter',
|
||||||
_('Book Details'), I('book.png'),
|
_('Book Details'), I('book.png'),
|
||||||
orientation=Qt.Vertical, parent=self, side_index=1,
|
orientation=Qt.Vertical, parent=self, side_index=1,
|
||||||
shortcut=_('Shift+Alt+D'))
|
shortcut='Shift+Alt+D')
|
||||||
self.bd_splitter.addWidget(self.stack)
|
self.bd_splitter.addWidget(self.stack)
|
||||||
self.bd_splitter.addWidget(self.book_details)
|
self.bd_splitter.addWidget(self.book_details)
|
||||||
self.bd_splitter.setCollapsible(self.bd_splitter.other_index, False)
|
self.bd_splitter.setCollapsible(self.bd_splitter.other_index, False)
|
||||||
@ -395,7 +395,7 @@ class LayoutMixin(object): # {{{
|
|||||||
self.bd_splitter = Splitter('book_details_splitter',
|
self.bd_splitter = Splitter('book_details_splitter',
|
||||||
_('Book Details'), I('book.png'), initial_side_size=200,
|
_('Book Details'), I('book.png'), initial_side_size=200,
|
||||||
orientation=Qt.Horizontal, parent=self, side_index=1,
|
orientation=Qt.Horizontal, parent=self, side_index=1,
|
||||||
shortcut=_('Shift+Alt+D'))
|
shortcut='Shift+Alt+D')
|
||||||
self.stack = Stack(self)
|
self.stack = Stack(self)
|
||||||
self.bd_splitter.addWidget(self.stack)
|
self.bd_splitter.addWidget(self.stack)
|
||||||
self.book_details = BookDetails(True, self)
|
self.book_details = BookDetails(True, self)
|
||||||
|
@ -445,7 +445,7 @@ class JobsButton(QFrame): # {{{
|
|||||||
self.pi = ProgressIndicator(self, size)
|
self.pi = ProgressIndicator(self, size)
|
||||||
self._jobs = QLabel('<b>'+_('Jobs:')+' 0')
|
self._jobs = QLabel('<b>'+_('Jobs:')+' 0')
|
||||||
self._jobs.mouseReleaseEvent = self.mouseReleaseEvent
|
self._jobs.mouseReleaseEvent = self.mouseReleaseEvent
|
||||||
self.shortcut = _('Shift+Alt+J')
|
self.shortcut = 'Shift+Alt+J'
|
||||||
|
|
||||||
if horizontal:
|
if horizontal:
|
||||||
self.setLayout(QHBoxLayout())
|
self.setLayout(QHBoxLayout())
|
||||||
|
@ -202,7 +202,7 @@ class SearchBar(QWidget): # {{{
|
|||||||
parent.advanced_search_toggle_action = ac = QAction(parent)
|
parent.advanced_search_toggle_action = ac = QAction(parent)
|
||||||
parent.addAction(ac)
|
parent.addAction(ac)
|
||||||
parent.keyboard.register_shortcut('advanced search toggle',
|
parent.keyboard.register_shortcut('advanced search toggle',
|
||||||
_('Advanced search'), default_keys=(_("Shift+Ctrl+F"),),
|
_('Advanced search'), default_keys=("Shift+Ctrl+F",),
|
||||||
action=ac)
|
action=ac)
|
||||||
ac.triggered.connect(x.click)
|
ac.triggered.connect(x.click)
|
||||||
x.setIcon(QIcon(I('search.png')))
|
x.setIcon(QIcon(I('search.png')))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user