changeset 24393:a7bc68ce08f1

add new smart code indentation to the shortcut-manager * shortcut_manager.cc (do_init_data): rename rigid (un)intend actions, add new smart intend action
author Torsten <mttl@mailbox.org>
date Sat, 09 Dec 2017 11:50:19 +0100
parents 583e6447d7dc
children f997aa4be0ce
files libgui/src/shortcut-manager.cc
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/shortcut-manager.cc	Fri Dec 08 15:46:04 2017 -0800
+++ b/libgui/src/shortcut-manager.cc	Sat Dec 09 11:50:19 2017 +0100
@@ -372,16 +372,18 @@
         QKeySequence (ctrl_alt + Qt::Key_U));
 
 #if defined (Q_OS_MAC)
-  init (tr ("Indent Selection"), "editor_edit:indent_selection",
+  init (tr ("Indent Selection Rigidly"), "editor_edit:indent_selection",
         QKeySequence (prefix + Qt::Key_Tab));
-  init (tr ("Unindent Selection"), "editor_edit:unindent_selection",
+  init (tr ("Unindent Selection Rigidly"), "editor_edit:unindent_selection",
         QKeySequence (prefix + Qt::ShiftModifier + Qt::Key_Tab));
 #else
-  init (tr ("Indent Selection"), "editor_edit:indent_selection",
+  init (tr ("Indent Selection Rigidly"), "editor_edit:indent_selection",
         QKeySequence (ctrl + Qt::Key_Tab));
-  init (tr ("Unindent Selection"), "editor_edit:unindent_selection",
+  init (tr ("Unindent Selection Rigidly"), "editor_edit:unindent_selection",
         QKeySequence (ctrl_shift + Qt::Key_Tab));
 #endif
+  init (tr ("Indent Code"), "editor_edit:smart_indent_line_or_selection",
+        QKeySequence ());
 
   init (tr ("Convert Line Endings to Windows"), "editor_edit:conv_eol_winows",
         QKeySequence ());