shoes-swt 4.0.0.pre11 → 4.0.0.pre12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shoes/swt.rb +1 -0
- data/lib/shoes/swt/app.rb +14 -6
- data/lib/shoes/swt/common/focus.rb +12 -0
- data/lib/shoes/swt/input_box.rb +1 -0
- data/lib/shoes/swt/list_box.rb +1 -0
- data/lib/shoes/swt/packager.rb +1 -1
- data/lib/shoes/swt/redrawing_aspect.rb +3 -2
- data/lib/shoes/swt/slot.rb +1 -0
- data/lib/shoes/swt/swt_button.rb +1 -4
- data/lib/shoes/swt/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24d59ab2c243194cd08ec8910dc1ac800cf8d4557c7126338e71bed355cecfe6
|
4
|
+
data.tar.gz: 35019496beedf4815a237efb971a9ea0dc128b3155f8378bf6f3680735cdb8d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86ee6a318228b84e51eea1ad73e5c0dbcc40e938f4c42e002a32f5c2e2fc2ae3699fa11226b92069bfdd9dc8d5e5182d60203a9801a39f3a3646b5439ee10032
|
7
|
+
data.tar.gz: a41f3c499268d5d8d35ad26a60cd3bdf3f419c082ca1724302e1a9e42701a93ae03a1505a249a5ad8b110de8f47b5a94d23c846b33cb2e10e0490cb5fffdf370
|
data/lib/shoes/swt.rb
CHANGED
@@ -59,6 +59,7 @@ class Shoes
|
|
59
59
|
require 'shoes/swt/common/clickable'
|
60
60
|
require 'shoes/swt/common/container'
|
61
61
|
require 'shoes/swt/common/fill'
|
62
|
+
require 'shoes/swt/common/focus'
|
62
63
|
require 'shoes/swt/common/image_handling'
|
63
64
|
require 'shoes/swt/common/resource'
|
64
65
|
require 'shoes/swt/common/painter'
|
data/lib/shoes/swt/app.rb
CHANGED
@@ -68,7 +68,7 @@ EOS
|
|
68
68
|
@started = true
|
69
69
|
self.fullscreen = true if dsl.start_as_fullscreen?
|
70
70
|
flush
|
71
|
-
::Swt.event_loop { ::Shoes::Swt.
|
71
|
+
::Swt.event_loop { ::Shoes::Swt.apps.all?(&:disposed?) } if main_app?
|
72
72
|
end
|
73
73
|
|
74
74
|
def quit
|
@@ -231,14 +231,22 @@ EOS
|
|
231
231
|
@shell.setSize(new_width, new_height)
|
232
232
|
end
|
233
233
|
|
234
|
-
def
|
234
|
+
def on_close
|
235
235
|
lambda do |_event|
|
236
|
-
|
237
|
-
|
238
|
-
|
236
|
+
# Only do final cleanup if this is the last open window around
|
237
|
+
if finished?
|
238
|
+
::Swt.display.dispose
|
239
|
+
::Shoes::Swt::App.mark_main_app_closed
|
240
|
+
Dir[File.join(Dir.tmpdir, "__shoes4_*.png")].each { |f| File.delete f }
|
241
|
+
end
|
239
242
|
end
|
240
243
|
end
|
241
244
|
|
245
|
+
def finished?
|
246
|
+
# When closing we're done if we're the last undisposed window around
|
247
|
+
::Shoes::Swt.apps.reject(&:disposed?) == [self]
|
248
|
+
end
|
249
|
+
|
242
250
|
def main_window_style
|
243
251
|
style = ::Swt::SWT::CLOSE | ::Swt::SWT::MIN | ::Swt::SWT::V_SCROLL
|
244
252
|
style |= ::Swt::SWT::RESIZE | ::Swt::SWT::MAX if @dsl.opts[:resizable]
|
@@ -282,7 +290,7 @@ EOS
|
|
282
290
|
|
283
291
|
def attach_shell_event_listeners
|
284
292
|
@shell.addControlListener ShellControlListener.new(self)
|
285
|
-
@shell.addListener(::Swt::SWT::Close,
|
293
|
+
@shell.addListener(::Swt::SWT::Close, on_close)
|
286
294
|
@shell.addListener(::Swt::SWT::Close, unregister_app)
|
287
295
|
end
|
288
296
|
|
data/lib/shoes/swt/input_box.rb
CHANGED
data/lib/shoes/swt/list_box.rb
CHANGED
data/lib/shoes/swt/packager.rb
CHANGED
@@ -32,7 +32,7 @@ class Shoes
|
|
32
32
|
|
33
33
|
def run(path)
|
34
34
|
if @packages.empty?
|
35
|
-
puts "You must select at least one packaging format.\n\n#{::Shoes::UI::CLI::PackageCommand.help}"
|
35
|
+
puts "You must select at least one packaging format.\n\n#{::Shoes::UI::CLI::PackageCommand.new.help}"
|
36
36
|
return
|
37
37
|
end
|
38
38
|
|
@@ -35,8 +35,9 @@ class Shoes
|
|
35
35
|
:mouse_left],
|
36
36
|
::Shoes::TextBlock => [:replace] }.freeze
|
37
37
|
|
38
|
-
CHANGED_POSITION = { ::Shoes::
|
39
|
-
::Shoes::Common::
|
38
|
+
CHANGED_POSITION = { ::Shoes::DimensionsDelegations => [:adjust_current_position],
|
39
|
+
::Shoes::Common::Positioning => [:_position, :displace],
|
40
|
+
::Shoes::Common::Hover => [:eval_hover_block] }.freeze
|
40
41
|
|
41
42
|
attr_reader :app
|
42
43
|
|
data/lib/shoes/swt/slot.rb
CHANGED
data/lib/shoes/swt/swt_button.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
class Shoes
|
3
3
|
module Swt
|
4
4
|
class SwtButton
|
5
|
+
include Common::Focus
|
5
6
|
include Common::Remove
|
6
7
|
include Common::Visibility
|
7
8
|
include Common::UpdatePosition
|
@@ -25,10 +26,6 @@ class Shoes
|
|
25
26
|
blk.call @dsl
|
26
27
|
end
|
27
28
|
|
28
|
-
def focus
|
29
|
-
@real.set_focus
|
30
|
-
end
|
31
|
-
|
32
29
|
def click(blk)
|
33
30
|
remove_listeners
|
34
31
|
@real.addSelectionListener { eval_block blk }
|
data/lib/shoes/swt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shoes-swt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.pre12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Team Shoes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - '='
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 4.0.0.
|
46
|
+
version: 4.0.0.pre12
|
47
47
|
name: shoes-core
|
48
48
|
prerelease: false
|
49
49
|
type: :runtime
|
@@ -51,13 +51,13 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 4.0.0.
|
54
|
+
version: 4.0.0.pre12
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - '='
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 4.0.0.
|
60
|
+
version: 4.0.0.pre12
|
61
61
|
name: shoes-package
|
62
62
|
prerelease: false
|
63
63
|
type: :runtime
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 4.0.0.
|
68
|
+
version: 4.0.0.pre12
|
69
69
|
description: A JRuby and Swt backend for Shoes, the best little GUI toolkit for Ruby.
|
70
70
|
Shoes makes building for Mac, Windows, and Linux super simple.
|
71
71
|
email:
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- lib/shoes/swt/common/clickable.rb
|
97
97
|
- lib/shoes/swt/common/container.rb
|
98
98
|
- lib/shoes/swt/common/fill.rb
|
99
|
+
- lib/shoes/swt/common/focus.rb
|
99
100
|
- lib/shoes/swt/common/image_handling.rb
|
100
101
|
- lib/shoes/swt/common/painter.rb
|
101
102
|
- lib/shoes/swt/common/painter_updates_position.rb
|
@@ -178,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
179
|
version: 1.3.1
|
179
180
|
requirements: []
|
180
181
|
rubyforge_project:
|
181
|
-
rubygems_version: 2.6.
|
182
|
+
rubygems_version: 2.6.13
|
182
183
|
signing_key:
|
183
184
|
specification_version: 4
|
184
185
|
summary: A JRuby and Swt backend for Shoes, the best little GUI toolkit for Ruby.
|