display some platform information;
authorwenzelm
Sun, 28 Jun 2009 22:35:23 +0200
changeset 31843 f02c6a43f1b3
parent 31842 af5221147455
child 31844 3d5e51dbafe9
display some platform information;
src/Pure/System/gui_setup.scala
--- a/src/Pure/System/gui_setup.scala	Sun Jun 28 19:29:28 2009 +0200
+++ b/src/Pure/System/gui_setup.scala	Sun Jun 28 22:35:23 2009 +0200
@@ -25,13 +25,36 @@
 
   def top = new MainFrame {
     title = "Isabelle setup"
-    val ok = new Button { text = "OK" }
 
+    // components
+    val text = new TextArea {
+      editable = false
+      columns = 20
+      rows = 10
+      xLayoutAlignment = 0.5
+    }
+    val ok = new Button {
+      text = "OK"
+      xLayoutAlignment = 0.5
+    }
     contents = new BoxPanel(Orientation.Vertical) {
+      contents += text
       contents += ok
-      border = scala.swing.Swing.EmptyBorder(20, 20, 20, 20)
     }
 
+    // values
+    Platform.defaults match {
+      case None =>
+      case Some((name, None)) => text.append("platform: " + name + "\n")
+      case Some((name1, Some(name2))) =>
+        text.append("main platform: " + name2 + "\n")
+        text.append("alternative platform: " + name2 + "\n")
+    }
+    if (Platform.is_windows) {
+      text.append("Cygwin root: " + Cygwin.config()._1 + "\n")
+    }
+
+    // reactions
     listenTo(ok)
     reactions += {
       case ButtonClicked(`ok`) => System.exit(0)