[gtranslator: 1/2] added shortcut ctrl-k for clearing active translation field . Fixes #141
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator: 1/2] added shortcut ctrl-k for clearing active translation field . Fixes #141
- Date: Thu, 17 Mar 2022 06:58:31 +0000 (UTC)
commit f4563d6a5c961dfdf839e71a22c7b88e3e4775e1
Author: redoC-A2k <afshanahmeda2k gmail com>
Date: Thu Mar 17 06:58:25 2022 +0000
added shortcut ctrl-k for clearing active translation field . Fixes #141
src/gtr-application.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/gtr-application.c b/src/gtr-application.c
index 25f24ba1..38c26c92 100644
--- a/src/gtr-application.c
+++ b/src/gtr-application.c
@@ -350,6 +350,16 @@ edit_header_activated (GSimpleAction *action,
gtr_actions_edit_header (priv->active_window);
}
+static void
+clear_msgstr_activated (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GtrApplication *app = GTR_APPLICATION (user_data);
+ GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
+ gtr_actions_edit_clear (priv->active_window);
+}
+
static void
shortcuts_activated (GSimpleAction *action,
GVariant *parameter,
@@ -648,6 +658,7 @@ static GActionEntry app_entries[] = {
{ "new_window", new_window_activated, NULL, NULL, NULL },
{ "preferences", preferences_activated, NULL, NULL, NULL },
{ "edit_header", edit_header_activated, NULL, NULL, NULL },
+ { "clear_msgstr", clear_msgstr_activated, NULL, NULL, NULL },
{ "shortcuts", shortcuts_activated, NULL, NULL, NULL },
{ "help", help_activated, NULL, NULL, NULL },
{ "about", about_activated, NULL, NULL, NULL },
@@ -702,6 +713,7 @@ gtr_application_startup (GApplication *application)
set_kb (application, "app.undo", "<Ctrl>z");
set_kb (application, "app.redo", "<Ctrl><Shift>z");
+ set_kb (application, "app.clear_msgstr", "<Ctrl>k");
set_kb (application, "app.prev", "<Alt>Left");
set_kb (application, "app.next", "<Alt>Right");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]