glimmer-dsl-swt 4.24.2.1 → 4.24.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +7 -7
- data/RUBY_VERSION +1 -1
- data/VERSION +1 -1
- data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +6 -4
- data/glimmer-dsl-swt.gemspec +0 -0
- data/lib/glimmer/dsl/swt/dialog_expression.rb +2 -2
- data/lib/glimmer/dsl/swt/display_expression.rb +1 -1
- data/lib/glimmer/dsl/swt/image_expression.rb +1 -0
- data/lib/glimmer/dsl/swt/message_box_expression.rb +5 -5
- data/lib/glimmer/dsl/swt/shell_expression.rb +1 -1
- data/lib/glimmer/swt/custom/code_text.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bec603d1fc189735e3334702098253e83b93e389785bc94305b174aa1d444219
|
4
|
+
data.tar.gz: c817d85d69f9118cd475fb331fc7fbc2ff7c318008d02ec9ee7667f8cc18a633
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab1d611fad1cabafbd7cd2071aa0cb0603bd90e29a5796573e77b762ad4969b9b5add2da4306b89afb7d9b86393534bf514a2e54f1409d68319224d563592581
|
7
|
+
data.tar.gz: 66d6572c4d931df7c52fa5623bd4d0523eee7d906932a537e0936a27849e137269005db210609fbcd3c2d0e7726a4ff8d2b35dc315da1bfd019fee231366077a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 4.24.2.2
|
4
|
+
|
5
|
+
- Upgrade to jruby-9.3.7.0
|
6
|
+
- `code_text` can use external Rouge custom themes similar to `ext/rouge/themes/glimmer_dark`. When in Dark Mode, the specified custom theme must have the word 'dark' in its name to avoid forcing the `glimmer_dark` theme instead as per default behavior.
|
7
|
+
- Look for 'Monospace' and 'Liberation Mono' fonts on Linux if 'Courier' is not available
|
8
|
+
- Fix issue discovered in Red Hat Linux related to ImageExpression getting loaded before others and missing `require 'glimmer/dsl/parent_expression'` statement (issue does not happen in other operating systems that load classes in a different order)
|
9
|
+
|
3
10
|
## 4.24.2.1
|
4
11
|
|
5
12
|
- Fix mistake of changing all themes to dark themes in Hello, Code Text! (not it works just like before)
|
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.24.2.
|
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.24.2.2
|
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)
|
@@ -21,7 +21,7 @@ Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) an
|
|
21
21
|
|
22
22
|
![Eclipse SWT RCP NASA Mars Rover](/images/glimmer-eclipse-swt-rcp-nasa-mars-rover.png)
|
23
23
|
|
24
|
-
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.24.2.
|
24
|
+
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.24.2.2 includes [SWT 4.24](https://download.eclipse.org/eclipse/downloads/drops4/R-4.24-202206070700/), which was released on June 7, 2022. 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.
|
25
25
|
|
26
26
|
**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. That was [originally conceived back in 2007](https://andymaleh.blogspot.com/2007/12/data-shining-in-glimmer.html).
|
27
27
|
|
@@ -306,9 +306,9 @@ https://www.eclipse.org/swt/faq.php
|
|
306
306
|
|
307
307
|
## Pre-requisites
|
308
308
|
|
309
|
-
- JDK 18 is required / JDK 16 is
|
309
|
+
- JDK 18 is required / JDK 16 is minimum except on Mac ARM64 where JDK 17 is minimum (find at https://www.oracle.com/java/technologies/downloads / Ensure `PATH` env var includes Java bin directory for `jpackage` command to work when packaging Glimmer applications / Preferably setup `JAVA_HOME` env var too to point to JDK home directory before installing JRuby)
|
310
310
|
- [RVM](http://rvm.io) on Mac & Linux (not needed on Windows)
|
311
|
-
- JRuby 9.3.
|
311
|
+
- JRuby 9.3.7.0 is required / JRuby 9.3.6.0 is minimum (supporting Ruby 2.6.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux by running `rvm install jruby-9.3.7.0`; On Windows, find at [https://www.jruby.org/download](https://www.jruby.org/download))
|
312
312
|
- SWT 4.24 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem). Note that SWT supports ARM64/AARCH64 on Mac and Linux since version 4.20
|
313
313
|
- Git (comes with Mac and Linux. Install on Windows: https://git-scm.com/download/win )
|
314
314
|
|
@@ -338,7 +338,7 @@ jgem install glimmer-dsl-swt
|
|
338
338
|
|
339
339
|
Or this command if you want a specific version:
|
340
340
|
```
|
341
|
-
jgem install glimmer-dsl-swt -v 4.24.2.
|
341
|
+
jgem install glimmer-dsl-swt -v 4.24.2.2
|
342
342
|
```
|
343
343
|
|
344
344
|
`jgem` is JRuby's version of `gem` command.
|
@@ -366,7 +366,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
|
|
366
366
|
|
367
367
|
Add the following to `Gemfile`:
|
368
368
|
```
|
369
|
-
gem 'glimmer-dsl-swt', '~> 4.24.2.
|
369
|
+
gem 'glimmer-dsl-swt', '~> 4.24.2.2'
|
370
370
|
```
|
371
371
|
|
372
372
|
And, then run:
|
@@ -389,7 +389,7 @@ glimmer
|
|
389
389
|
```
|
390
390
|
|
391
391
|
```
|
392
|
-
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.24.2.
|
392
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.24.2.2
|
393
393
|
|
394
394
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
395
395
|
|
data/RUBY_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
jruby-9.3.
|
1
|
+
jruby-9.3.7.0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.24.2.
|
1
|
+
4.24.2.2
|
@@ -4847,10 +4847,12 @@ Keep in mind that if the text grows and required a wider line numbers area, it g
|
|
4847
4847
|
(default: `'glimmer'`)
|
4848
4848
|
|
4849
4849
|
Changes syntax color highlighting theme. Can be one of the following:
|
4850
|
-
- glimmer
|
4851
|
-
- glimmer_dark (always applied when OS is in dark
|
4852
|
-
- github
|
4853
|
-
- pastie
|
4850
|
+
- `'glimmer'`
|
4851
|
+
- `'glimmer_dark'` (always applied when OS is in Dark Mode unless you set another custom theme that has the word `dark` in its name, see more details below)
|
4852
|
+
- `'github'`
|
4853
|
+
- `'pastie'`
|
4854
|
+
|
4855
|
+
Or you can simply implement a new [Rouge](https://github.com/rouge-ruby/rouge) **custom theme** just like the [github](https://github.com/rouge-ruby/rouge/blob/master/lib/rouge/themes/github.rb) theme or the glimmer theme: [lib/ext/rouge/themes/glimmer.rb](/lib/ext/rouge/themes/glimmer.rb)
|
4854
4856
|
|
4855
4857
|
**language**
|
4856
4858
|
(default: `'ruby'`)
|
data/glimmer-dsl-swt.gemspec
CHANGED
Binary file
|
@@ -19,9 +19,9 @@
|
|
19
19
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
|
-
require 'glimmer/dsl/
|
23
|
-
require 'glimmer/dsl/parent_expression'
|
22
|
+
require 'glimmer/dsl/expression'
|
24
23
|
require 'glimmer/dsl/top_level_expression'
|
24
|
+
require 'glimmer/dsl/parent_expression'
|
25
25
|
require 'glimmer/swt/shell_proxy'
|
26
26
|
require 'glimmer/swt/dialog_proxy'
|
27
27
|
|
@@ -20,8 +20,8 @@
|
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
22
|
require 'glimmer/dsl/static_expression'
|
23
|
-
require 'glimmer/dsl/parent_expression'
|
24
23
|
require 'glimmer/dsl/top_level_expression'
|
24
|
+
require 'glimmer/dsl/parent_expression'
|
25
25
|
require 'glimmer/swt/display_proxy'
|
26
26
|
|
27
27
|
module Glimmer
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2007-2022 Andy Maleh
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
# a copy of this software and associated documentation files (the
|
5
5
|
# "Software"), to deal in the Software without restriction, including
|
@@ -7,10 +7,10 @@
|
|
7
7
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
8
|
# permit persons to whom the Software is furnished to do so, subject to
|
9
9
|
# the following conditions:
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# The above copyright notice and this permission notice shall be
|
12
12
|
# included in all copies or substantial portions of the Software.
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
15
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
16
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
@@ -20,8 +20,8 @@
|
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
22
|
require 'glimmer/dsl/static_expression'
|
23
|
-
require 'glimmer/dsl/parent_expression'
|
24
23
|
require 'glimmer/dsl/top_level_expression'
|
24
|
+
require 'glimmer/dsl/parent_expression'
|
25
25
|
require 'glimmer/swt/shell_proxy'
|
26
26
|
require 'glimmer/swt/message_box_proxy'
|
27
27
|
require 'glimmer/swt/swt_proxy'
|
@@ -38,7 +38,7 @@ module Glimmer
|
|
38
38
|
def interpret(parent, keyword, *args, &block)
|
39
39
|
potential_parent = args.first
|
40
40
|
potential_parent = potential_parent.swt_widget if potential_parent.respond_to?(:swt_widget)
|
41
|
-
parent = nil
|
41
|
+
parent = nil
|
42
42
|
if potential_parent.is_a?(Shell)
|
43
43
|
args.shift
|
44
44
|
parent = potential_parent
|
@@ -20,8 +20,8 @@
|
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
22
|
require 'glimmer/dsl/static_expression'
|
23
|
-
require 'glimmer/dsl/parent_expression'
|
24
23
|
require 'glimmer/dsl/top_level_expression'
|
24
|
+
require 'glimmer/dsl/parent_expression'
|
25
25
|
require 'glimmer/swt/shell_proxy'
|
26
26
|
|
27
27
|
module Glimmer
|
@@ -41,6 +41,7 @@ module Glimmer
|
|
41
41
|
end
|
42
42
|
|
43
43
|
REGEX_COLOR_HEX6 = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/
|
44
|
+
FONT_NAMES_PREFERRED = ['Consolas', 'Courier', 'Monospace', 'Liberation Mono']
|
44
45
|
|
45
46
|
# TODO support auto language detection
|
46
47
|
|
@@ -126,7 +127,7 @@ module Glimmer
|
|
126
127
|
require 'ext/rouge/themes/glimmer'
|
127
128
|
require 'ext/rouge/themes/glimmer_dark'
|
128
129
|
@dark_mode = Java::OrgEclipseSwtWidgets::Display.system_dark_theme?
|
129
|
-
self.theme = 'glimmer_dark' if @dark_mode
|
130
|
+
self.theme = 'glimmer_dark' if @dark_mode && !theme.downcase.include?('dark')
|
130
131
|
@dark_theme = theme.include?('dark')
|
131
132
|
@swt_style = swt_style == 0 ? [:border, :multi, :v_scroll, :h_scroll] : swt_style
|
132
133
|
select_best_font
|
@@ -325,8 +326,9 @@ module Glimmer
|
|
325
326
|
|
326
327
|
def select_best_font_name
|
327
328
|
all_font_names = display.get_font_list(nil, true).map(&:name)
|
328
|
-
|
329
|
-
|
329
|
+
FONT_NAMES_PREFERRED.each do |font_name|
|
330
|
+
@font_name ||= font_name if all_font_names.include?(font_name)
|
331
|
+
end
|
330
332
|
@font_name ||= all_font_names.find {|font_name| font_name.downcase.include?('mono')}
|
331
333
|
@font_name
|
332
334
|
end
|