Skip to content

Commit

Permalink
Delete update shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbautista committed Oct 8, 2024
1 parent 3f74b2e commit d1cd581
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
17 changes: 0 additions & 17 deletions qtconsole/console_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,23 +412,6 @@ def __init__(self, parent=None, **kw):
# in self._control when that widget was created.
self.setAcceptDrops(True)

@observe('shortcut_print', 'shortcut_select_all', 'shortcut_cut', 'shortcut_copy',
'shortcut_paste', 'shortcut_save')
def update_shortcuts(self, change):
shortcut_actions = {
'shortcut_print': self.print_action,
'shortcut_select_all': self.select_all_action,
'shortcut_cut': self.cut_action,
'shortcut_copy': self.copy_action,
'shortcut_paste': self.paste_action,
'shortcut_save': self.export_action
}
action = shortcut_actions.get(change['name'])
if action:
action.setShortcut(change['new'])
self.log.debug(f"Shortcut for {change['name']} updated to: {change['new']}")
else:
self.log.debug(f"No action found for shortcut {change['name']}")
#---------------------------------------------------------------------------
# Drag and drop support
#---------------------------------------------------------------------------
Expand Down
5 changes: 0 additions & 5 deletions qtconsole/frontend_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,6 @@ def __init__(self, local_kernel=_local_kernel, *args, **kw):
# 'ConsoleWidget' public interface
#---------------------------------------------------------------------------

@observe('shortcut_copy_raw')
def update_shortcuts(self, change):
if change['name'] == 'shortcut_copy_raw':
self.copy_raw_action.setShortcut(change['new'])

def copy(self):
""" Copy the currently selected text to the clipboard, removing prompts.
"""
Expand Down

0 comments on commit d1cd581

Please sign in to comment.