add shortcut für "copy selection to file"
This commit is contained in:
@@ -211,11 +211,14 @@ class InnerBigText(QWidget):
|
||||
self.scroll_by_lines(-3)
|
||||
if e.key() == 16777237: # page down
|
||||
self.scroll_by_lines(3)
|
||||
elif e.modifiers() == Qt.KeyboardModifier.ControlModifier | Qt.KeyboardModifier.ShiftModifier and e.key() == 67: # ctrl + shift + c
|
||||
self._copy_selection_to_file()
|
||||
elif e.modifiers() == Qt.KeyboardModifier.ControlModifier and e.key() == 67: # ctrl + c
|
||||
self.copy_selection()
|
||||
elif e.modifiers() == Qt.KeyboardModifier.ControlModifier and e.key() == 65: # ctrl + a
|
||||
self._select_all()
|
||||
|
||||
|
||||
def wheelEvent(self, event: QWheelEvent):
|
||||
direction = 1 if event.angleDelta().y() < 0 else -1
|
||||
if event.modifiers() == Qt.KeyboardModifier.ControlModifier:
|
||||
@@ -243,6 +246,7 @@ class InnerBigText(QWidget):
|
||||
_("Copy to &File"), self,
|
||||
triggered=self._copy_selection_to_file)
|
||||
copy_to_file.setDisabled(not self._has_selection())
|
||||
copy_to_file.setShortcut("Shift+CTRL+C")
|
||||
menu.addAction(copy_to_file)
|
||||
|
||||
select_all = QAction(Icon("icons/myicons/select-all.svg"), _("Select &All"), self,
|
||||
@@ -407,7 +411,7 @@ class InnerBigText(QWidget):
|
||||
if end - start > (1024 ** 2) * 5:
|
||||
you_sure = QMessageBox(
|
||||
QMessageBox.Icon.Warning,
|
||||
_("data selection"),
|
||||
_("warning"),
|
||||
_(
|
||||
"You have selected <b>{0}</b> of data.").format(bytes_human_readable))
|
||||
# noinspection PyTypeChecker
|
||||
@@ -481,7 +485,7 @@ class InnerBigText(QWidget):
|
||||
_("selected {0} - {1:,.0f}:{2:,.0f}").format(bytes_human_readable, start_byte,
|
||||
end_byte - 1))
|
||||
else:
|
||||
PluginRegistry.execute("update_status_bar", _(""))
|
||||
PluginRegistry.execute("update_status_bar", "")
|
||||
|
||||
def _file_changed(self):
|
||||
if self._follow_tail:
|
||||
|
||||
Reference in New Issue
Block a user