Revision: 10020 http://pure-data.svn.sourceforge.net/pure-data/?rev=10020&view=rev Author: eighthave Date: 2008-06-17 15:26:18 -0700 (Tue, 17 Jun 2008)
Log Message: ----------- sorted out default save dirs to use CWD and then update once something has been saved, following this discussion: http://lists.puredata.info/pipermail/pd-list/2008-05/062647.html
Modified Paths: -------------- branches/pd-extended/v0-40/pd/src/u_main.tk
Modified: branches/pd-extended/v0-40/pd/src/u_main.tk =================================================================== --- branches/pd-extended/v0-40/pd/src/u_main.tk 2008-06-17 21:45:27 UTC (rev 10019) +++ branches/pd-extended/v0-40/pd/src/u_main.tk 2008-06-17 22:26:18 UTC (rev 10020) @@ -360,10 +360,10 @@ ############### set up global variables ################################
set untitled_number 1 -if {$pd_nt == 1} { - set untitled_directory [regsub -all \\ $::env(USERPROFILE) /] +if {$pd_nt == 2} { + set untitled_directory $::env(HOME) } else { - set untitled_directory $::env(HOME) + set untitled_directory [pwd] } set pd_opendir $untitled_directory set pd_undoaction no @@ -1277,7 +1277,6 @@
############# pdtk_canvas_new -- create a new canvas ############### proc pdtk_canvas_new {name width height geometry editable} { - global pd_opendir global pd_tearoff global pd_nt global tcl_version @@ -2163,12 +2162,10 @@ } }
-set saveas_dir nowhere - ############ pdtk_canvas_saveas -- run a saveas dialog ##############
proc pdtk_canvas_saveas {name initfile initdir} { - global pd_nt filetypes + global pd_nt filetypes untitled_directory set filename [tk_getSaveFile -initialfile $initfile -initialdir $initdir \ -defaultextension .pd -filetypes $filetypes]
@@ -2196,6 +2193,7 @@ pd [concat $name savetofile [pdtk_enquote $basename] \ [pdtk_enquote $directory] ;] # pd [concat $name savetofile $basename $directory ;] + set untitled_directory $directory } }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.