[PD-cvs] pd/src u_main.tk,1.25.6.1,1.25.6.2
Hans-Christoph Steiner
eighthave at users.sourceforge.net
Sun Nov 4 22:13:10 CET 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18162
Modified Files:
Tag: branch-v0-40-extended
u_main.tk
Log Message:
tailored keybindings_and_panels-0.41-test06.patch to this branch, it is in the
patch tracker under #1825692.
- makes standard key bindings on all the panels (find, prefs, etc)
- adds live font resizing to the font panel
- adds a checkbox to turn on/off text in Pd window
- adds menu item to clear the Pd window's text
- adds Ctrl/Cmd-B to open Help Browser
- add the standard menus to the Pd window
Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.25.6.1
retrieving revision 1.25.6.2
diff -C2 -d -r1.25.6.1 -r1.25.6.2
*** u_main.tk 4 Nov 2007 18:00:20 -0000 1.25.6.1
--- u_main.tk 4 Nov 2007 21:13:08 -0000 1.25.6.2
***************
*** 132,157 ****
set help_top_directory $pd_guidir/doc
- # it's unfortunate but we seem to have to turn off global bindings
- # for Text objects to get control-s and control-t to do what we want for
- # "text" dialogs below. Also we have to get rid of tab's changing the focus.
-
- bind all <Key-Tab> ""
- bind all <<PrevWindow>> ""
- bind Text <Control-t> {}
- bind Text <Control-s> {}
- # puts stderr [bind all]
-
################## set up main window #########################
# the menus are instantiated here for the main window
# for the patch windows, they are created by pdtk_canvas_new
menu .mbar
- canvas .dummy -height 2p -width 6c
- frame .controls
- pack .controls .dummy -side top -fill x
menu .mbar.file -tearoff $pd_tearoff
! .mbar add cascade -label "File" -menu .mbar.file
menu .mbar.find -tearoff $pd_tearoff
! .mbar add cascade -label "Find" -menu .mbar.find
menu .mbar.windows -postcommand [concat pdtk_fixwindowmenu] -tearoff $pd_tearoff
menu .mbar.audio -tearoff $pd_tearoff
--- 132,148 ----
set help_top_directory $pd_guidir/doc
################## set up main window #########################
# the menus are instantiated here for the main window
# for the patch windows, they are created by pdtk_canvas_new
menu .mbar
menu .mbar.file -tearoff $pd_tearoff
! .mbar add cascade -label File -menu .mbar.file
! menu .mbar.edit -tearoff $pd_tearoff
! .mbar add cascade -label Edit -menu .mbar.edit
! menu .mbar.put -tearoff $pd_tearoff
! .mbar add cascade -label Put -menu .mbar.put
menu .mbar.find -tearoff $pd_tearoff
! .mbar add cascade -label Find -menu .mbar.find
menu .mbar.windows -postcommand [concat pdtk_fixwindowmenu] -tearoff $pd_tearoff
menu .mbar.audio -tearoff $pd_tearoff
***************
*** 180,188 ****
--- 171,190 ----
}
+ proc showhide_printouttext {state} {
+ if {$state} {
+ pack .printout -side bottom -fill both -expand 1
+ } else {
+ pack forget .printout
+ }
+ }
+
set ctrls_audio_on 0
set ctrls_meter_on 0
set ctrls_inlevel 0
set ctrls_outlevel 0
+ set show_text_window 0
+ frame .controls
+ pack .controls -fill x -expand 1
frame .controls.switches
checkbutton .controls.switches.audiobutton -text {compute audio} \
***************
*** 194,199 ****
-command {pd [concat pd meters $ctrls_meter_on \;]}
pack .controls.switches.audiobutton .controls.switches.meterbutton \
! -side top -anchor w
frame .controls.inout
--- 196,205 ----
-command {pd [concat pd meters $ctrls_meter_on \;]}
+ checkbutton .controls.switches.textwindow -text {text window} \
+ -variable show_text_window \
+ -command {showhide_printouttext $show_text_window}
+
pack .controls.switches.audiobutton .controls.switches.meterbutton \
! .controls.switches.textwindow -side top -anchor w
frame .controls.inout
***************
*** 237,245 ****
proc pdtk_standardkeybindings {id} {
global pd_nt
- bind $id <Control-Key> {pdtk_pd_ctrlkey %W %K 0}
- bind $id <Control-Shift-Key> {pdtk_pd_ctrlkey %W %K 1}
if {$pd_nt == 2} {
bind $id <Mod1-Key> {pdtk_canvas_ctrlkey %W %K 0}
bind $id <Mod1-Shift-Key> {pdtk_canvas_ctrlkey %W %K 1}
}
}
--- 243,264 ----
proc pdtk_standardkeybindings {id} {
global pd_nt
if {$pd_nt == 2} {
bind $id <Mod1-Key> {pdtk_canvas_ctrlkey %W %K 0}
bind $id <Mod1-Shift-Key> {pdtk_canvas_ctrlkey %W %K 1}
+ } else {
+ bind $id <Control-Key> {pdtk_pd_ctrlkey %W %K 0}
+ bind $id <Control-Shift-Key> {pdtk_pd_ctrlkey %W %K 1}
+ }
+ }
+
+ proc pdtk_panelkeybindings {id panelname} {
+ global pd_nt
+ pdtk_standardkeybindings $id
+ bind $id <KeyPress-Escape> [format "%s_cancel %s" $panelname $id]
+ bind $id <KeyPress-Return> [format "%s_ok %s" $panelname $id]
+ if {$pd_nt == 2} {
+ bind $id <Mod1-Key-w> [format "%s_cancel %s" $panelname $id]
+ } else {
+ bind $id <Control-Key-w> [format "%s_cancel %s" $panelname $id]
}
}
***************
*** 247,250 ****
--- 266,275 ----
pdtk_standardkeybindings .
+ if {$pd_nt == 2} {
+ bind .printout.text <Mod1-Key-a> {puts stderr ARG.printout.text}
+ } else {
+ bind .printout.text <Control-Key-a> {puts stderr ARG.printout.text}
+ }
+
wm title . "Pd"
# initial location of Pd window (+x+y)
***************
*** 379,394 ****
################## the "Message" menu command #########################
proc menu_send {} {
toplevel .sendpanel
entry .sendpanel.entry -textvariable send_textvariable
pack .sendpanel.entry -side bottom -fill both -ipadx 100
.sendpanel.entry select from 0
.sendpanel.entry select adjust end
bind .sendpanel.entry <KeyPress-Return> {
pd [concat $send_textvariable \;]
}
- pdtk_standardkeybindings .sendpanel.entry
focus .sendpanel.entry
}
################## the "Quit" menu command #########################
proc menu_really_quit {} {pd {pd quit;}}
--- 404,430 ----
################## the "Message" menu command #########################
proc menu_send {} {
+ global pd_nt
+ destroy .sendpanel
toplevel .sendpanel
+ pdtk_standardkeybindings .sendpanel
entry .sendpanel.entry -textvariable send_textvariable
pack .sendpanel.entry -side bottom -fill both -ipadx 100
.sendpanel.entry select from 0
.sendpanel.entry select adjust end
+ if {$pd_nt == 2} {
+ bind .sendpanel <Mod1-Key-w> {destroy .sendpanel}
+ } else {
+ bind .sendpanel <Control-Key-w> {destroy .sendpanel}
+ }
+ bind .sendpanel <KeyPress-Escape> {destroy .sendpanel}
bind .sendpanel.entry <KeyPress-Return> {
pd [concat $send_textvariable \;]
}
focus .sendpanel.entry
}
+ ################## the "Clear Pd window" menu command #########################
+ proc menu_clear_pd_window {} {.printout.text delete 0.0 end}
+
################## the "Quit" menu command #########################
proc menu_really_quit {} {pd {pd quit;}}
***************
*** 471,478 ****
################## help browser and support functions #########################
! proc menu_doc_browser {dir} {
! global .mbar
! if {![file isdirectory $dir]} {
! puts stderr "menu_doc_browser non-directory $dir\n"
}
if { [winfo exists .help_browser.frame] } {
--- 507,514 ----
################## help browser and support functions #########################
! proc menu_doc_browser {} {
! global .mbar pd_nt help_top_directory
! if {![file isdirectory $help_top_directory]} {
! puts stderr "menu_doc_browser non-directory $help_top_directory\n"
}
if { [winfo exists .help_browser.frame] } {
***************
*** 483,487 ****
frame .help_browser.frame
pack .help_browser.frame -side top -fill both
! doc_make_listbox .help_browser.frame $dir 0
}
}
--- 519,529 ----
frame .help_browser.frame
pack .help_browser.frame -side top -fill both
! pdtk_standardkeybindings .help_browser
! if {$pd_nt == 2} {
! bind .help_browser <Mod1-Key-w> {destroy .help_browser}
! } else {
! bind .help_browser <Control-Key-w> {destroy .help_browser}
! }
! doc_make_listbox .help_browser.frame $help_top_directory 0
}
}
***************
*** 604,608 ****
-command {menu_doc_open doc/1.manual index.htm}
$mbar.help add command -label {Browser ...} \
! -command {menu_doc_browser $help_top_directory}
$mbar.help add separator
$mbar.help add command -label {puredata.org} \
--- 646,651 ----
-command {menu_doc_open doc/1.manual index.htm}
$mbar.help add command -label {Browser ...} \
! -accelerator [accel_munge "Ctrl+b"] \
! -command {menu_doc_browser}
$mbar.help add separator
$mbar.help add command -label {puredata.org} \
***************
*** 642,646 ****
--- 685,734 ----
-accelerator [accel_munge "Ctrl+q"]
+
+ #################### the "Edit" menu for the Pd window ##############
+ # this is mostly a placeholder
+ .mbar.edit add command -label Undo -accelerator [accel_munge "Ctrl+z"] \
+ -state disabled
+ .mbar.edit add command -label Redo -accelerator [accel_munge "Ctrl+Z"] \
+ -state disabled
+ .mbar.edit add separator
+ # this should apply to .printout.text
+ .mbar.edit add command -label Cut -accelerator [accel_munge "Ctrl+x"] \
+ -state disabled
+ # this should apply to .printout.text
+ .mbar.edit add command -label Copy -accelerator [accel_munge "Ctrl+c"] \
+ -state disabled
+ .mbar.edit add command -label Paste -accelerator [accel_munge "Ctrl+v"] \
+ -state disabled
+ .mbar.edit add command -label Duplicate -accelerator [accel_munge "Ctrl+d"] \
+ -state disabled
+ # this should apply to .printout.text
+ .mbar.edit add command -label {Select all} -accelerator [accel_munge "Ctrl+a"] \
+ -state disabled
+ .mbar.edit add separator
+ .mbar.edit add command -label {Text Editor} \
+ -accelerator "Ctrl-T" -state disabled
+ .mbar.edit add command -label Font -state disabled
+ .mbar.edit add command -label {Tidy Up} -state disabled
+ .mbar.edit add command -label {Clear Pd window} \
+ -accelerator [accel_munge "Ctrl+r"] -command menu_clear_pd_window
+ .mbar.edit add separator
+ # this should apply to .printout.text
+ .mbar.edit add command -label {Find...} -accelerator [accel_munge "Ctrl+f"] \
+ -state disabled
+ # this should apply to .printout.text
+ .mbar.edit add command -label {Find Again} -accelerator [accel_munge "Ctrl+g"] \
+ -state disabled
+ .mbar.edit add command -label {Find last error}
+ .mbar.edit add separator
+ .mbar.edit add command -label {Edit mode} -accelerator [accel_munge "Ctrl+e"] \
+ -state disabled
+
#################### the "Find" menu for the Pd window ##############
+
+ .mbar.find add command -label Find -accelerator [accel_munge "Ctrl+f"] \
+ -state disabled
+ .mbar.find add command -label {Find Again} -accelerator [accel_munge "Ctrl+g"] \
+ -state disabled
.mbar.find add command -label {Find last error} -command {menu_finderror}
***************
*** 871,875 ****
set find_count 1
! proc find_apply {name} {
global find_string
global find_canvas
--- 959,963 ----
set find_count 1
! proc find_ok {name} {
global find_string
global find_canvas
***************
*** 899,902 ****
--- 987,993 ----
toplevel $name
+ #bind $name <FocusIn> "puts stderr \"bind focus $name.entry\""
+ pdtk_panelkeybindings $name "find"
+
label $name.label -text {find...}
pack $name.label -side top
***************
*** 910,914 ****
-command "find_cancel $name"
button $name.buttonframe.ok -text {OK}\
! -command "find_apply $name"
pack $name.buttonframe.cancel -side left -expand 1
pack $name.buttonframe.ok -side left -expand 1
--- 1001,1005 ----
-command "find_cancel $name"
button $name.buttonframe.ok -text {OK}\
! -command "find_ok $name"
pack $name.buttonframe.cancel -side left -expand 1
pack $name.buttonframe.ok -side left -expand 1
***************
*** 916,922 ****
$name.entry select from 0
$name.entry select adjust end
! bind $name.entry <KeyPress-Return> [ concat find_apply $name]
! pdtk_standardkeybindings $name.entry
focus $name.entry
}
--- 1007,1013 ----
$name.entry select from 0
$name.entry select adjust end
! #puts stderr "before focus $name.entry"
focus $name.entry
+ #puts stderr "after focus $name.entry"
}
***************
*** 1043,1047 ****
$name.m.edit add command -label {Text Editor} \
-command [concat menu_texteditor $name] \
! -accelerator [accel_munge "Ctrl+t"]
$name.m.edit add command -label Font \
--- 1134,1138 ----
$name.m.edit add command -label {Text Editor} \
-command [concat menu_texteditor $name] \
! -accelerator "Ctrl-T"
$name.m.edit add command -label Font \
***************
*** 1051,1054 ****
--- 1142,1149 ----
-command [concat menu_tidyup $name]
+ $name.m.edit add command -label {Clear Pd window} \
+ -accelerator [accel_munge "Ctrl+r"] \
+ -command [concat menu_clear_pd_window]
+
$name.m.edit add separator
***************
*** 1075,1079 ****
if { $editable == 0 } {
! $name.m.edit entryconfigure "Edit mode" -indicatoron false }
--- 1170,1175 ----
if { $editable == 0 } {
! $name.m.edit entryconfigure "Edit mode" -indicatoron false
! }
***************
*** 1711,1714 ****
--- 1807,1811 ----
if {$key == "s" || $key == "S"} {menu_save $topname}
if {$key == "z" || $key == "Z"} {menu_undo $topname}
+ if {$key == "b" || $key == "B"} {menu_doc_browser}
if {$key == "n" || $key == "N"} {menu_new}
if {$key == "o" || $key == "O"} {menu_open}
***************
*** 1716,1719 ****
--- 1813,1817 ----
if {$key == "w" || $key == "W"} {menu_close $topname}
if {$key == "p" || $key == "P"} {menu_print $topname}
+ if {$key == "r" || $key == "R"} {menu_clear_pd_window}
if {$key == "x" || $key == "X"} {menu_cut $topname}
if {$key == "c" || $key == "C"} {menu_copy $topname}
***************
*** 1803,1814 ****
set fontsize 0
set stretchval 0
set whichstretch 0
! proc dofont_apply {name} {
! global fontsize
global stretchval
global whichstretch
! set cmd [concat $name font $fontsize $stretchval $whichstretch \;]
# puts stderr $cmd
pd $cmd
--- 1901,1918 ----
set fontsize 0
+ set dofont_fontsize 0
set stretchval 0
set whichstretch 0
! proc dofont_apply {name myfontsize} {
global stretchval
global whichstretch
! set cmd [concat $name font $myfontsize $stretchval $whichstretch \;]
! # puts stderr $cmd
! pd $cmd
! }
!
! proc dofont_close {name} {
! set cmd [concat $name cancel \;]
# puts stderr $cmd
pd $cmd
***************
*** 1816,1819 ****
--- 1920,1925 ----
proc dofont_cancel {name} {
+ global fontsize
+ dofont_apply $name $fontsize
set cmd [concat $name cancel \;]
# puts stderr $cmd
***************
*** 1821,1828 ****
}
proc pdtk_canvas_dofont {name initsize} {
! global fontsize
! set fontsize $initsize
global stretchval
--- 1927,1940 ----
}
+ proc dofont_ok {name} {
+ global fontsize dofont_fontsize
+ set fontsize $dofont_fontsize
+ dofont_apply $name $fontsize
+ dofont_close $name
+ }
+
proc pdtk_canvas_dofont {name initsize} {
! global dofont_fontsize
global stretchval
***************
*** 1836,1845 ****
wm protocol $name WM_DELETE_WINDOW [concat dofont_cancel $name]
frame $name.buttonframe
pack $name.buttonframe -side bottom -fill x -pady 2m
button $name.buttonframe.cancel -text {Cancel}\
-command "dofont_cancel $name"
! button $name.buttonframe.ok -text {Do it}\
! -command "dofont_apply $name"
pack $name.buttonframe.cancel -side left -expand 1
pack $name.buttonframe.ok -side left -expand 1
--- 1948,1959 ----
wm protocol $name WM_DELETE_WINDOW [concat dofont_cancel $name]
+ pdtk_panelkeybindings $name dofont
+
frame $name.buttonframe
pack $name.buttonframe -side bottom -fill x -pady 2m
button $name.buttonframe.cancel -text {Cancel}\
-command "dofont_cancel $name"
! button $name.buttonframe.ok -text {OK}\
! -command "dofont_ok $name"
pack $name.buttonframe.cancel -side left -expand 1
pack $name.buttonframe.ok -side left -expand 1
***************
*** 1851,1860 ****
pack $name.radiof.label -side top
! radiobutton $name.radiof.radio8 -value 8 -variable fontsize -text "8"
! radiobutton $name.radiof.radio10 -value 10 -variable fontsize -text "10"
! radiobutton $name.radiof.radio12 -value 12 -variable fontsize -text "12"
! radiobutton $name.radiof.radio16 -value 16 -variable fontsize -text "16"
! radiobutton $name.radiof.radio24 -value 24 -variable fontsize -text "24"
! radiobutton $name.radiof.radio36 -value 36 -variable fontsize -text "36"
pack $name.radiof.radio8 -side top -anchor w
pack $name.radiof.radio10 -side top -anchor w
--- 1965,1980 ----
pack $name.radiof.label -side top
! radiobutton $name.radiof.radio8 -value 8 -variable dofont_fontsize -text "8" \
! -command [concat dofont_apply $name 8]
! radiobutton $name.radiof.radio10 -value 10 -variable dofont_fontsize -text "10" \
! -command [concat dofont_apply $name 10]
! radiobutton $name.radiof.radio12 -value 12 -variable dofont_fontsize -text "12" \
! -command [concat dofont_apply $name 12]
! radiobutton $name.radiof.radio16 -value 16 -variable dofont_fontsize -text "16" \
! -command [concat dofont_apply $name 16]
! radiobutton $name.radiof.radio24 -value 24 -variable dofont_fontsize -text "24" \
! -command [concat dofont_apply $name 24]
! radiobutton $name.radiof.radio36 -value 36 -variable dofont_fontsize -text "36" \
! -command [concat dofont_apply $name 36]
pack $name.radiof.radio8 -side top -anchor w
pack $name.radiof.radio10 -side top -anchor w
***************
*** 1974,1979 ****
set vid [string trimleft $id .]
- global pd_nt
-
set var_gatomwidth [concat gatomwidth_$vid]
global $var_gatomwidth
--- 2094,2097 ----
***************
*** 2004,2007 ****
--- 2122,2127 ----
wm protocol $id WM_DELETE_WINDOW [concat dogatom_cancel $id]
+ pdtk_panelkeybindings $id "dogatom"
+
frame $id.params -height 7
pack $id.params -side top
***************
*** 2085,2094 ****
pack $id.buttonframe.ok -side left -expand 1
- bind $id.limits.upper.entry <KeyPress-Return> [concat dogatom_ok $id]
- bind $id.limits.lower.entry <KeyPress-Return> [concat dogatom_ok $id]
- bind $id.params.entry <KeyPress-Return> [concat dogatom_ok $id]
- pdtk_standardkeybindings $id.limits.upper.entry
- pdtk_standardkeybindings $id.limits.lower.entry
- pdtk_standardkeybindings $id.params.entry
$id.params.entry select from 0
$id.params.entry select adjust end
--- 2205,2208 ----
***************
*** 2613,2616 ****
--- 2727,2732 ----
wm protocol $id WM_DELETE_WINDOW [concat iemgui_cancel $id]
+ pdtk_panelkeybindings $id "iemgui"
+
frame $id.dim
pack $id.dim -side top
***************
*** 2864,2892 ****
}
- bind $id.dim.w_ent <KeyPress-Return> [concat iemgui_ok $id]
- bind $id.dim.h_ent <KeyPress-Return> [concat iemgui_ok $id]
- bind $id.rng.min_ent <KeyPress-Return> [concat iemgui_ok $id]
- bind $id.rng.max_ent <KeyPress-Return> [concat iemgui_ok $id]
- bind $id.para.num_ent <KeyPress-Return> [concat iemgui_ok $id]
- bind $id.s_r.send.ent <KeyPress-Return> [concat iemgui_ok $id]
- bind $id.s_r.receive.ent <KeyPress-Return> [concat iemgui_ok $id]
- bind $id.label.name_entry <KeyPress-Return> [concat iemgui_ok $id]
- bind $id.label.xy.x_entry <KeyPress-Return> [concat iemgui_ok $id]
- bind $id.label.xy.y_entry <KeyPress-Return> [concat iemgui_ok $id]
- bind $id.label.fontsize_entry <KeyPress-Return> [concat iemgui_ok $id]
- bind $id.cao.ok <KeyPress-Return> [concat iemgui_ok $id]
- pdtk_standardkeybindings $id.dim.w_ent
- pdtk_standardkeybindings $id.dim.h_ent
- pdtk_standardkeybindings $id.rng.min_ent
- pdtk_standardkeybindings $id.rng.max_ent
- pdtk_standardkeybindings $id.para.num_ent
- pdtk_standardkeybindings $id.s_r.send.ent
- pdtk_standardkeybindings $id.s_r.receive.ent
- pdtk_standardkeybindings $id.label.name_entry
- pdtk_standardkeybindings $id.label.xy.x_entry
- pdtk_standardkeybindings $id.label.xy.y_entry
- pdtk_standardkeybindings $id.label.fontsize_entry
- pdtk_standardkeybindings $id.cao.ok
-
$id.dim.w_ent select from 0
$id.dim.w_ent select adjust end
--- 2980,2983 ----
***************
*** 2967,2970 ****
--- 3058,3063 ----
wm protocol $id WM_DELETE_WINDOW [concat array_cancel $id]
+ pdtk_panelkeybindings $id "array"
+
frame $id.name
pack $id.name -side top
***************
*** 3033,3040 ****
pack $id.buttonframe.ok -side left -expand 1
- bind $id.name.entry <KeyPress-Return> [concat array_ok $id]
- bind $id.n.entry <KeyPress-Return> [concat array_ok $id]
- pdtk_standardkeybindings $id.name.entry
- pdtk_standardkeybindings $id.n.entry
$id.name.entry select from 0
$id.name.entry select adjust end
--- 3126,3129 ----
***************
*** 3227,3230 ****
--- 3316,3321 ----
wm protocol $id WM_DELETE_WINDOW [concat canvas_cancel $id]
+ pdtk_panelkeybindings $id "canvas"
+
label $id.toplabel -text "Canvas Properties"
pack $id.toplabel -side top
***************
*** 3296,3303 ****
pack $id.buttonframe.ok -side left -expand 1
- bind $id.xscale.entry <KeyPress-Return> [concat canvas_ok $id]
- bind $id.yscale.entry <KeyPress-Return> [concat canvas_ok $id]
- pdtk_standardkeybindings $id.xscale.entry
- pdtk_standardkeybindings $id.yscale.entry
$id.xscale.entry select from 0
$id.xscale.entry select adjust end
--- 3387,3390 ----
***************
*** 3339,3342 ****
--- 3426,3433 ----
wm protocol $name WM_DELETE_WINDOW [concat dodata_cancel $name]
+ pdtk_panelkeybindings $name "dodata"
+ bind $name <Control-t> [concat dodata_ok $name]
+ bind $name <Control-s> [concat dodata_send $name]
+
frame $name.buttonframe
pack $name.buttonframe -side bottom -fill x -pady 2m
***************
*** 3355,3360 ****
$name.text insert end $stuff
focus $name.text
- bind $name.text <Control-t> [concat dodata_ok $name]
- bind $name.text <Control-s> [concat dodata_send $name]
}
--- 3446,3449 ----
***************
*** 3535,3538 ****
--- 3624,3631 ----
wm title $name {TEXT}
+ pdtk_standardkeybindings $name
+ bind $name <Control-t> {texteditor_ok %W}
+ bind $name <Control-s> {texteditor_send %W}
+
frame $name.buttons
pack $name.buttons -side bottom -fill x -pady 2m
***************
*** 3551,3556 ****
$name.text insert end $stuff
focus $name.text
- bind $name.text <Control-t> {texteditor_ok %W}
- bind $name.text <Control-s> {texteditor_send %W}
}
--- 3644,3647 ----
***************
*** 3754,3757 ****
--- 3845,3850 ----
wm protocol $id WM_DELETE_WINDOW [concat audio_cancel $id]
+ pdtk_panelkeybindings $id "audio"
+
frame $id.buttonframe
pack $id.buttonframe -side bottom -fill x -pady 2m
***************
*** 3910,3924 ****
pack $id.longbutton.b
}
- bind $id.srf.x1 <KeyPress-Return> [concat audio_ok $id]
- bind $id.srf.x2 <KeyPress-Return> [concat audio_ok $id]
- bind $id.in1f.x2 <KeyPress-Return> [concat audio_ok $id]
- bind $id.out1f.x2 <KeyPress-Return> [concat audio_ok $id]
$id.srf.x1 select from 0
$id.srf.x1 select adjust end
focus $id.srf.x1
- pdtk_standardkeybindings $id.srf.x1
- pdtk_standardkeybindings $id.srf.x2
- pdtk_standardkeybindings $id.in1f.x2
- pdtk_standardkeybindings $id.out1f.x2
}
--- 4003,4009 ----
***************
*** 4003,4006 ****
--- 4088,4093 ----
wm protocol $id WM_DELETE_WINDOW [concat midi_cancel $id]
+ pdtk_panelkeybindings $id "midi"
+
frame $id.buttonframe
pack $id.buttonframe -side bottom -fill x -pady 2m
***************
*** 4137,4140 ****
--- 4224,4229 ----
wm protocol $id WM_DELETE_WINDOW [concat midi_cancel $id]
+ pdtk_panelkeybindings $id "midi"
+
frame $id.buttonframe
pack $id.buttonframe -side bottom -fill x -pady 2m
***************
*** 4294,4297 ****
--- 4383,4388 ----
wm protocol $id WM_DELETE_WINDOW [concat path_cancel $id]
+ pdtk_panelkeybindings $id "path"
+
frame $id.buttonframe
pack $id.buttonframe -side bottom -fill x -pady 2m
***************
*** 4319,4324 ****
for {set x 0} {$x < 10} {incr x} {
entry $id.f$x -textvariable pd_path$x -width 80
- bind $id.f$x <KeyPress-Return> [concat path_ok $id]
- pdtk_standardkeybindings $id.f$x
pack $id.f$x -side top
}
--- 4410,4413 ----
***************
*** 4368,4371 ****
--- 4457,4462 ----
wm protocol $id WM_DELETE_WINDOW [concat startup_cancel $id]
+ pdtk_panelkeybindings $id "startup"
+
frame $id.buttonframe
pack $id.buttonframe -side bottom -fill x -pady 2m
***************
*** 4384,4389 ****
label $id.flags.entryname -text {startup flags}
entry $id.flags.entry -textvariable pd_flags -width 80
- bind $id.flags.entry <KeyPress-Return> [concat startup_ok $id]
- pdtk_standardkeybindings $id.flags.entry
pack $id.flags.entryname $id.flags.entry -side left
--- 4475,4478 ----
***************
*** 4404,4409 ****
for {set x 0} {$x < 10} {incr x} {
entry $id.f$x -textvariable pd_startup$x -width 80
- bind $id.f$x <KeyPress-Return> [concat startup_ok $id]
- pdtk_standardkeybindings $id.f$x
pack $id.f$x -side top
}
--- 4493,4496 ----
More information about the Pd-cvs
mailing list