lib/shoes/swt.rb in shoes-swt-4.0.0.pre7 vs lib/shoes/swt.rb in shoes-swt-4.0.0.pre8
- old
+ new
@@ -1,7 +1,8 @@
require 'java'
-require 'swt'
+require 'swt/minimal'
+require 'swt/core'
require 'after_do'
require 'shoes'
module Swt
include_package 'org.eclipse.swt.graphics'
@@ -45,13 +46,10 @@
def self.initialize_backend
return if @initialized
@initialized = true
- ::Swt::Widgets::Display.new.getFontList(nil, true).each { |f| ::Shoes::FONTS << f.getName }
- ::Shoes::FONTS.uniq!
-
::Shoes.configuration.backend = :swt
require 'shoes/swt/disposed_protection'
require 'shoes/swt/click_listener'
require 'shoes/swt/color'
@@ -127,10 +125,9 @@
require 'shoes/swt/tooling/leak_hunter' if ENV["LEAK_HUNTER"]
# redrawing aspect needs to know all the classes
require 'shoes/swt/redrawing_aspect'
- ::Shoes::Swt::App.setup_system_colors
@initialized = true
rescue Java::OrgEclipseSwt::SWTException => e
if e.message == "Invalid thread access"
puts "Ooops, we couldn't start properly. We'll try again."
puts ""