glimmer-dsl-swt 4.21.0.1 → 4.21.1.0

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: 6383b92b5f4c8f3a860fb3a73d80e65d5abc3b0d2f0bdfe485ccdb07eceb109e
4
- data.tar.gz: efe07cb31a4f44808d6b7252dc6a9d67792212003a67da29e40d32e61216e8fb
3
+ metadata.gz: 45cbd1e7513012e29439dbf431ce0819b0490637fb8bd32b9b0cbfbbb5bb1637
4
+ data.tar.gz: 8982fb5dc7441b3cf666aacc1c6610901d67b5333450c0bc8c8c1ca19e85ccfe
5
5
  SHA512:
6
- metadata.gz: 79ac1cb74da5aa66b283fc82d668c3b3bb5b08cba5d9676f715eee26be6091dfe0c21c34b40a929da1dee76270cbbe6ce932957c11fd36d49835a10786e0f11e
7
- data.tar.gz: 7a2df33551574e5252af42923d31a2e2d25d50407c2ac9ac59a71ef58542959cbbaf4a020a38a253597f0f79aa35466ca1f138389652b15229c048a756c9d244
6
+ metadata.gz: 55f4817c088c8216d024f9b3c98bc147a54833756017ad9f7c1fcb76eec025e37ba8534c84cf3d0a7510104a17caa39700aeb5b86de320d4847811fa2cf83e10
7
+ data.tar.gz: cb40211d2487b87d6ac54b0bcf2bb0d50096ee1c27ffa4f70d7a443e7e9f94f406a94740d1796d143c62b51c7382a9fa1b0d6ca40ff89a5bacff564819ca7ccc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.21.1.0
4
+
5
+ - Upgrade to jruby 9.3.1.0
6
+ - Upgrade to glimmer 2.4.0 (with better observing of array of arrays nested changes)
7
+ - Minor sample fixes for Linux: Tetris (down button now works), Hello, Scale! (now fits horizontally), and Hello, Slider! (now fits horizontally)
8
+ - Adjusted minimum size of Meta-Sample to allow more shrinking (`minimum_size 640, 384`)
9
+ - Do not clean observers when disposing of a widget while closing the last shell (e.g. when closing an app, it is not needed to clean observers, so it is better to exit faster)
10
+
11
+ ### 4.21.0.1
12
+
13
+ - Updated default width for `shell` to `190` (was `130` before)
14
+
3
15
  ### 4.21.0.0
4
16
 
