11th May 2008, 04:05 PM | #1 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
files on recent list
Is there a way to increase the number of files shown on the "Recently Used Files" list?
I swear there was, but I can't find it for the life of me now. |
11th May 2008, 07:46 PM | #2 |
Member
Expert member
Join Date: Feb 2008
Location: Terra Firma
Posts: 51
|
Re: files on recent list
hi lisa,
i was wanting to do the same a while back but wasn't sure about it. in AC3D\tcl the file ac3dops has i guess the info for it? lol i have never messed with .tcl stuff and not wanting to wreck myself and my AC3D i left it alone. but the section like below... i dunno can you just add more line as 4, 5, 6 ? im prob not even at bat here but i cant see anything else Code:
proc recent_file_menu_check { } { global UI global prefs_recentfiles0 global prefs_recentfiles1 global prefs_recentfiles2 global prefs_recentfiles3 if { ($prefs_recentfiles0 == "") && ($prefs_recentfiles1 == "") && ($prefs_recentfiles2 == "") && ($prefs_recentfiles3 == "") } { $UI(menu_file) entryconfigure 2 -state disabled } else { $UI(menu_file) entryconfigure 2 -state normal } } proc update_savefile_name { fname} { global acfilename UI global prefs_recentfiles0 global prefs_recentfiles1 global prefs_recentfiles2 global prefs_recentfiles3 #puts "update_savefile_name $fname" set r [file rootname $fname] set extU [file extension $fname] #force extensionto lower case set ext [ string tolower $extU ] # set acfilename "$r.ac" # puts "$r $acfilename" if { $ext == ".ac" } { set acfilename $fname } else { set acfilename "" } update_savefile_menu set ver [ac3d get_version_string] # if blank filename (to save as ac3d file) - set untitled window label if { $ext != ".ac" } { wm title . "Inivis AC3D" } else { # put the file name in the titlebar wm title . "Inivis AC3D - $fname" } if { ($prefs_recentfiles0 != $fname ) && ($fname != "") } { set prefs_recentfiles3 $prefs_recentfiles2 set prefs_recentfiles2 $prefs_recentfiles1 set prefs_recentfiles1 $prefs_recentfiles0 set prefs_recentfiles0 $fname $UI(menu_recent) entryconfigure 0 -label $prefs_recentfiles0 $UI(menu_recent) entryconfigure 1 -label $prefs_recentfiles1 $UI(menu_recent) entryconfigure 2 -label $prefs_recentfiles2 $UI(menu_recent) entryconfigure 3 -label $prefs_recentfiles3 } recent_file_menu_check } proc reset_recent_files_menu {} { global prefs_recentfiles0 global prefs_recentfiles1 global prefs_recentfiles2 global prefs_recentfiles3 global UI $UI(menu_recent) entryconfigure 0 -label $prefs_recentfiles0 $UI(menu_recent) entryconfigure 1 -label $prefs_recentfiles1 $UI(menu_recent) entryconfigure 2 -label $prefs_recentfiles2 $UI(menu_recent) entryconfigure 3 -label $prefs_recentfiles3 recent_file_menu_check } # insert a file proc menu_merge {} { global acfilename global prefs_load_file_path set filetypes { {{ AC3D files} {.ac}} {{ All files} *} } set filename [get_loadfilename "Merge an AC3D file" $filetypes] if { $filename != "" } { ac3d load_file $filename set_unsaved_changes TRUE } }
__________________
Dew |
12th May 2008, 02:11 AM | #3 |
Senior Member
Professional user
Join Date: Jul 2005
Location: France
Posts: 737
|
Re: files on recent list
Same kind of things here (well ... more or less) :
is there a way to organize all the plugins under the "tools" menu ? Maybe to sort them alphabetically ?
__________________
OL. |
12th May 2008, 03:26 AM | #4 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: files on recent list
Thanks much, Dew. I was hoping there was a setting, but it looks like the script is the way to go. I don't think you can just add more lines, because for some reason I recall that there was a trick to adding new stuff to the global preferences... there's some other code you need to add to make it work. I remember trying to do this for a plugin once, unfortunately, I don't remember what I did or if it ever worked, doh.
luuckyy: Heh heh, yeah, my tools menu is a mile long, too. ac3d.tcl has the tools menu in it, but each plugin registers itself with AC3D individually and I'm pretty sure the menu items don't get created until that time, which would make it very tricky to sort. If there were tools you used more often, however, you can make a whole new "quick tools" menu with just the tools you wanted on it. You'd have to hard-code the list, but you can get the list of installed plugin commands from the socket interface using the command "ac3d list". Add this after the tools menu and put in the commands you want to call: Code:
# quick menu menubutton .mbar.quick -text "Quick" -menu .mbar.quick.menu -underline 0 menu .mbar.quick.menu -tearoff 0 set UI(menu_quick) .mbar.quick.menu .mbar.quick.menu add command -label "Your Command" -command "your_command_here" Code:
$m add cascade -menu .mbar.quick.menu -label "Quick" -underline 0 Code:
pack .mbar.file .mbar.edit .mbar.view .mbar.object .mbar.surface .mbar.vertex .mbar.orth .mbar.3d .mbar.tools .mbar.quick -side left |
12th May 2008, 04:37 PM | #5 |
Senior Member
Professional user
Join Date: Jul 2005
Location: France
Posts: 737
|
Re: files on recent list
Thank you very much lisa !
__________________
OL. |
12th May 2008, 05:44 PM | #6 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: files on recent list
Anytime! .
|
|
|