summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2017-10-23 21:49:56 +0200
committerPablo Barciela <[email protected]>2017-10-24 01:11:18 +0200
commit9a574072eee9bd69c93658ca9a66eb65643ec8dd (patch)
treebc7f9cd1243e14c8ea875725fbce516b699bfbc2
parentd58bde20331d53140963f590bd3496dea36a0142 (diff)
downloadmate-terminal-9a574072eee9bd69c93658ca9a66eb65643ec8dd.tar.bz2
mate-terminal-9a574072eee9bd69c93658ca9a66eb65643ec8dd.tar.xz
add "select all" keyboard shortcut: [control] + [shift] + [A]
and it can be changed in "edit" -> "keyboard shortcuts" Closes https://github.com/mate-desktop/mate-terminal/issues/191
-rw-r--r--src/org.mate.terminal.gschema.xml.in5
-rw-r--r--src/terminal-accels.c6
-rw-r--r--src/terminal-window.c2
3 files changed, 12 insertions, 1 deletions
diff --git a/src/org.mate.terminal.gschema.xml.in b/src/org.mate.terminal.gschema.xml.in
index 084ed4a..3a3d5e1 100644
--- a/src/org.mate.terminal.gschema.xml.in
+++ b/src/org.mate.terminal.gschema.xml.in
@@ -315,6 +315,11 @@
<summary>Keyboard shortcut to paste text</summary>
<description>Keyboard shortcut key for pasting the contents of the clipboard into the terminal. Expressed as a string in the same format used for GTK+ resource files. If you set the option to the special string "disabled", then there will be no keyboard shortcut for this action.</description>
</key>
+ <key name="select-all" type="s">
+ <default>'&lt;Ctrl&gt;&lt;Shift&gt;a'</default>
+ <summary>Keyboard shortcut to select all text</summary>
+ <description>Keyboard shortcut key for selecting all the text into the terminal. Expressed as a string in the same format used for GTK+ resource files. If you set the option to the special string "disabled", then there will be no keyboard shortcut for this action.</description>
+ </key>
<key name="full-screen" type="s">
<default>'F11'</default>
<summary>Keyboard shortcut to toggle full screen mode</summary>
diff --git a/src/terminal-accels.c b/src/terminal-accels.c
index 69c44bc..d533477 100644
--- a/src/terminal-accels.c
+++ b/src/terminal-accels.c
@@ -55,6 +55,7 @@
#define ACCEL_PATH_CLOSE_WINDOW ACCEL_PATH_ROOT "FileCloseWindow"
#define ACCEL_PATH_COPY ACCEL_PATH_ROOT "EditCopy"
#define ACCEL_PATH_PASTE ACCEL_PATH_ROOT "EditPaste"
+#define ACCEL_PATH_SELECT_ALL ACCEL_PATH_ROOT "EditSelectAll"
#define ACCEL_PATH_TOGGLE_MENUBAR ACCEL_PATH_ROOT "ViewMenubar"
#define ACCEL_PATH_FULL_SCREEN ACCEL_PATH_ROOT "ViewFullscreen"
#define ACCEL_PATH_RESET ACCEL_PATH_ROOT "TerminalReset"
@@ -91,6 +92,7 @@
#define KEY_PREV_TAB "prev-tab"
#define KEY_RESET_AND_CLEAR "reset-and-clear"
#define KEY_RESET "reset"
+#define KEY_SELECT_ALL "select-all"
#define KEY_SAVE_CONTENTS "save-contents"
#define KEY_SET_TERMINAL_TITLE "set-terminal-title"
#define KEY_TOGGLE_MENUBAR "toggle-menubar"
@@ -174,6 +176,10 @@ static KeyEntry edit_entries[] =
N_("Paste"),
KEY_PASTE, ACCEL_PATH_PASTE, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_KEY_v, NULL, FALSE, TRUE
},
+ {
+ N_("Select All"),
+ KEY_SELECT_ALL, ACCEL_PATH_SELECT_ALL, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_KEY_a, NULL, FALSE, TRUE
+ }
};
static KeyEntry view_entries[] =
diff --git a/src/terminal-window.c b/src/terminal-window.c
index ce3b437..b2b0ef5 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -1932,7 +1932,7 @@ terminal_window_init (TerminalWindow *window)
G_CALLBACK (edit_paste_callback)
},
{
- "EditSelectAll", GTK_STOCK_SELECT_ALL, NULL, NULL,
+ "EditSelectAll", GTK_STOCK_SELECT_ALL, NULL, "<shift><control>A",
NULL,
G_CALLBACK (edit_select_all_callback)
},