summaryrefslogtreecommitdiffstats
path: root/scripts/tail.tk
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-01-07 02:33:00 +0000
committer <ralf@linux-mips.org>1997-01-07 02:33:00 +0000
commitbeb116954b9b7f3bb56412b2494b562f02b864b1 (patch)
tree120e997879884e1b9d93b265221b939d2ef1ade1 /scripts/tail.tk
parent908d4681a1dc3792ecafbe64265783a86c4cccb6 (diff)
Import of Linux/MIPS 2.1.14
Diffstat (limited to 'scripts/tail.tk')
-rw-r--r--scripts/tail.tk78
1 files changed, 78 insertions, 0 deletions
diff --git a/scripts/tail.tk b/scripts/tail.tk
new file mode 100644
index 000000000..ee2edae7e
--- /dev/null
+++ b/scripts/tail.tk
@@ -0,0 +1,78 @@
+
+pack .header -side top -padx 10 -pady 10 -expand on
+pack .f0 -side top -padx 15 -pady 10 -fill y -expand on
+
+#
+# Misc buttons to save/restore state and so forth.
+#
+frame .f0_bot
+frame .f0_bot.r
+frame .f0_bot.l
+
+#
+# Read the user's settings from .config. These will override whatever is
+# in config.in. Don't do this if the user specified a -D to force
+# the defaults.
+#
+if { [file readable .config] == 1} then {
+ if { $argc > 0 } then {
+ if { [lindex $argv 0] != "-D" } then {
+ read_config .config
+ }
+ else
+ {
+ read_config $defaults
+ }
+ } else {
+ read_config .config
+ }
+} else {
+ read_config $defaults
+}
+
+update_mainmenu .f0
+
+button .f0_bot.r.save -text "Save and Exit" -width 25 -command {
+ writeconfig .config include/linux/autoconf.h; wrapup .wrap }
+
+button .f0_bot.r.quit -text "Quit Without Saving" -width 25 \
+ -command { maybe_exit .maybe }
+
+button .f0_bot.l.store -text "Store Configuration to File" -width 25 -command {
+ load_configfile .load "Save Configuration in file" write_config_file
+}
+
+button .f0_bot.l.load -text "Load Configuration from File" -width 25 -command {
+ load_configfile .load "Load Configuration from file" read_config_file
+}
+
+pack .f0_bot.r.save .f0_bot.r.quit -padx 25 -ipadx 10 -ipady 2 -expand on
+pack .f0_bot.l.load .f0_bot.l.store -padx 25 -ipadx 10 -ipady 2 -expand on
+
+pack .f0_bot.r -side left -padx 15 -pady 10 -expand on -fill y
+pack .f0_bot.l -side right -padx 15 -pady 10 -expand on -fill y
+
+pack .f0_bot -fill both -expand on
+
+#
+# If we cannot write our config files, disable the write button.
+#
+if { [file exists .config] == 1 } then {
+ if { [file writable .config] == 0 } then {
+ .f0_bot.r.save configure -state disabled
+ }
+ } else {
+ if { [file writable .] == 0 } then {
+ .f0_bot.r.save configure -state disabled
+ }
+ }
+
+if { [file exists include/linux/autoconf.h] == 1 } then {
+ if { [file writable include/linux/autoconf.h] == 0 } then {
+ .f0_bot.r.save configure -state disabled
+ }
+ } else {
+ if { [file writable include/linux/] == 0 } then {
+ .f0_bot.r.save configure -state disabled
+ }
+ }