6 ph = { 'padx' => 10, 'pady' => 10 } # common options
7 open = proc {`open http://localhost:2042/`}
13 root = TkRoot.new { title "Wikipedia Offline Server" }
14 # top::Wm.focusmodel('active')
15 top = TkFrame.new(root)
16 TkLabel.new(top) {text 'The Wikipedia Server is now running.' ; pack(ph) }
17 TkLabel.new(top) {text 'It is available through http://localhost:2042/' ; pack(ph) }
19 TkButton.new(top) {text 'Open default webbrowser'; command open; pack ph}
20 TkButton.new(top) {text 'Exit'; command leave; pack ph}
21 top.pack('fill'=>'both', 'side' =>'top')