aboutsummaryrefslogtreecommitdiff
path: root/pd/tcl/pdtk_canvas.tcl
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2011-10-09 16:41:04 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2011-10-09 16:41:04 +0000
commite1fc51c3a1d944193032d8bb1d95741d090b6d3b (patch)
tree7a2121c73a5acb69a080e73ad8e3b50cc3670616 /pd/tcl/pdtk_canvas.tcl
parent21c068f1916330e90f814bed461fe0821d1665ec (diff)
checked in pd-0.43-1test4.src.tar.gz
svn path=/trunk/; revision=15558
Diffstat (limited to 'pd/tcl/pdtk_canvas.tcl')
-rw-r--r--pd/tcl/pdtk_canvas.tcl19
1 files changed, 11 insertions, 8 deletions
diff --git a/pd/tcl/pdtk_canvas.tcl b/pd/tcl/pdtk_canvas.tcl
index c1a85420..3ed8e0b6 100644
--- a/pd/tcl/pdtk_canvas.tcl
+++ b/pd/tcl/pdtk_canvas.tcl
@@ -127,6 +127,8 @@ proc pdtk_canvas_saveas {name initialfile initialdir} {
set basename [file tail $filename]
pdsend "$name savetofile [enquote_path $basename] [enquote_path $dirname]"
set ::filenewdir $dirname
+ # add to recentfiles
+ ::pd_guiprefs::update_recentfiles $filename
}
##### ask user Save? Discard? Cancel?, and if so, send a message on to Pd ######
@@ -180,7 +182,15 @@ proc pdtk_canvas_rightclick {tkcanvas x y b} {
proc pdtk_canvas_clickpaste {tkcanvas x y b} {
pdtk_canvas_mouse $tkcanvas $x $y $b 0
pdtk_canvas_mouseup $tkcanvas $x $y $b
- pdtk_pastetext
+ if { [catch {set pdtk_pastebuffer [selection get]}] } {
+ # no selection... do nothing
+ } else {
+ for {set i 0} {$i < [string length $pdtk_pastebuffer]} {incr i 1} {
+ set cha [string index $pdtk_pastebuffer $i]
+ scan $cha %c keynum
+ pdsend "pd key 1 $keynum 0"
+ }
+ }
}
#------------------------------------------------------------------------------#
@@ -264,13 +274,6 @@ proc ::pdtk_canvas::pdtk_canvas_editmode {mytoplevel state} {
set ::editmode_button $state
set ::editmode($mytoplevel) $state
event generate $mytoplevel <<EditMode>>
- # can't change the menu background color on Aqua
- if {$::windowingsystem eq "aqua"} {return}
- if {$state == 0} {
- $::pd_menus::menubar.edit entryconfigure [_ "Edit Mode"] -background {}
- } else {
- $::pd_menus::menubar.edit entryconfigure [_ "Edit Mode"] -background green
- }
}
# message from Pd to update the currently available undo/redo action