From e22eedc4d368e26e802c85e6572a7eba5883ca0f Mon Sep 17 00:00:00 2001 From: Ivica Ico Bukvic <ico@vt.edu> Date: Fri, 29 Aug 2014 18:37:15 -0400 Subject: [PATCH] *fixed properly parsing of a current path that has a space in it *fixed how window shortcuts (ctrl+w and ctrl+q) behave in the view list menu for arrays --- pd/src/pd.tk | 8 ++++---- pd/src/s_main.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pd/src/pd.tk b/pd/src/pd.tk index 97322d2bf..a6893c8a5 100644 --- a/pd/src/pd.tk +++ b/pd/src/pd.tk @@ -1321,7 +1321,7 @@ proc open_file {filename} { if {[regexp -nocase -- "\.(pd|pat|mxt)$" $basename]} { pd "pd open [pdtk_enquote $basename] [pdtk_enquote $directory] ;" set pd_opendir $directory - ::pd_guiprefs::update_recentfiles $filename 1 + ::pd_guiprefs::update_recentfiles "$filename" 1 } } @@ -3818,8 +3818,8 @@ proc pdtk_array_listview_new {id arrayName page} { toplevel $windowName -class [winfo class .] wm geometry $windowName 220x400 wm minsize $windowName 220 400 - #pdtk_standardkeybindings $windowName - bind $windowName <Control-w> {destroy %W} + # pdtk_standardkeybindings $windowName + bind $windowName <Control-w> [list destroy $windowName] bind $windowName <Control-q> {menu_quit} match_linux_wm [list $windowName configure] wm protocol $windowName WM_DELETE_WINDOW \ @@ -4964,7 +4964,7 @@ proc pdtk_canvas_saveas {name initfile initdir} { # pd [concat $name savetofile $basename $directory \;] set untitled_directory $directory # add to recentfiles - ::pd_guiprefs::update_recentfiles $filename 1 + ::pd_guiprefs::update_recentfiles "$filename" 1 } # zooming (a subset of dofont) diff --git a/pd/src/s_main.c b/pd/src/s_main.c index 807fae30f..531eb8ef6 100644 --- a/pd/src/s_main.c +++ b/pd/src/s_main.c @@ -172,7 +172,7 @@ static void openit(const char *dirname, const char *filename) { close (fd); glob_evalfile(0, gensym(nameptr), gensym(dirbuf)); - sys_vgui("pdtk_set_current_dir %s\n", filename); + sys_vgui("pdtk_set_current_dir {%s}\n", filename); char actualpath[PATH_MAX]; char *path_ptr = NULL; path_ptr = realpath(filename, actualpath); @@ -181,7 +181,7 @@ static void openit(const char *dirname, const char *filename) // strstr(filename, dirname), actualpath, path_ptr); if (path_ptr != NULL) { - sys_vgui("::pd_guiprefs::update_recentfiles %s 1\n", actualpath); + sys_vgui("::pd_guiprefs::update_recentfiles \"%s\" 1\n", actualpath); } } else -- GitLab