From 03d615bff033c3b858807cf97b547aa747b93e65 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Thu, 21 Mar 2024 19:41:27 +0100 Subject: [PATCH] =?UTF-8?q?add=20shortcut=20f=C3=BCr=20"copy=20selection?= =?UTF-8?q?=20to=20file"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/de_DE/LC_MESSAGES/messages.mo | Bin 4784 -> 4775 bytes locales/de_DE/LC_MESSAGES/messages.po | 31 ++++++++++++++------------ locales/messages.pot | 28 ++++++++++------------- src/ui/bigtext/bigtext.py | 8 +++++-- 4 files changed, 35 insertions(+), 32 deletions(-) diff --git a/locales/de_DE/LC_MESSAGES/messages.mo b/locales/de_DE/LC_MESSAGES/messages.mo index 7ceebde7cfa39925f5b7b655b1d484f1769a6f53..273881b7be37553b8982164236545b4c76cf49d0 100644 GIT binary patch delta 868 zcmXZZPe{{Y9LMqRHh{e=kOV{}5Yu{42@GHiFQV?3P!+p|Iu|zh zP{4;+#C1R4MrFL?{f#PJjHtx2Br1_KvSoRs*(k$(yn;IS0Tp-~Rhh4-czZ}I**>F6 z`43f^G_UGH5mkXQ>Y*z3;*{TCMV0U|>NkJp`hwi4alUeNrP@y~(DmA7Hy@mcl-*j; zoxa38O7Ejzpr59nryu^gPeCqHaesnZP-0g)Mx57_cBq5p386k kO%&p8u)Wt!bX2=W@7!Bhtk>*8emOIcDL3YpDswga4-b@B;s5{u delta 873 zcmXZZOGs2v9LMqhoxEet==d6_7>zMz7TRNS2&F|DtiX^Q1QQ!Vkb_IAjLOg6Q)q-U%?jaNd#scbOxBv z4d+ldUO)w|ViMO-FY^&=aRV>nmK*P4E8~5v!9RE&k5P$Y+)nH5sC?b1bM6Op`sh5w zX8eFk^c8iXZKT)^jV`o{I`AiI|6e!u_&j}Kl7^g?MP1+qp21;M{21!RrcnEW7j%^H z753v>H{L_t_`vxO^>i_^lGBo?i)4@`>qUy)rFo1KsD0m2iT6-1^9z;l5GjLpLaV3r zIZX*Ns3*FH3LHhf#3bs#B3{BpxBd?GpMMTJ{oI9n^m0_4)J4rxtEYs|{Bzz=_}Wjk zk1!XZc2aLs+o-pw`VEHP{G2x&9{VM~poz*<^q?j&GrcsOUYwnuEiOGOKMnih{0} of data." msgstr "Du hast {0} 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" diff --git a/locales/messages.pot b/locales/messages.pot index 66dff08..e384aa3 100644 --- a/locales/messages.pot +++ b/locales/messages.pot @@ -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 \n" "Language-Team: LANGUAGE \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 {0} 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 "" diff --git a/src/ui/bigtext/bigtext.py b/src/ui/bigtext/bigtext.py index 67e5b41..4ccbef2 100644 --- a/src/ui/bigtext/bigtext.py +++ b/src/ui/bigtext/bigtext.py @@ -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 {0} 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: