[gnome-terminal] accels: Add accel for Copy as HTML



commit 0f1308e92fdecdbc194431936b61a588a3521056
Author: Christian Persch <chpe src gnome org>
Date:   Tue May 9 11:24:42 2017 +0200

    accels: Add accel for Copy as HTML
    
    https://bugzilla.gnome.org/show_bug.cgi?id=365121

 src/org.gnome.Terminal.gschema.xml |    4 ++++
 src/terminal-accels.c              |    5 ++++-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
index c68512b..ebb450b 100644
--- a/src/org.gnome.Terminal.gschema.xml
+++ b/src/org.gnome.Terminal.gschema.xml
@@ -403,6 +403,10 @@
       <default>'&lt;Ctrl&gt;&lt;Shift&gt;c'</default>
       <summary>Keyboard shortcut to copy text</summary>
     </key>
+    <key name="copy-html" type="s">
+      <default>'disabled'</default>
+      <summary>Keyboard shortcut to copy text as HTML</summary>
+    </key>
     <key name="paste" type="s">
       <default>'&lt;Ctrl&gt;&lt;Shift&gt;v'</default>
       <summary>Keyboard shortcut to paste text</summary>
diff --git a/src/terminal-accels.c b/src/terminal-accels.c
index 3bf8f4b..3adbfc7 100644
--- a/src/terminal-accels.c
+++ b/src/terminal-accels.c
@@ -52,6 +52,7 @@
 #define KEY_CLOSE_TAB           "close-tab"
 #define KEY_CLOSE_WINDOW        "close-window"
 #define KEY_COPY                "copy"
+#define KEY_COPY_HTML           "copy-html"
 #define KEY_DETACH_TAB          "detach-tab"
 #define KEY_FIND                "find"
 #define KEY_FIND_CLEAR          "find-clear"
@@ -85,6 +86,7 @@
 #define ACCEL_PATH_KEY_CLOSE_TAB            ACCEL_PATH_ROOT "FileCloseTab"
 #define ACCEL_PATH_KEY_CLOSE_WINDOW         ACCEL_PATH_ROOT "FileCloseWindow"
 #define ACCEL_PATH_KEY_COPY                 ACCEL_PATH_ROOT "EditCopy"
+#define ACCEL_PATH_KEY_COPY_HTML            ACCEL_PATH_ROOT "EditCopyHtml"
 #define ACCEL_PATH_KEY_DETACH_TAB           ACCEL_PATH_ROOT "TabsDetach"
 #define ACCEL_PATH_KEY_FIND                 ACCEL_PATH_ROOT "SearchFind"
 #define ACCEL_PATH_KEY_FIND_CLEAR           ACCEL_PATH_ROOT "SearchClearHighlight"
@@ -164,7 +166,8 @@ static KeyEntry file_entries[] = {
 };
 
 static KeyEntry edit_entries[] = {
-  ENTRY (N_("Copy"),                KEY_COPY,                "copy",         NULL, NULL      ),
+  ENTRY (N_("Copy"),                KEY_COPY,                "copy",         "s", "'text'"   ),
+  ENTRY (N_("Copy as HTML"),        KEY_COPY_HTML,           "copy",         "s", "'html'"   ),
   ENTRY (N_("Paste"),               KEY_PASTE,               "paste",        "s",  "'normal'"),
   ENTRY (N_("Select All"),          KEY_SELECT_ALL,          "select-all",   NULL, NULL      ),
   ENTRY (N_("Preferences"),         KEY_PREFERENCES,         "preferences",  NULL, NULL      ),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]