glimmer-dsl-swt 4.17.10.1 → 4.17.10.2

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: 73db76cf55f0b8a847889dba2f325f6316b91c355c97524e87ec822ba8b36709
4
- data.tar.gz: 942dbb0e282fc67de58568d05114b03dccc13245754c16034138bca5f32fdbe6
3
+ metadata.gz: a26a62cdb25e9f4ce06d4c6d0d7e753fbd9f520e96873d8fa224a7c4fba52f0e
4
+ data.tar.gz: ef7839e1659a53123cf1b027d1620db8635d300c8b7d80565b197f0b77b84a1a
5
5
  SHA512:
6
- metadata.gz: ad56996b5e3163e3d25c286d605e9d92c61cbfeccf0311222a55f8ef8ef9772a1804928ea5c62d83e09449923aa8ea9513a2cd5198fa70c6251e45711d2c76c7
7
- data.tar.gz: b53328118e1e567ed87910fd5d1a22a80161da0c0b62074113b1e0afcccd83fbb0adb3039e4eaa93ea5ec070c0b47cadb80100f6ab177215de5dadea9a16c16e
6
+ metadata.gz: 9b2530841419cc164c720e6ca5043de7a2c0a6a54eb63c7e8a748805ad985bb04d2d752b321291319cd2f2ffdca08d5ef3f502dade6d7876897fb1b9975956a4
7
+ data.tar.gz: 4f3c48cf36fd274b95222d3db1d07febb6cb15b64957ec11ae519855b5e194893ec6503437019958c3f9fef45ac94e8065d750ce7c87f20aeb781d9cbc0133c5
@@ -1,5 +1,10 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.17.10.2
4
+
5
+ - Upgraded glimmer gem to version 1.0.4
6
+ - Fixed issues relating to data-binding `styled_text` widget
7
+
3
8
  ### 4.17.10.1
4
9
 
5
10
  - Upgraded glimmer gem to version 1.0.3
@@ -411,4 +416,4 @@
411
416
 
412
417
  ## 0.1.0
413
418
 
414
- - Extracted Glimmer DSL for SWT (glimmer-dsl-swt gem) from Glimmer
419
+ - Extracted Glimmer DSL for SWT (glimmer-dsl-swt gem) from Glimmer
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.17.10.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.17.10.2
2
2
 
3
3
  ## JRuby Desktop Development GUI Framework
4
4
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
@@ -455,7 +455,7 @@ jgem install glimmer-dsl-swt
455
455
 
456
456
  Or this command if you want a specific version:
457
457
  ```
458
- jgem install glimmer-dsl-swt -v 4.17.10.1
458
+ jgem install glimmer-dsl-swt -v 4.17.10.2
459
459
 
460
460
  ```
461
461
 
@@ -532,7 +532,7 @@ bin/glimmer samples
532
532
  Below are the full usage instructions that come up when running `glimmer` without args.
533
533
 
