virtualbox-com 0.10.6 → 0.10.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -110,10 +110,33 @@ class EventSource < NSISupports
110
110
  :on_drag_and_drop_mode_changed => :DragAndDropModeChangedEvent,
111
111
  }
112
112
 
113
- def get_casted_event(*args)
114
- if e = get_event(*args)
115
- (model = MODEL_MAP[e.type]) ? e.cast(model) : e
113
+
114
+
115
+ old_get_event = instance_method(:get_event)
116
+ define_method(:get_event) do |listener, timeout, enhanced = true|
117
+ if evt = old_get_event.bind(self).call(listener, timeout)
118
+ event_inject_processed(evt, listener) if enhanced
119
+ end
120
+ evt
121
+ end
122
+
123
+ def get_casted_event(listener, timeout, enhanced = true)
124
+ if evt = get_event(listener, timeout, false)
125
+ if model = MODEL_MAP[evt.type]
126
+ evt = evt.cast(model)
127
+ end
128
+ event_inject_processed(evt, listener) if enhanced
129
+ end
130
+ evt
131
+ end
132
+
133
+ private
134
+ def event_inject_processed(evt, listener)
135
+ source = self
136
+ (class << evt ;self; end).send(:define_method, 'processed') do
137
+ source.event_processed(listener, evt) if evt.waitable
116
138
  end
139
+ evt
117
140
  end
118
141
  end
119
142
 
@@ -1,5 +1,5 @@
1
1
  module VirtualBox
2
2
  module COM
3
- VERSION = "0.10.6"
3
+ VERSION = "0.10.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virtualbox-com
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.6
4
+ version: 0.10.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-24 00:00:00.000000000 Z
12
+ date: 2013-07-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  segments:
110
110
  - 0
111
- hash: -2955089643712316138
111
+ hash: -2422062214505046562
112
112
  required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  none: false
114
114
  requirements:
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  segments:
119
119
  - 0
120
- hash: -2955089643712316138
120
+ hash: -2422062214505046562
121
121
  requirements: []
122
122
  rubyforge_project:
123
123
  rubygems_version: 1.8.25