glimmer-dsl-swt 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 564118c89658344e48e07e795447c78db4b4d61fd6e48c48ba0fae9e48e4cc2c
4
- data.tar.gz: a36895cc1374171c078546a986cdbfb6b677d0547d20099c42d631be9d4865bd
3
+ metadata.gz: fee38949564fb2b0f3874a1bad1229cfb813439f0dca2e08b8d293b8c61fecb9
4
+ data.tar.gz: eb0e920dba273a6a343aeeb34cc664c33b7238b151df0e8cd5a4679aaee85b29
5
5
  SHA512:
6
- metadata.gz: 3f1edda00261bc1fa2f4d8459f08378b0924d440c6e0b7ebd42281c0d689a66870089da127f8ef45a18110808a201852d71481582f8712136151863cff848c88
7
- data.tar.gz: 75742ed4193c5139a2a800787211342e19cee44bd0aa34abe794db8b8c37a2ccfc5300de35b31de95f5fa5826e23a8207db8d6bd097512eb0c1b256de4ffb277
6
+ metadata.gz: c5ca29f9d303aa9320acb7f97492c8caf9d7e1135597ba646a3e5b238ec6e47408da2e4ea87f74c50ae283cd313def6d35c93e622040123dfb438c12d9330f8c
7
+ data.tar.gz: cd22b1bf5093d4a3a1c9caea73d152678395e7aa0110bdcfbe1df2ee923ca85d601c8529120a17acadabe75af979fc3791477ec00dde075b59a1f13565f5cf2a
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # <img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 /> Glimmer DSL for SWT 0.2.2 (Desktop GUI)
1
+ # <img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 /> Glimmer DSL for SWT 0.2.3 (Desktop GUI)
2
2
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
3
3
  [![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
4
4
  [![Coverage Status](https://coveralls.io/repos/github/AndyObtiva/glimmer-dsl-swt/badge.svg?branch=master)](https://coveralls.io/github/AndyObtiva/glimmer-dsl-swt?branch=master)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -7,6 +7,12 @@ module Glimmer
7
7
  class << self
8
8
  attr_accessor :javapackager_extra_args
9
9
 
10
+ def clean
11
+ require 'fileutils'
12
+ FileUtils.rm_rf('dist')
13
+ FileUtils.rm_rf('packages')
14
+ end
15
+
10
16
  def config
11
17
  project_name = File.basename(File.expand_path('.'))
12
18
  if !File.exists?('config/warble.rb')
@@ -15,7 +21,7 @@ module Glimmer
15
21
  system('warble config')
16
22
  new_config = File.read('config/warble.rb').split("\n").inject('') do |output, line|
17
23
  if line.include?('config.dirs =')
18
- line = line.sub('# ', '').sub(/=[^=\n]+$/, '= %w(app config db lib script bin docs fonts icons images sounds videos)')
24
+ line = line.sub('# ', '').sub(/=[^=\n]+$/, '= %w(app config db lib script bin docs fonts icons images sounds videos vendor)')
19
25
  end
20
26
  if line.include?('config.includes =')
21
27
  line = line.sub('# ', '').sub(/=[^=\n]+$/, "= FileList['LICENSE.txt', 'VERSION']")
@@ -4,6 +4,11 @@ require_relative 'package'
4
4
 
5
5
  namespace :glimmer do
6
6
  namespace :package do
7
+ desc 'Clean by removing "dist" and "packages" directories'
8
+ task :clean do
9
+ Glimmer::Package.clean
10
+ end
11
+
7
12
  desc 'Generate JAR config file'
8
13
  task :config do
9
14
  Glimmer::Package.config
@@ -179,6 +179,7 @@ class Scaffold
179
179
  end
180
180
 
181
181
  def custom_shell_gem(custom_shell_name, namespace)
182
+ return puts('Namespace is required! Usage: glimmer scaffold:custom_shell_gem[custom_shell_name,namespace]') unless `git config --get github.user`.to_s.strip == 'AndyObtiva'
182
183
  gem_name = "glimmer-cs-#{compact_name(custom_shell_name)}"
183
184
  gem_summary = "#{human_name(custom_shell_name)} - Glimmer Custom Shell"
184
185
  if namespace
@@ -218,6 +219,7 @@ class Scaffold
218
219
  end
219
220
 
220
221
  def custom_widget_gem(custom_widget_name, namespace)
222
+ return puts('Namespace is required! Usage: glimmer scaffold:custom_widget_gem[custom_widget_name,namespace]') unless `git config --get github.user`.to_s.strip == 'AndyObtiva'
221
223
  gem_name = "glimmer-cw-#{compact_name(custom_widget_name)}"
222
224
  gem_summary = "#{human_name(custom_widget_name)} - Glimmer Custom Widget"
223
225
  if namespace
@@ -145,6 +145,16 @@ module Glimmer
145
145
  observer.call(false)
146
146
  }
147
147
  end,
148
+ :selection => lambda do |observer|
149
+ on_widget_selected { |selection_event|
150
+ observer.call(@swt_widget.getSelection)
151
+ } if can_handle_observation_request?(:on_widget_selected)
152
+ end,
153
+ :text => lambda do |observer|
154
+ on_modify_text { |modify_event|
155
+ observer.call(@swt_widget.getText)
156
+ } if can_handle_observation_request?(:on_modify_text)
157
+ end,
148
158
  },
149
159
  Java::OrgEclipseSwtWidgets::Combo => {
150
160
  :text => lambda do |observer|
@@ -296,9 +306,7 @@ module Glimmer
296
306
  def add_observer(observer, property_name)
297
307
  property_listener_installers = @swt_widget.class.ancestors.map {|ancestor| widget_property_listener_installers[ancestor]}.compact
298
308
  widget_listener_installers = property_listener_installers.map{|installer| installer[property_name.to_s.to_sym]}.compact if !property_listener_installers.empty?
299
- widget_listener_installers.to_a.each do |widget_listener_installer|
300
- widget_listener_installer.call(observer)
301
- end
309
+ widget_listener_installers.to_a.first&.call(observer)
302
310
  end
303
311
 
304
312
  def remove_observer(observer, property_name)
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-11 00:00:00.000000000 Z
11
+ date: 2020-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.9.3
18
+ version: 0.9.4
19
19
  name: glimmer
20
20
  type: :runtime
21
21
  prerelease: false
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.9.3
26
+ version: 0.9.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
@@ -256,7 +256,7 @@ dependencies:
256
256
  - - "~>"
257
257
  - !ruby/object:Gem::Version
258
258
  version: 0.7.0
259
- description: Glimmer DSL for SWT (Desktop GUI)
259
+ description: Glimmer DSL for SWT (Desktop GUI) - JRuby on SWT
260
260
  email: andy.am@gmail.com
261
261
  executables:
262
262
  - glimmer