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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [scripts/] [tail.tk] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1629 jcastillo
 
2
pack .header -side top -padx 10 -pady 10 -expand on
3
pack .f0 -side top -padx 15 -pady 10 -fill y -expand on
4
 
5
#
6
# Misc buttons to save/restore state and so forth.
7
#
8
frame .f0_bot
9
frame .f0_bot.r
10
frame .f0_bot.l
11
 
12
#
13
# Read the user's settings from .config.  These will override whatever is
14
# in config.in.  Don't do this if the user specified a -D to force
15
# the defaults.
16
#
17
if { [file readable .config] == 1} then {
18
        if { $argc > 0 } then {
19
                if { [lindex $argv 0] != "-D" } then {
20
                        read_config .config
21
                }
22
                else
23
                {
24
                        read_config $defaults
25
                }
26
        } else {
27
                read_config .config
28
        }
29
} else {
30
        read_config $defaults
31
}
32
 
33
update_mainmenu .f0
34
 
35
button .f0_bot.r.save -text "Save and Exit" -width 25 -command {
36
        writeconfig .config include/linux/autoconf.h; wrapup .wrap }
37
 
38
button .f0_bot.r.quit -text "Quit Without Saving" -width 25 \
39
        -command { maybe_exit .maybe }
40
 
41
button .f0_bot.l.store -text "Store Configuration to File" -width 25 -command {
42
        load_configfile .load "Save Configuration in file" write_config_file
43
}
44
 
45
button .f0_bot.l.load -text "Load Configuration from File" -width 25 -command {
46
        load_configfile .load "Load Configuration from file" read_config_file
47
}
48
 
49
pack  .f0_bot.r.save .f0_bot.r.quit -padx 25 -ipadx 10 -ipady 2 -expand on
50
pack  .f0_bot.l.load .f0_bot.l.store -padx 25 -ipadx 10 -ipady 2 -expand on
51
 
52
pack .f0_bot.r -side left -padx 15 -pady 10 -expand on -fill y
53
pack .f0_bot.l -side right -padx 15 -pady 10 -expand on -fill y
54
 
55
pack .f0_bot -fill both -expand on
56
 
57
#
58
# If we cannot write our config files, disable the write button.
59
#
60
if { [file exists .config] == 1 } then {
61
                if { [file writable .config] == 0 } then {
62
                        .f0_bot.r.save configure -state disabled
63
                }
64
        } else {
65
                if { [file writable .] == 0 } then {
66
                        .f0_bot.r.save configure -state disabled
67
                }
68
        }
69
 
70
if { [file exists include/linux/autoconf.h] == 1 } then {
71
                if { [file writable include/linux/autoconf.h] == 0 } then {
72
                        .f0_bot.r.save configure -state disabled
73
                }
74
        } else {
75
                if { [file writable include/linux/] == 0 } then {
76
                        .f0_bot.r.save configure -state disabled
77
                }
78
        }

powered by: WebSVN 2.1.0

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