From 4b9c91d7120c02545a3abfa1d302d9149e66f971 Mon Sep 17 00:00:00 2001 From: Sergey Kalinin Date: Wed, 7 Feb 2018 17:03:37 +0300 Subject: [PATCH] Change hotkeys "Control+," "Control+." "Control+/" (commect selected, uncoment selected, select all) Add some new translation --- CHANGELOG | 3 +++ lib/editor.tcl | 15 +++------------ lib/main.tcl | 9 +++++---- msgs/en.msg | 3 +++ msgs/ru.msg | 3 +++ 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 948d3a3..a8d106c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,8 @@ 07.02.2018 - Tcl, Perl, PHP highlight comment procedure fixed - Help file Text.html utf-8 encoding +- Change hotkeys "Control+," "Control+." "Control+/" (commect selected, uncoment selected, select all) +- Add new function Comments/Uncomment selected text 05.02.2018 - Added binding mouse button: click on notebook tab highlight opened file name in tree @@ -391,5 +393,6 @@ Fixed bug with PageRise function + diff --git a/lib/editor.tcl b/lib/editor.tcl index 336ab2d..7573925 100644 --- a/lib/editor.tcl +++ b/lib/editor.tcl @@ -960,25 +960,15 @@ proc EditFile {node fileName} { bind $text "tk_textCopy $w.text;break" bind $text "tk_textCopy $w.text;break" bind $text "tk_textPaste $w.text;break" - #bind $text "tk_textPaste $w.text;break" bind $text {TextOperation paste; break} - bind $text { - set nb [$noteBook raise] - if {$nb == "" || $nb == "newproj" || $nb == "about" || $nb == "debug"} { - return - } - set nb "$noteBook.f$nb" - SelectAll $nb.text - unset nb - } bind $text "auto_completition $text" bind $text "auto_completition $text" bind $text "auto_completition_proc $text" bind $text "auto_completition_proc $text" bind $text Find - bind $text {TextOperation comment} - bind $text {TextOperation uncomment} + bind $text {TextOperation comment} + bind $text {TextOperation uncomment} bind $text Find #bind . PageTab #bind . PageTab @@ -1214,3 +1204,4 @@ GetOp + diff --git a/lib/main.tcl b/lib/main.tcl index 6aa5803..1476aa7 100644 --- a/lib/main.tcl +++ b/lib/main.tcl @@ -110,7 +110,7 @@ proc GetMenu {m} { $m add command -label [::msgcat::mc "Cut"] -font $fontNormal -accelerator "Ctrl+X"\ -command {TextOperation cut} $m add separator - $m add command -label [::msgcat::mc "Select all"] -font $fontNormal -accelerator "Ctrl+A"\ + $m add command -label [::msgcat::mc "Select all"] -font $fontNormal -accelerator "Ctrl+/"\ -command { set nb [$noteBook raise] if {$nb == "" || $nb == "newproj" || $nb == "about" || $nb == "debug"} { @@ -120,9 +120,9 @@ proc GetMenu {m} { SelectAll $nb.text unset nb } - $m add command -label [::msgcat::mc "Comment selected"] -font $fontNormal -accelerator "Ctrl+/"\ - -command {TextOperation comment} - $m add command -label [::msgcat::mc "Uncomment selected"] -font $fontNormal -accelerator "Ctrl+\\" \ + $m add command -label [::msgcat::mc "Comment selected"] -font $fontNormal -accelerator "Ctrl+,"\ + -command {TextOperation comment} + $m add command -label [::msgcat::mc "Uncomment selected"] -font $fontNormal -accelerator "Ctrl+." \ -command {TextOperation uncomment} $m add separator @@ -380,3 +380,4 @@ focus -force $tree + diff --git a/msgs/en.msg b/msgs/en.msg index 001c5f8..6b73841 100644 --- a/msgs/en.msg +++ b/msgs/en.msg @@ -18,6 +18,8 @@ ::msgcat::mcset en "Close all" ::msgcat::mcset en "Close Project Manager?" ::msgcat::mcset en "Comments" +::msgcat::mcset en "Comment selected" +::msgcat::mcset en "Uncomment selected" ::msgcat::mcset en "Company" ::msgcat::mcset en "Compiler" ::msgcat::mcset en "Compile" @@ -164,3 +166,4 @@ + diff --git a/msgs/ru.msg b/msgs/ru.msg index 22cf6d3..908af21 100644 --- a/msgs/ru.msg +++ b/msgs/ru.msg @@ -19,6 +19,8 @@ ::msgcat::mcset ru "Close all" "Закрыть все" ::msgcat::mcset ru "Close Project Manager?" "Выйти из программы?" ::msgcat::mcset ru "Comments" "Коментарии" +::msgcat::mcset ru "Comment selected" "Закоментировать" +::msgcat::mcset ru "Uncomment selected" "Раскоментировать" ::msgcat::mcset ru "Company" "Компания" ::msgcat::mcset ru "Compiler" "Компилятор" ::msgcat::mcset ru "Compile" "Компиляция" @@ -169,3 +171,4 @@ +