Skip to content

Commit

Permalink
Fix window event confusion: close window works again
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lucraft committed Feb 18, 2010
1 parent e09ac1e commit ce4dbf7
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions plugins/application_swt/lib/application_swt/window.rb
Expand Up @@ -5,23 +5,23 @@ class Window
attr_reader :shell, :window, :shell_listener

class ShellListener
include ListenerHelpers
include ReentryHelpers

def initialize(controller)
@controller = controller
end

def shell_closed(e)
ignore_within_self do
@controller.window.close
@controller.window.ignore(:closing) do
e.doit = false
@controller.swt_event_closed
end
end

def shell_activated(e)
ignore_within_self do
@controller.window.focus
@controller.window.ignore(:focussing) do
e.doit = false
@controller.swt_event_activated
end
end

Expand Down Expand Up @@ -176,14 +176,6 @@ def dispose
@menu_controller.close
end

def swt_event_closed
@window.close
end

def swt_event_activated
@window.focus
end

private

SASH_WIDTH = 5
Expand Down

0 comments on commit ce4dbf7

Please sign in to comment.