Skip to content
Snippets Groups Projects
Commit a2f8bf15 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*fixed problem where recent files only saved file name but not the path

parent 3f3b751d
No related branches found
No related tags found
No related merge requests found
...@@ -71,6 +71,7 @@ proc ::pd_guiprefs::update_recentfiles {afile save} { ...@@ -71,6 +71,7 @@ proc ::pd_guiprefs::update_recentfiles {afile save} {
# remove duplicates first # remove duplicates first
set index [lsearch -exact $::recentfiles_list $afile] set index [lsearch -exact $::recentfiles_list $afile]
set ::recentfiles_list [lreplace $::recentfiles_list $index $index] set ::recentfiles_list [lreplace $::recentfiles_list $index $index]
#puts stderr "afile=$afile save=$save"
# insert new one in the beginning and crop the list # insert new one in the beginning and crop the list
set ::recentfiles_list [linsert $::recentfiles_list 0 $afile] set ::recentfiles_list [linsert $::recentfiles_list 0 $afile]
set ::recentfiles_list [lrange $::recentfiles_list 0 [expr $::total_recentfiles - 1]] set ::recentfiles_list [lrange $::recentfiles_list 0 [expr $::total_recentfiles - 1]]
...@@ -139,7 +140,7 @@ proc ::pd_guiprefs::get_config_win {adomain {akey} {arr false}} { ...@@ -139,7 +140,7 @@ proc ::pd_guiprefs::get_config_win {adomain {akey} {arr false}} {
} }
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# linux: read a config file and return its lines splitted. # linux: read a config file and return its lines split into individual entries
# #
proc ::pd_guiprefs::get_config_x11 {adomain {akey} {arr false}} { proc ::pd_guiprefs::get_config_x11 {adomain {akey} {arr false}} {
set filename [file join $adomain $akey] set filename [file join $adomain $akey]
......
...@@ -169,7 +169,11 @@ static void openit(const char *dirname, const char *filename) ...@@ -169,7 +169,11 @@ static void openit(const char *dirname, const char *filename)
glob_evalfile(0, gensym(nameptr), gensym(dirbuf)); 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);
//sys_vgui("::pd_menus::update_recentfiles_menu .mbar.file 0\n"); //sys_vgui("::pd_menus::update_recentfiles_menu .mbar.file 0\n");
sys_vgui("::pd_guiprefs::update_recentfiles %s 1\n", filename); #ifndef MSW
sys_vgui("::pd_guiprefs::update_recentfiles %s/%s 1\n", dirname, filename);
#else
sys_vgui("::pd_guiprefs::update_recentfiles %s\%s 1\n", dirname, filename);
#endif
} }
else else
error("%s: can't open", filename); error("%s: can't open", filename);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment