add shortcut für "copy selection to file"

This commit is contained in:
2024-03-21 19:41:27 +01:00
parent 165b6e0a63
commit 03d615bff0
4 changed files with 35 additions and 32 deletions

View File

@@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: RavenLog\n"
"POT-Creation-Date: 2024-03-21 19:17+0100\n"
"PO-Revision-Date: 2024-03-21 19:17+0100\n"
"POT-Creation-Date: 2024-03-21 19:39+0100\n"
"PO-Revision-Date: 2024-03-21 19:40+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: de\n"
@@ -170,7 +170,7 @@ msgstr "nur Treffer"
msgid "({hits} lines)"
msgstr "({hits} Zeilen)"
#: src/plugins/logfileplugin.py:35 src/ui/bigtext/bigtext.py:254
#: src/plugins/logfileplugin.py:35 src/ui/bigtext/bigtext.py:258
msgid "&Highlighter"
msgstr "&Hervorhebungen"
@@ -214,39 +214,39 @@ msgstr ""
msgid "h"
msgstr ""
#: src/ui/bigtext/bigtext.py:235
#: src/ui/bigtext/bigtext.py:238
msgid "&Copy to Clipboard"
msgstr "In Zwischenablage &Kopieren"
#: src/ui/bigtext/bigtext.py:243
#: src/ui/bigtext/bigtext.py:246
msgid "Copy to &File"
msgstr "In &Datei Kopieren"
#: src/ui/bigtext/bigtext.py:248
#: src/ui/bigtext/bigtext.py:252
msgid "Select &All"
msgstr "&Alles Selektieren"
#: src/ui/bigtext/bigtext.py:410
msgid "data selection"
msgstr "selektion"
#: src/ui/bigtext/bigtext.py:414
msgid "warning"
msgstr "Achtung"
#: src/ui/bigtext/bigtext.py:411
#: src/ui/bigtext/bigtext.py:415
msgid "You have selected <b>{0}</b> of data."
msgstr "Du hast <b>{0}</b> selektiert."
#: src/ui/bigtext/bigtext.py:416
#: src/ui/bigtext/bigtext.py:420
msgid "Copy {0} to Clipboard"
msgstr "Kopiere {0} in die Zwischenablage"
#: src/ui/bigtext/bigtext.py:420
#: src/ui/bigtext/bigtext.py:424
msgid "Write to File"
msgstr "Schreibe in Datei"
#: src/ui/bigtext/bigtext.py:444
#: src/ui/bigtext/bigtext.py:448
msgid "Save File"
msgstr "Speichere Datei"
#: src/ui/bigtext/bigtext.py:481
#: src/ui/bigtext/bigtext.py:485
msgid "selected {0} - {1:,.0f}:{2:,.0f}"
msgstr "selektiert {0} - {1:,.0f}:{2:,.0f}"
@@ -358,6 +358,9 @@ msgstr "Grau"
msgid "transparent"
msgstr "Transparent"
#~ msgid "data selection"
#~ msgstr "selektion"
#~ msgid "Log file viewer"
#~ msgstr "Betrachter für Logdateien"

View File

@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-03-21 19:17+0100\n"
"POT-Creation-Date: 2024-03-21 19:39+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -164,7 +164,7 @@ msgstr ""
msgid "({hits} lines)"
msgstr ""
#: src/plugins/logfileplugin.py:35 src/ui/bigtext/bigtext.py:254
#: src/plugins/logfileplugin.py:35 src/ui/bigtext/bigtext.py:258
msgid "&Highlighter"
msgstr ""
@@ -208,46 +208,42 @@ msgstr ""
msgid "h"
msgstr ""
#: src/ui/bigtext/bigtext.py:235
#: src/ui/bigtext/bigtext.py:238
msgid "&Copy to Clipboard"
msgstr ""
#: src/ui/bigtext/bigtext.py:243
#: src/ui/bigtext/bigtext.py:246
msgid "Copy to &File"
msgstr ""
#: src/ui/bigtext/bigtext.py:248
#: src/ui/bigtext/bigtext.py:252
msgid "Select &All"
msgstr ""
#: src/ui/bigtext/bigtext.py:410
msgid "data selection"
#: src/ui/bigtext/bigtext.py:414
msgid "warning"
msgstr ""
#: src/ui/bigtext/bigtext.py:411
#: src/ui/bigtext/bigtext.py:415
msgid "You have selected <b>{0}</b> of data."
msgstr ""
#: src/ui/bigtext/bigtext.py:416
#: src/ui/bigtext/bigtext.py:420
msgid "Copy {0} to Clipboard"
msgstr ""
#: src/ui/bigtext/bigtext.py:420
#: src/ui/bigtext/bigtext.py:424
msgid "Write to File"
msgstr ""
#: src/ui/bigtext/bigtext.py:444
#: src/ui/bigtext/bigtext.py:448
msgid "Save File"
msgstr ""
#: src/ui/bigtext/bigtext.py:481
#: src/ui/bigtext/bigtext.py:485
msgid "selected {0} - {1:,.0f}:{2:,.0f}"
msgstr ""
#: src/ui/bigtext/bigtext.py:484
msgid ""
msgstr ""
#: src/ui/bigtext/newhighlightingdialog.py:20
msgid "Manage Highlighting"
msgstr ""

View File

@@ -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: