Commit b8d4104c authored by Ivica Ico Bukvic's avatar Ivica Ico Bukvic
Browse files

added new tidy option to the k12 module

parent 1cce8451
......@@ -2600,11 +2600,11 @@ proc pdtk_canvas_new {name width height geometry editable} {
$name.m.edit add separator
if { $k12_mode == 0 } {
$name.m.edit add command -label {Tidy Up} \
-command [concat menu_tidyup $name] \
-accelerator [accel_munge "Ctrl+y"] -state disabled
$name.m.edit add command -label {Tidy Up} \
-command [concat menu_tidyup $name] \
-accelerator [accel_munge "Ctrl+y"] -state disabled
if { $k12_mode == 0 } {
$name.m.edit add command -label {Bring To Front} \
-command [concat popup_action $name 3] \
......@@ -2613,8 +2613,11 @@ proc pdtk_canvas_new {name width height geometry editable} {
$name.m.edit add command -label {Send To Back} \
-command [concat popup_action $name 4] \
-accelerator [accel_munge "Ctrl+Down"] -state disabled
}
$name.m.edit add separator
$name.m.edit add separator
if { $k12_mode == 0 } {
if {$pd_nt == 2} { # no key command on Mac OS X, conflicts with standard
$name.m.edit add command -label {Text Editor} \
......@@ -3762,7 +3765,6 @@ proc pdtk_canvas_ctrlkey {name key shift} {
} else {
if { $k12_mode == 0 } {
#if {$key == "y" || $key == "Y"} {menu_tidyup $name}
if {$key == "y" || $key == "Y"} {pdtk_canvas_edit_menu_actions $topname "Tidy Up"}
#if {$key == "Up"} {popup_action $name 3}
if {$key == "Up"} {pdtk_canvas_edit_menu_actions $topname "Bring To Front"}
#if {$key == "Down"} {popup_action $name 4}
......@@ -3770,6 +3772,7 @@ proc pdtk_canvas_ctrlkey {name key shift} {
if {$key == "p" || $key == "P"} {menu_print $topname}
if {$key == "b" || $key == "B"} {::helpbrowser::open_helpbrowser}
}
if {$key == "y" || $key == "Y"} {pdtk_canvas_edit_menu_actions $topname "Tidy Up"}
if {$key == "q" || $key == "Q"} {menu_quit}
#if {$key == "z" || $key == "Z"} {menu_undo $topname}
if {$key == "z" || $key == "Z"} {pdtk_canvas_edit_menu_actions $topname Undo*}
......@@ -5861,8 +5864,8 @@ proc pdtk_canvas_update_edit_menu {name value} {
$name.m.edit entryconfigure "Reselect" -state normal
$name.m.edit entryconfigure "Bring To Front" -state normal
$name.m.edit entryconfigure "Send To Back" -state normal
$name.m.edit entryconfigure "Tidy Up" -state normal
}
$name.m.edit entryconfigure "Tidy Up" -state normal
} else {
$name.m.edit entryconfigure "Cut" -state disabled
......@@ -5872,8 +5875,8 @@ proc pdtk_canvas_update_edit_menu {name value} {
$name.m.edit entryconfigure "Reselect" -state disabled
$name.m.edit entryconfigure "Bring To Front" -state disabled
$name.m.edit entryconfigure "Send To Back" -state disabled
$name.m.edit entryconfigure "Tidy Up" -state disabled
}
$name.m.edit entryconfigure "Tidy Up" -state disabled
}
if {!$global_clipboard} {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment