Skip to content

Commit

Permalink
Damian's fix for JRUBY-975, make the swing IRB console quit when the …
Browse files Browse the repository at this point in the history
…window's closed.

git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@3701 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information
headius committed May 22, 2007
1 parent fed6c8b commit 76c9ef9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/jirb_swing
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require 'irb/completion'

import java.awt.Color
import java.awt.Font
import javax.swing.JFrame

# Try to find preferred font family, use otherwise -- err -- otherwise
def find_font(otherwise, style, size, *families)
Expand All @@ -27,7 +28,8 @@ text.foreground = Color.new(0xa4, 0x00, 0x00)

pane = javax.swing.JScrollPane.new
pane.viewport_view = text
frame = javax.swing.JFrame.new('JRuby IRB Console (tab will autocomplete)')
frame = JFrame.new('JRuby IRB Console (tab will autocomplete)')
frame.default_close_operation = JFrame::EXIT_ON_CLOSE
frame.set_size(700, 600)
frame.content_pane.add(pane)
tar = org.jruby.demo.TextAreaReadline.new(text, " Welcome to the JRuby IRB Console [#{JRUBY_VERSION}] \n\n")
Expand All @@ -45,4 +47,4 @@ else
IRB.setup(__FILE__)
end
end
exit(0)
exit(0)

0 comments on commit 76c9ef9

Please sign in to comment.