OpenCores
URL https://opencores.org/ocsvn/mips_enhanced/mips_enhanced/trunk

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [bin/] [tkconfig/] [tail.tk] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
# FILE: tail.tk
2
# This file is boilerplate TCL/TK function definitions for 'make xconfig'.
3
#
4
# CHANGES
5
# =======
6
#
7
# 8 January 1998, Michael Elizabeth Chastain, 
8
# Arrange buttons in three columns for better screen fitting.
9
#
10
 
11
#
12
# Read the user's settings from .config.  These will override whatever is
13
# in config.in.  Don't do this if the user specified a -D to force
14
# the defaults.
15
#
16
 
17
set defaults defconfig
18
 
19
if { [file readable .config] == 1} then {
20
        if { $argc > 0 } then {
21
                if { [lindex $argv 0] != "-D" } then {
22
                        read_config .config
23
                }
24
                else
25
                {
26
                        read_config $defaults
27
                }
28
        } else {
29
                read_config .config
30
        }
31
} else {
32
        read_config $defaults
33
}
34
 
35
update_define 1 $total_menus 0
36
update_mainmenu
37
 
38
button .f0.right.save -anchor w -text "Save and Exit" -underline 0\
39
    -command { catch {exec cp -f .config .config.old}; \
40
                writeconfig .config config.h; wrapup .wrap }
41
 
42
button .f0.right.quit -anchor w -text "Quit Without Saving" -underline 0\
43
    -command { maybe_exit .maybe }
44
 
45
button .f0.right.load -anchor w -text "Load Configuration from File" \
46
    -command { load_configfile .load "Load Configuration from file" read_config_file
47
}
48
 
49
button .f0.right.store -anchor w -text "Store Configuration to File" \
50
    -command { load_configfile .load "Store Configuration to file" write_config_file }
51
 
52
#
53
# Now pack everything.
54
#
55
 
56
pack .f0.right.store .f0.right.load .f0.right.quit .f0.right.save \
57
    -padx 0 -pady 0 -side bottom -fill x
58
pack .f0.left .f0.middle .f0.right -side left -padx 5 -pady 0 -fill y
59
pack .f0 -padx 5 -pady 5
60
 
61
update idletasks
62
set winy [expr 10 + [winfo reqheight .f0]]
63
set scry [lindex [wm maxsize .] 1]
64
set winx [expr 10 + [winfo reqwidth .f0]]
65
set scrx [lindex [wm maxsize .] 0]
66
if {$winx < $scrx} then {set maxx -1} else {set maxx $winx}
67
if {$winy < $scry} then {set maxy -1} else {set maxy $winy}
68
.f0 configure -width $winx -height $winy
69
wm maxsize . $maxx $maxy
70
 
71
#
72
# If we cannot write our config files, disable the write button.
73
#
74
if { [file exists .config] == 1 } then {
75
                if { [file writable .config] == 0 } then {
76
                        .f0.right.save configure -state disabled
77
                }
78
        } else {
79
                if { [file writable .] == 0 } then {
80
                        .f0.right.save configure -state disabled
81
                }
82
        }
83
 
84
#if { [file exists include/linux/autoconf.h] == 1 } then {
85
#               if { [file writable include/linux/autoconf.h] == 0 } then {
86
#                       .f0.right.save configure -state disabled
87
#               }
88
#       } else {
89
#               if { [file writable include/linux/] == 0 } then {
90
#                       .f0.right.save configure -state disabled
91
#               }
92
#       }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.