diff --git a/pd/src/pd.tk b/pd/src/pd.tk index f097887aacf93843f66c3bfc5ded418c04ec9dac..5ac66af7b2bf3478fd2f9c29d2bf517f88712f8e 100644 --- a/pd/src/pd.tk +++ b/pd/src/pd.tk @@ -1591,11 +1591,12 @@ match_linux_wm [list .mbar.file add separator] # update recent files match_linux_wm [list .mbar.file add separator] +.mbar.file add command -label "No Recent Files" -state disabled #if {[llength $::recentfiles_list] > 0} { # ::pd_menus::update_recentfiles_menu .mbar.file false #} -match_linux_wm [list .mbar.file add separator] +match_linux_wm [list .mbar.file add separator] .mbar.file add command -label Close -accelerator [accel_munge "Ctrl+w"] \ -state disabled @@ -2841,6 +2842,7 @@ proc pdtk_canvas_new {name width height geometry editable} { } # update recent files match_linux_wm [list $name.m.file add separator] + $name.m.file add command -label "No Recent Files" -state disabled #match_linux_wm [list $name.m.file add separator] #if {[llength $::recentfiles_list] > 0} { # ::pd_menus::update_recentfiles_menu $name.m.file false diff --git a/pd/src/pd_menus_SHORT.tcl b/pd/src/pd_menus_SHORT.tcl index 1f00434e948b2ae0dd88f5e2c1146ac22bd17a79..929e985c016163e4b4e3bb10ed5bf12dac4d9f42 100644 --- a/pd/src/pd_menus_SHORT.tcl +++ b/pd/src/pd_menus_SHORT.tcl @@ -81,10 +81,13 @@ proc ::pd_menus::update_recentfiles_on_menu {mymenu {write}} { $mymenu insert [expr $top_separator+1] command \ -label [file tail $filename] -command "open_file {$filename}" } - set filename [lindex $::recentfiles_list 0] - $mymenu insert [expr $top_separator+1] command \ - -label [file tail $filename] -command "open_file {$filename}" - + if { [llength $::recentfiles_list] > 0 } { + set filename [lindex $::recentfiles_list 0] + $mymenu insert [expr $top_separator+1] command \ + -label [file tail $filename] -command "open_file {$filename}" + } else { + $mymenu insert [expr $top_separator+1] command -label "No Recent Files" -state disabled + } # write to config file if {$write == true} { ::pd_guiprefs::write_recentfiles } } \ No newline at end of file