5
17
  - Upgrade to SWT 4.21
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 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.21.0.1
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.21.1.0
2
2
  ## JRuby Desktop Development GUI Framework
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
4
4
  [![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
@@ -15,7 +15,7 @@
15
15
  [<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
16
16
  Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) and [Chalmers/Gothenburg University Software Engineering Master's Lecture Material](http://www.cse.chalmers.se/~bergert/slides/guest_lecture_DSLs.pdf)
17
17
 
18
- [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.21.0.1 includes [SWT 4.21](https://download.eclipse.org/eclipse/downloads/drops4/R-4.21-202109060500/), which was released on September 6, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT. Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested in Glimmer DSL for SWT yet, so deem its support experimental for the time being without guarantees for functionality until declared otherwise (please report any issues you may encounter).
18
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.21.1.0 includes [SWT 4.21](https://download.eclipse.org/eclipse/downloads/drops4/R-4.21-202109060500/), which was released on September 6, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT. Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested in Glimmer DSL for SWT yet, so deem its support experimental for the time being without guarantees for functionality until declared otherwise (please report any issues you may encounter).
19
19
 
20
20
  **Starting in version 4.20.0.0, [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) comes with the new [***Shine***](/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#shine) syntax** for highly intuitive and visually expressive View/Model Attribute Mapping, relying on `<=>` for bidirectional (two-way) data-binding and `<=` for unidirectional (one-way) data-binding, providing an alternative to the `bind` keyword (keep in mind that it is still a beta, so default back to `bind` whenever needed).
21
21
 
@@ -322,7 +322,7 @@ jgem install glimmer-dsl-swt
322
322
 
323
323
  Or this command if you want a specific version:
324
324
  ```
325
- jgem install glimmer-dsl-swt -v 4.21.0.1
325
+ jgem install glimmer-dsl-swt -v 4.21.1.0
326
326
  ```
327
327
 
328
328
  `jgem` is JRuby's version of `gem` command.
@@ -350,7 +350,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
350
350
 
351
351
  Add the following to `Gemfile`:
352
352
  ```
353
- gem 'glimmer-dsl-swt', '~> 4.21.0.1'
353
+ gem 'glimmer-dsl-swt', '~> 4.21.1.0'
354
354
  ```
355
355
 
356
356
  And, then run:
@@ -371,7 +371,7 @@ glimmer
371
371
  ```
372
372
 
373
373
  ```
374
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.21.0.1
374
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.21.1.0
375
375
 
376
376
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
377
377
 
@@ -535,6 +535,10 @@ If you have a Glimmer app you would like referenced here, please mention in a Pu
535
535
 
536
536
  [<img alt="Connector Logo" src="https://raw.githubusercontent.com/AndyObtiva/dcr/f31cd45a8503051e899ed8e831fd03654d38e418/package/linux/Draw%20Color%20Repeat.png" height=40 /> Draw Color Repeat](https://github.com/AndyObtiva/dcr): A young boy programming language for Drawing and Coloring with Repetition
537
537
 
538
+ ### Befunge 98 Programming Language
539
+
540
+ [Befunge 98 GUI](https://github.com/AndyObtiva/befunge98/tree/gui)
541
+
538
542
  ## Packaging & Distribution
539
543
 
540
544
  Glimmer simplifies the process of native-executable packaging and distribution on Mac and Windows via a single command:
@@ -672,7 +676,8 @@ You may apply for contributing to any of these Glimmer DSL gems whether you pref
672
676
  ## Contributors
673
677
 
674
678
  * [Andy Maleh](https://github.com/AndyObtiva) (Founder)
675
- * [Dennis Theisen](https://github.com/Soleone) (Contributor, originally in [Glimmer](https://github.com/AndyObtiva/glimmer/graphs/contributors) before splitting glimmer-dsl-swt)
679
+ * [Dennis Theisen](https://github.com/Soleone) (Contributor, originally in [Glimmer](https://github.com/AndyObtiva/glimmer/graphs/contributors) before splitting [glimmer-dsl-swt](https://rubygems.org/gems/glimmer))
680
+ * [Wayne Vucenic](https://github.com/rubycoder)
676
681
 
677
682
  [Click here to view contributor commits.](https://github.com/AndyObtiva/glimmer-dsl-swt/graphs/contributors)
678
683
 
data/RUBY_VERSION CHANGED
@@ -1 +1 @@
1
- jruby-9.3.0.0
1
+ jruby-9.3.1.0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.21.0.1
1
+ 4.21.1.0
data/bin/girb CHANGED
File without changes
data/bin/glimmer CHANGED
File without changes
@@ -2383,8 +2383,6 @@ Example from [samples/hello/hello_combo.rb](samples/hello_combo.rb) sample (you
2383
2383
 
2384
2384
  #### Shine
2385
2385
 
2386
- **(BETA FEATURE)**
2387
-
2388
2386
  The new Shine syntax for View/Model Attribute Mapping allows data-binding visually with simple arrow operators in Ruby.
2389
2387
 
2390
2388
  Use `<=> [model, attribute, options]` for bidirectional (two-way) data-binding instead of `bind(model, attribute, options)`.
@@ -1,8 +1,10 @@
1
1
  ## Glimmer Packaging and Distribution
2
2
 
3
- Note: this section mostly applies to Mac and Windows. On Linux, you can just run `glimmer package:gem` and after installing the gem, you get an executable matching the name of the app/custom-shell-gem you are building (e.g. `calculator` command becomes available after installing the [glimmer-cs-calculator](https://github.com/AndyObtiva/glimmer-cs-calculator) gem). On Windows, ensure system PATH includes Java bin directory `"C:\Program Files\Java\jdk-16.0.2\bin"` at the top for `jpackage` command to work during packaging Glimmer applications.
3
+ Note: this section mostly applies to Mac and Windows. On Linux, you can just run `glimmer package:gem` and after installing the gem, you get an executable matching the name of the app/custom-shell-gem you are building (e.g. `calculator` command becomes available after installing the [glimmer-cs-calculator](https://github.com/AndyObtiva/glimmer-cs-calculator) gem).
4
4
 
5
- Note 2: Glimmer packaging has a strong dependency on JDK16 since it includes the packaging tool `jpackage`.
5
+ Note 2: On Windows, ensure system environment PATH includes Java bin directory `"C:\Program Files\Java\jdk-16.0.2\bin"` at the top for `jpackage` command to work during packaging Glimmer applications (the default Oracle setup path for Java after installing the JDK is usually not sufficient).
6
+
7
+ Note 3: Glimmer packaging has a strong dependency on JDK16 since it includes the packaging tool `jpackage`.
6
8
 
7
9
  Glimmer simplifies the process of native-executable packaging and distribution on Mac and Windows via a single `glimmer package` command:
8
10
 
@@ -34,7 +36,7 @@ glimmer "package[dmg]"
34
36
  - Available Windows packaging types are `msi`, `exe`, and `app-image` (image means a Windows application directory without a setup program). Learn more about Windows packaging are [over here](#windows-application-packaging).
35
37
  - Available Linux packaging types are `deb`, `rpm`, and `app-image` (Note: Linux native packaging has not been tested successfully, which is why `glimmer package:gem` is recommended on Linux instead. If you get it working, please contribute to this doc file with a Pull Request).
36
38
 
37
- Note: if you are using Glimmer manually, to make the `glimmer package` command available, you must add the following line to your application `Rakefile` (automatically done for you if you scaffold an app or gem with `glimmer scaffold[AppName]` or `glimmer scaffold:gem:customshell[GemName]`):
39
+ Note: if you are using Glimmer manually without scaffolding, in order to make the `glimmer package` command available, you must add the following line to your application `Rakefile` (automatically done for you if you scaffold an app or gem with `glimmer scaffold[AppName]` or `glimmer scaffold:gem:customshell[GemName]`):
38
40
 
39
41
  ```ruby
40
42
  require 'glimmer/rake_task'
@@ -121,7 +123,7 @@ Windows s two options for setup packaging:
121
123
  - `msi` (recommended): simpler packaging option. Requires [WiX Toolset](https://wixtoolset.org/) and [.NET Framework](https://dotnet.microsoft.com/download/dotnet-framework). Simply run `glimmer package[msi]` (or `glimmer package:native[msi]` if it's not your first time) and it will give you more details on the pre-requisites you need to install (e.g. [WiX Toolset](https://wixtoolset.org/) and [.NET Framework 3.5 SP1](https://dotnet.microsoft.com/download/dotnet-framework/net35-sp1)).
122
124
  - `exe`: more advanced packaging option. Requires [Inno Setup](https://jrsoftware.org/isinfo.php). Simply run `glimmer package[exe]` (or `glimmer package:native[exe]` if it's not your first time) and it will tell you what you need to install.
123
125
 
124
- If you just want to test out packaging into a native Windows app that is not packaged for Windows setup, just pass `image` to generate a native Windows app only.
126
+ If you just want to test out packaging into a native Windows app that is not packaged for Windows setup, just pass `app-image` (default) to generate a native Windows app only.
125
127
 
126
128
  ### Mac Application Distribution
127
129
 
Binary file
@@ -40,7 +40,7 @@ module Glimmer
40
40
  SWT::DisplayProxy.instance.auto_exec(override_sync_exec: @sync_exec, override_async_exec: @async_exec) do
41
41
  if @widget.respond_to?(:on_widget_disposed)
42
42
  @widget.on_widget_disposed do |dispose_event|
43
- unregister_all_observables
43
+ deregister_all_observables unless @widget.shell_proxy.last_shell_closing?
44
44
  end
45
45
  end
46
46
  end
@@ -49,7 +49,7 @@ module Glimmer
49
49
  def call(value)
50
50
  SWT::DisplayProxy.instance.auto_exec(override_sync_exec: @sync_exec, override_async_exec: @async_exec) do
51
51
  if @widget.respond_to?(:disposed?) && @widget.disposed?
52
- unregister_all_observables
52
+ deregister_all_observables
53
53
  return
54
54
  end
55
55
  # need the rescue false for a scenario with tree items not being equal to model objects raising an exception
@@ -61,7 +61,7 @@ module Glimmer
61
61
 
62
62
  def evaluate_property
63
63
  if @widget.respond_to?(:disposed?) && @widget.disposed?
64
- unregister_all_observables
64
+ deregister_all_observables
65
65
  return
66
66
  end
67
67
  @widget.get_attribute(@property)
@@ -35,7 +35,8 @@ module Glimmer
35
35
  WIDTH_MIN = 190
36
36
  HEIGHT_MIN = 0
37
37
 
38
- attr_reader :opened_before
38
+ attr_reader :opened_before, :last_shell_closing
39
+ alias last_shell_closing? last_shell_closing
39
40
  alias opened_before? opened_before
40
41
 
41
42
  # Instantiates ShellProxy with same arguments expected by SWT Shell
@@ -85,9 +86,10 @@ module Glimmer
85
86
  end
86
87
  end
87
88
  end
88
- on_widget_disposed {
89
+ on_widget_disposed do
90
+ @last_shell_closing = true if @display.shells.count == 1 && @display.shells.first == @swt_widget
89
91
  clear_shapes
90
- }
92
+ end
91
93
  @display ||= @swt_widget.getDisplay
92
94
  end
93
95
  end
@@ -198,6 +198,10 @@ module Glimmer
198
198
  @finished_add_content = true
199
199
  end
200
200
 
201
+ def shell_proxy
202
+ @swt_widget.shell.get_data('proxy')
203
+ end
204
+
201
205
  def extract_args(underscored_widget_name, args)
202
206
  @arg_extractor_mapping ||= {
203
207
  'menu_item' => lambda do |args|
@@ -202,7 +202,7 @@ class MetaSampleApplication
202
202
 
203
203
  body {
204
204
  shell(:fill_screen) {
205
- minimum_size 1280, 768
205
+ minimum_size 640, 384
206
206
  text 'Glimmer Meta-Sample (The Sample of Samples)'
207
207
  image File.expand_path('../../icons/scaffold_app.png', __dir__)
208
208
 
@@ -57,7 +57,7 @@ class Tetris
57
57
  on_swt_keydown { |key_event|
58
58
  case key_event.keyCode
59
59
  when swt(:arrow_down), 's'.bytes.first
60
- game.down! if OS.mac?
60
+ game.down! unless OS.windows?
61
61
  when swt(:arrow_up)
62
62
  case game.up_arrow_action
63
63
  when :instant_down
@@ -32,10 +32,7 @@ class HelloScale
32
32
 
33
33
  body {
34
34
  shell {
35
- row_layout(:vertical) {
36
- fill true
37
- center true
38
- }
35
+ fill_layout :vertical
39
36
 
40
37
  text 'Hello, Scale!'
41
38
 
@@ -32,10 +32,7 @@ class HelloSlider
32
32
 
33
33
  body {
34
34
  shell {
35
- row_layout(:vertical) {
36
- fill true
37
- center true
38
- }
35
+ fill_layout :vertical
39
36
 
40
37
  text 'Hello, Slider!'
41
38
 
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: 4.21.0.1
4
+ version: 4.21.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-30 00:00:00.000000000 Z
11
+ date: 2021-10-24 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: 2.1.5
18
+ version: 2.4.0
19
19
  name: glimmer
20
20
  prerelease: false
21
21
  type: :runtime
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.1.5
26
+ version: 2.4.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
@@ -378,8 +378,7 @@ description: Glimmer DSL for SWT (JRuby Desktop Development GUI Framework) is a
378
378
  libraries, thus enabling the delivery of desktop apps written in Ruby as truly native
379
379
  DMG/PKG/APP files on the Mac, MSI/EXE files on Windows, and Gem Packaged Shell Scripts
380
380
  on Linux. Glimmer was the first Ruby gem to bring SWT (Standard Widget Toolkit)
381
- to Ruby, thanks to creator Andy Maleh, EclipseCon/EclipseWorld/RubyConf speaker
382
- and expert.
381
+ to Ruby, thanks to creator Andy Maleh, EclipseCon/EclipseWorld/RubyConf speaker.
383
382
  email: andy.am@gmail.com
384
383
  executables:
385
384
  - glimmer
@@ -726,7 +725,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
726
725
  - !ruby/object:Gem::Version
727
726
  version: '0'
728
727
  requirements: []
729
- rubygems_version: 3.2.28
728
+ rubygems_version: 3.2.29
730
729
  signing_key:
731
730
  specification_version: 4
732
731
  summary: Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)