Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14035
Modified Files: Tag: devel_0_39 desire.tk Log Message: started with keybindings...
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.213 retrieving revision 1.1.2.214 diff -C2 -d -r1.1.2.213 -r1.1.2.214 *** desire.tk 27 May 2006 22:16:03 -0000 1.1.2.213 --- desire.tk 30 May 2006 00:15:11 -0000 1.1.2.214 *************** *** 351,354 **** --- 351,411 ---- }
+ #-----------------------------------------------------------------------------------# + set key(Object) "Ctrl+1" + set key(Message) "Ctrl+2" + set key(Number) "Ctrl+3" + set key(Symbol) "Ctrl+4" + set key(Comment) "Ctrl+5" + set key(Bang) "Alt+b" + set key(Toggle) "Alt+t" + set key(Number2) "Alt+n" + set key(Vslider) "Alt+v" + set key(Hslider) "Alt+h" + set key(Vradio) "Alt+d" + set key(Hradio) "Alt+i" + set key(VU) "Alt+u" + set key(dropper) "Alt+x" + set key(Canvas) "Alt+c" + set key(Graph) "" + set key(Array) "" + set key(parentwindow) "" + set key(Pdwindow) "" + set key(new_file) "Ctrl+n" + set key(open_file) "Ctrl+o" + set key(pdrc_editor) "Ctrl+p" + set key(ddrc_editor) "Ctrl+l" + set key(send_message) "Ctrl+m" + set key(paths) "" + set key(quit) "Ctrl+q" + set key(find) "Ctrl+f" + set key(find_again) "Ctrl+g" + set key(find_last_error) "" + set key(audio_on) "Ctrl+/" + set key(audio_off) "Ctrl+." + set key(audio_settings) "" + set key(midi_settings) "" + set key(test_audio_and_midi) "" + set key(load_meter) "" + set key(latency_meter) "" + set key(about) "" + set key(class_browser) "" + set key(quit) "Ctrl+q" + set key(close) "Ctrl+w" + set key(save) "Ctrl+s" + set key(save_as) "Ctrl+S" + set key(cut) "Ctrl+x" + set key(copy) "Ctrl+c" + set key(print) "Ctrl+p" + set key(undo) "Ctrl+z" + set key(redo) "Ctrl+Z" + set key(paste) "Ctrl+v" + set key(duplicate) "Ctrl+d" + set key(select_all) "Ctrl+a" + set key(text_editor) "Ctrl+t" + set key(font_bomb) "" + set key(tidy_up) "" + set key(reload) "" + set key(redraw) "" + set key(crosshair) "" ################## set up main window #########################
*************** *** 361,364 **** --- 418,422 ---- def Client init_binds {} { global OS + set @accels {} bind . <Control-Key> {$main ctrlkey %K 0} bind . <Control-Shift-Key> {$main ctrlkey %K 1} *************** *** 639,651 **** } def Menuable populate_menu_1 {menu e} { if {[llength $e]==0} {$menu add separator; return} mset {text cmd accel} $e if {![llength $cmd]} { set cmd "%W $text" set text [say $text] } ! set accel [accel_munge $accel] regsub -all %W $cmd $self cmd ! if {$accel != ""} {dict set @accels $accel $cmd} if {[llength $e]==3} { $menu add command -label $text -command $cmd \ --- 697,717 ---- } def Menuable populate_menu_1 {menu e} { + global key if {[llength $e]==0} {$menu add separator; return} mset {text cmd accel} $e + set accel [accel_munge $key($text)] if {![llength $cmd]} { set cmd "%W $text" set text [say $text] } ! #set accel [accel_munge $accel] regsub -all %W $cmd $self cmd ! if {$accel != ""} { ! if {![dict exists $@accels $accel]} { ! dict set @accels $accel $cmd} else { ! puts "***** warning:: $accel already assigned *****" ! dict set @accels $accel $cmd ! } ! } if {[llength $e]==3} { $menu add command -label $text -command $cmd \ *************** *** 710,713 **** --- 776,780 ---- set key "Ctrl+$key" if {[dict exists $@accels $key]} { + puts "key ==== $key | cmd === [dict get $@accels $key]" $self eval% [dict get $@accels $key] return *************** *** 760,764 **** default {concat 1}}] set look(minobjwidth) 21 - #-----------------------------------------------------------------------------------# proc read_ddrc {} { --- 827,830 ---- *************** *** 821,824 **** --- 887,891 ---- set @ninlets 1 set @noutlets 0 + set @accels {} super } *************** *** 965,969 **** $main populate_menu .mbar.help { {about {} ""} - {"Pure Documentation..." {} ""} {class_browser {} ""} } --- 1032,1035 ---- *************** *** 1179,1183 **** def Canvas new_menubar {editable} { set name .$self ! global pd_opendir pd_tearoff OS cmdline set m $name.m menu $m --- 1245,1249 ---- def Canvas new_menubar {editable} { set name .$self ! global pd_opendir pd_tearoff OS cmdline key set m $name.m menu $m *************** *** 1214,1220 **** {redraw {} {}}} # {crosshair {global crosshair; set crosshair [expr !!$crosshair]} "" toggle} - $self populate_menu put { ! {Object {[%W canvas] editmode= 1; pd .%W obj %X %Y} "Ctrl+1"} {Message {[%W canvas] editmode= 1;pd .%W msg %X %Y} "Ctrl+2"} {Number {[%W canvas] editmode= 1;pd .%W floatatom %X %Y} "Ctrl+3"} --- 1280,1285 ---- {redraw {} {}}} # {crosshair {global crosshair; set crosshair [expr !!$crosshair]} "" toggle} $self populate_menu put { ! {Object {[%W canvas] editmode= 1;pd .%W obj %X %Y} "Ctrl+1"} {Message {[%W canvas] editmode= 1;pd .%W msg %X %Y} "Ctrl+2"} {Number {[%W canvas] editmode= 1;pd .%W floatatom %X %Y} "Ctrl+3"} *************** *** 1236,1241 **** {Array {[%W canvas] editmode= 1;pd .%W menuarray} {}}} $self populate_menu window { ! {"parent window" {menu_windowparent} {}} ! {"Pd window" {menu_pop_pd} {}} {} } --- 1301,1306 ---- {Array {[%W canvas] editmode= 1;pd .%W menuarray} {}}} $self populate_menu window { ! {"parentwindow" {menu_windowparent} {}} ! {"Pdwindow" {menu_pop_pd} {}} {} } *************** *** 4142,4146 **** color outletfg color selrect ! section test }
--- 4207,4212 ---- color outletfg color selrect ! section keys ! string put }