534
534
  ```
535
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.17.10.1
535
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.17.10.2
536
536
 
537
537
 
538
538
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
@@ -1010,7 +1010,7 @@ Output:
1010
1010
 
1011
1011
  Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
1012
1012
  Opal glimmer-dsl-opal 0.4.0 AndyMaleh Glimmer DSL for Opal
1013
- Swt glimmer-dsl-swt 4.17.10.1
1013
+ Swt glimmer-dsl-swt 4.17.10.2
1014
1014
  AndyMaleh Glimmer DSL for SWT
1015
1015
  Tk glimmer-dsl-tk 0.0.6 AndyMaleh Glimmer DSL for Tk
1016
1016
  Xml glimmer-dsl-xml 1.1.0 AndyMaleh Glimmer DSL for XML
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.17.10.1
1
+ 4.17.10.2
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: glimmer-dsl-swt 4.17.10.1 ruby lib
5
+ # stub: glimmer-dsl-swt 4.17.10.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer-dsl-swt".freeze
9
- s.version = "4.17.10.1"
9
+ s.version = "4.17.10.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["AndyMaleh".freeze]
14
- s.date = "2020-11-19"
14
+ s.date = "2020-11-23"
15
15
  s.description = "Glimmer DSL for SWT (JRuby Desktop Development GUI Library)".freeze
16
16
  s.email = "andy.am@gmail.com".freeze
17
17
  s.executables = ["glimmer".freeze, "girb".freeze]
@@ -172,7 +172,7 @@ Gem::Specification.new do |s|
172
172
  end
173
173
 
174
174
  if s.respond_to? :add_runtime_dependency then
175
- s.add_runtime_dependency(%q<glimmer>.freeze, ["~> 1.0.3"])
175
+ s.add_runtime_dependency(%q<glimmer>.freeze, ["~> 1.0.4"])
176
176
  s.add_runtime_dependency(%q<super_module>.freeze, ["~> 1.4.1"])
177
177
  s.add_runtime_dependency(%q<nested_inherited_jruby_include_package>.freeze, ["~> 0.3.0"])
178
178
  s.add_runtime_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.2"])
@@ -191,7 +191,7 @@ Gem::Specification.new do |s|
191
191
  s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.16.1"])
192
192
  s.add_development_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
193
193
  else
194
- s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.3"])
194
+ s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.4"])
195
195
  s.add_dependency(%q<super_module>.freeze, ["~> 1.4.1"])
196
196
  s.add_dependency(%q<nested_inherited_jruby_include_package>.freeze, ["~> 0.3.0"])
197
197
  s.add_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.2"])
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2007-2020 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
@@ -27,17 +27,12 @@ module Glimmer
27
27
  #
28
28
  # Follows the Proxy Design Pattern
29
29
  class StyledTextProxy < WidgetProxy
30
- def set_attribute(attribute_name, *args)
31
- if attribute_name.to_s == 'selection'
32
- if args.first
33
- async_exec { @swt_widget.setCaretOffset(args.first.x) }
34
- async_exec { @swt_widget.setSelection(args.first) }
35
- end
36
- else
37
- super(attribute_name, *args)
38
- end
30
+ def initialize(*args)
31
+ super
32
+ on_modify_text { |event|
33
+ @last_modify_text = text
34
+ }
39
35
  end
40
-
41
36
  end
42
37
  end
43
38
  end
@@ -357,35 +357,34 @@ module Glimmer
357
357
  }
358
358
  end,
359
359
  :caret_position => lambda do |observer|
360
+ on_caret_moved { |event|
361
+ observer.call(@swt_widget.getSelection.x) unless @swt_widget.getCaretOffset == 0 && @last_modify_text != text
362
+ }
360
363
  on_swt_keyup { |event|
361
- observer.call(@swt_widget.getCaretOffset)
364
+ observer.call(@swt_widget.getSelection.x) unless @swt_widget.getCaretOffset == 0 && @last_modify_text != text
362
365
  }
363
366
  on_swt_mouseup { |event|
364
- observer.call(@swt_widget.getCaretOffset)
367
+ observer.call(@swt_widget.getSelection.x) unless @swt_widget.getCaretOffset == 0 && @last_modify_text != text
365
368
  }
366
369
  end,
367
370
  :caret_offset => lambda do |observer|
368
- on_swt_keyup { |event|
369
- observer.call(@swt_widget.getCaretOffset)
370
- }
371
- on_swt_mouseup { |event|
372
- observer.call(@swt_widget.getCaretOffset)
371
+ on_caret_moved { |event|
372
+ observer.call(@swt_widget.getCaretOffset) unless @swt_widget.getCaretOffset == 0 && @last_modify_text != text
373
373
  }
374
374
  end,
375
375
  :selection => lambda do |observer|
376
- on_swt_keyup { |event|
377
- observer.call(@swt_widget.getSelection) unless @swt_widget.getSelection.x == 0 && @swt_widget.getSelection.y == 0
378
- }
379
- on_swt_mouseup { |event|
380
- observer.call(@swt_widget.getSelection) unless @swt_widget.getSelection.x == 0 && @swt_widget.getSelection.y == 0
376
+ on_widget_selected { |event|
377
+ observer.call(@swt_widget.getSelection) unless @swt_widget.getCaretOffset == 0 && @last_modify_text != text
381
378
  }
382
379
  end,
383
380
  :selection_count => lambda do |observer|
384
- on_swt_keyup { |event|
385
- observer.call(@swt_widget.getSelectionCount)
381
+ on_widget_selected { |event|
382
+ observer.call(@swt_widget.getSelectionCount) unless @swt_widget.getCaretOffset == 0 && @last_modify_text != text
386
383
  }
387
- on_swt_mouseup { |event|
388
- observer.call(@swt_widget.getSelectionCount)
384
+ end,
385
+ :selection_range => lambda do |observer|
386
+ on_widget_selected { |event|
387
+ observer.call(@swt_widget.getSelectionRange) unless @swt_widget.getCaretOffset == 0 && @last_modify_text != text
389
388
  }
390
389
  end,
391
390
  :top_index => lambda do |observer|
@@ -714,14 +713,17 @@ module Glimmer
714
713
  setter: {name: 'setFocus', invoker: lambda { |widget, args| @swt_widget.setFocus if args.first }},
715
714
  },
716
715
  'caret_position' => {
717
- getter: {name: 'getCaretPosition', invoker: lambda { |widget, args| @swt_widget.respond_to?(:getCaretPosition) ? @swt_widget.getCaretPosition : @swt_widget.getCaretOffset}},
718
- setter: {name: 'setSelection', invoker: lambda { |widget, args| @swt_widget.setSelection(args.first) if args.first }},
716
+ getter: {name: 'getCaretPosition', invoker: lambda { |widget, args| @swt_widget.respond_to?(:getCaretPosition) ? @swt_widget.getCaretPosition : @swt_widget.getSelection.x}},
717
+ setter: {name: 'setSelection', invoker: lambda { |widget, args| @swt_widget.setSelection(args.first, args.first + @swt_widget.getSelectionCount) if args.first }},
719
718
  },
720
719
  'selection_count' => {
721
720
  getter: {name: 'getSelectionCount'},
722
721
  setter: {name: 'setSelection', invoker: lambda { |widget, args|
723
- caret_position = @swt_widget.respond_to?(:getCaretPosition) ? @swt_widget.getCaretPosition : @swt_widget.getCaretOffset
724
- @swt_widget.setSelection(caret_position, caret_position + args.first) if args.first
722
+ if args.first
723
+ caret_position = @swt_widget.respond_to?(:getCaretPosition) ? @swt_widget.getCaretPosition : @swt_widget.getSelection.x
724
+ # TODO handle negative length
725
+ @swt_widget.setSelection(caret_position, caret_position + args.first)
726
+ end
725
727
  }},
726
728
  },
727
729
  }
@@ -885,4 +887,4 @@ module Glimmer
885
887
  end
886
888
  end
887
889
  end
888
- end
890
+ end
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.17.10.1
4
+ version: 4.17.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-19 00:00:00.000000000 Z
11
+ date: 2020-11-23 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: 1.0.3
18
+ version: 1.0.4
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: 1.0.3
26
+ version: 1.0.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements: