View Single Post
Old 11th May 2008, 07:46 PM   #2
Dew
Member
Expert member
 
Dew's Avatar
 
Join Date: Feb 2008
Location: Terra Firma
Posts: 51
Default 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
Dew is offline   Reply With Quote