Changeset 74


Ignore:
Timestamp:
Dec 4, 2009 4:59:58 PM (11 years ago)
Author:
toby
Message:

# on 1999/03/30 16:18:11, toby did:
Set expnam on command line to upper case
move expgui to center of screen window, if we will put the file open
on top. This is because the open window can end up partly off screen otherwise.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expgui

    • Property rcs:date changed from 1999/03/19 17:07:59 to 1999/03/30 16:18:11
    • Property rcs:lines changed from +23 -19 to +19 -2
    • Property rcs:rev changed from 1.12 to 1.13
    r71 r74  
    3535        append expgui(expfile) ".EXP"
    3636    }
     37    if {[file dirname $expgui(expfile)] == "."} {
     38        set expgui(expfile) [string toupper $expgui(expfile)]
     39    } else {
     40        set expgui(expfile) [file join \
     41                [file dirname $expgui(expfile)] \
     42                [file tail [string toupper $expgui(expfile)]]
     43        ]
     44    }
    3745} else {
    3846    set expgui(expfile) {}
     
    128136}
    129137if {$expgui(expfile) == ""} {
    130     # windows needs this update or focus gets screwed up after tk_getOpenFile
     138    # center the parent window because the getExpFileName window
     139    # will be centered above it.
     140    wm withdraw .
     141    set x [expr [winfo screenwidth .]/2 - [winfo reqwidth .]/2 ]
     142    set y [expr [winfo screenheight .]/2 - [winfo reqheight .]/2]
     143    wm geom . +$x+$y
     144    wm deiconify .
     145    # windows needed this update before when using tk_getOpenFile.
     146    # I am not sure it is still needed.
    131147    update
     148    #
    132149    set expgui(expfile) [getExpFileName old]
    133150}
Note: See TracChangeset for help on using the changeset viewer.