tk 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/ext/tk/tcltklib.c +1 -1
- data/lib/remote-tk.rb +1 -1
- data/lib/tk/canvas.rb +1 -1
- data/lib/tkextlib/blt/component.rb +3 -3
- data/lib/tkextlib/blt/tree.rb +1 -1
- data/lib/tkextlib/iwidgets/tabset.rb +1 -1
- data/lib/tkextlib/pkg_checker.rb +1 -1
- data/lib/tkextlib/tcllib/crosshair.rb +2 -2
- data/lib/tkextlib/tcllib/tablelist_core.rb +2 -2
- data/lib/tkextlib/tkDND/tkdnd.rb +57 -2
- data/tk.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34d1ae2ebb5f28e7451783bcd7de572896cb6531
|
4
|
+
data.tar.gz: 4b06ce935ebdd67ce2cf4d006fa4d0f1ef4f7a15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e463e532d49a88bb0d7a091f8d59f0f9583f06ba9202515a7757af98462ba5856a6b226d0b1e304fe2f2115851c52bd0dce0b09c1f3482a324ebbfdb6cc989d5
|
7
|
+
data.tar.gz: ce435a66235cbe0123474d374720d55d2a95a41c3d4f1825485af52631e52a5308e5fb4195fa93cb07707797c175d36360dd2f9634b09d57271af14c294780e1
|
data/README.md
CHANGED
@@ -26,7 +26,16 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
26
26
|
|
27
27
|
## Contributing
|
28
28
|
|
29
|
-
|
29
|
+
Your contributions are welcome on GitHub at https://github.com/ruby/tk.
|
30
|
+
|
31
|
+
Unfortunately we have no resource to handle issue reports.
|
32
|
+
|
33
|
+
Therefore please open pull request with either:
|
34
|
+
|
35
|
+
- a bug report with a correction patch or
|
36
|
+
- (at least) a reproducible code snippet for an issue in form of a test/spec.
|
37
|
+
|
38
|
+
Thank you in advance!
|
30
39
|
|
31
40
|
## License
|
32
41
|
|
data/ext/tk/tcltklib.c
CHANGED
data/lib/remote-tk.rb
CHANGED
data/lib/tk/canvas.rb
CHANGED
@@ -566,7 +566,7 @@ class Tk::Canvas<TkWindow
|
|
566
566
|
|
567
567
|
def rchars(tag, first, last, str_or_coords)
|
568
568
|
# Tcl/Tk 8.6 or later
|
569
|
-
str_or_coords = str_or_coords.flatten if str_or_coords.
|
569
|
+
str_or_coords = str_or_coords.flatten if str_or_coords.kind_of? Array
|
570
570
|
tk_send_without_enc('rchars', tagid(tag), first, last, str_or_coords)
|
571
571
|
self
|
572
572
|
end
|
@@ -923,13 +923,13 @@ module Tk::BLT
|
|
923
923
|
|
924
924
|
def self.new(chart, keys={})
|
925
925
|
obj = nil
|
926
|
-
|
927
|
-
unless (obj =
|
926
|
+
LegendID_TBL.mutex.synchronize{
|
927
|
+
unless (obj = LegendID_TBL[chart.path])
|
928
928
|
(obj = self.allocate).instance_eval{
|
929
929
|
@parent = @chart = chart
|
930
930
|
@cpath = @chart.path
|
931
931
|
@path = @id = 'crosshairs'
|
932
|
-
Legend::
|
932
|
+
Legend::LegendID_TBL[@cpath] = self
|
933
933
|
}
|
934
934
|
end
|
935
935
|
}
|
data/lib/tkextlib/blt/tree.rb
CHANGED
@@ -600,7 +600,7 @@ module Tk::BLT
|
|
600
600
|
'recurse'=>nil, 'tags'=>nil,
|
601
601
|
|
602
602
|
# sort command
|
603
|
-
'ascii'=>nil, 'decreasing'=>nil, '
|
603
|
+
'ascii'=>nil, 'decreasing'=>nil, 'dictionary'=>nil,
|
604
604
|
'integer'=>nil, 'real'=>nil, 'recurse'=>nil, 'reorder'=>nil,
|
605
605
|
}
|
606
606
|
end
|
@@ -106,7 +106,7 @@ class Tk::Iwidgets::Tabset
|
|
106
106
|
return
|
107
107
|
end
|
108
108
|
|
109
|
-
|
109
|
+
return unless @canvas ||= self.winfo_children[0]
|
110
110
|
|
111
111
|
delta = 1 if (delta = cget(:gap)) == 'overlap' ||
|
112
112
|
(delta = self.winfo_pixels(delta) + 1) <= 0
|
data/lib/tkextlib/pkg_checker.rb
CHANGED
@@ -76,10 +76,10 @@ class << Tk::Tcllib::Crosshair
|
|
76
76
|
private :itemcget_tkstring, :itemcget, :itemcget_strict
|
77
77
|
private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
|
78
78
|
|
79
|
-
def
|
79
|
+
def configure(w, slot, value=None)
|
80
80
|
itemconfigure(w, slot, value)
|
81
81
|
end
|
82
|
-
def
|
82
|
+
def configinfo(w, slot = nil)
|
83
83
|
itemconfiginfo(w, slot)
|
84
84
|
end
|
85
85
|
def current_configinfo(w, slot = nil)
|
@@ -888,12 +888,12 @@ class Tk::Tcllib::Tablelist
|
|
888
888
|
end
|
889
889
|
|
890
890
|
def sortcolumn
|
891
|
-
idx = num_or_str(tk_send('
|
891
|
+
idx = num_or_str(tk_send('sortcolumn'))
|
892
892
|
(idx.kind_of?(Fixnum) && idx < 0)? nil: idx
|
893
893
|
end
|
894
894
|
|
895
895
|
def sortcolumnlist
|
896
|
-
simplelist(tk_send('
|
896
|
+
simplelist(tk_send('sortcolumnlist')).map{|col| num_or_str(col)}
|
897
897
|
end
|
898
898
|
|
899
899
|
def sortorder
|
data/lib/tkextlib/tkDND/tkdnd.rb
CHANGED
@@ -80,6 +80,53 @@ module Tk
|
|
80
80
|
_setup_subst_table(KEY_TBL, PROC_TBL);
|
81
81
|
end
|
82
82
|
|
83
|
+
class DND_SubstText < TkUtil::CallbackSubst
|
84
|
+
KEY_TBL = [
|
85
|
+
[ ?D, ?d, :data ],
|
86
|
+
nil
|
87
|
+
]
|
88
|
+
|
89
|
+
PROC_TBL = [
|
90
|
+
[ ?d, proc do |s|
|
91
|
+
case TclTkLib::WINDOWING_SYSTEM
|
92
|
+
when 'x11', 'win32'
|
93
|
+
s.force_encoding('utf-8')
|
94
|
+
end
|
95
|
+
s
|
96
|
+
end
|
97
|
+
],
|
98
|
+
nil
|
99
|
+
]
|
100
|
+
_setup_subst_table(KEY_TBL, PROC_TBL);
|
101
|
+
end
|
102
|
+
|
103
|
+
class DND_SubstFileList < TkUtil::CallbackSubst
|
104
|
+
KEY_TBL = [
|
105
|
+
[ ?D, ?d, :data ],
|
106
|
+
nil
|
107
|
+
]
|
108
|
+
|
109
|
+
PROC_TBL = [
|
110
|
+
[ ?d, proc do |s|
|
111
|
+
case TclTkLib::WINDOWING_SYSTEM
|
112
|
+
when 'win32'
|
113
|
+
s.force_encoding('utf-8')
|
114
|
+
TkComm.simplelist(s).map { |x| x.tr('\\', '/') }
|
115
|
+
when 'x11'
|
116
|
+
s = s.encode('iso8859-1', 'utf-8')
|
117
|
+
s.force_encoding('utf-8')
|
118
|
+
TkComm.simplelist(s)
|
119
|
+
else
|
120
|
+
TkComm.simplelist(s)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
],
|
124
|
+
nil
|
125
|
+
]
|
126
|
+
_setup_subst_table(KEY_TBL, PROC_TBL);
|
127
|
+
end
|
128
|
+
|
129
|
+
|
83
130
|
module DND
|
84
131
|
def self.version
|
85
132
|
begin
|
@@ -113,6 +160,14 @@ module Tk
|
|
113
160
|
#end
|
114
161
|
def dnd_bindtarget(type, event, *args)
|
115
162
|
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
163
|
+
klass = case type
|
164
|
+
when 'text/plain'
|
165
|
+
DND_SubstText
|
166
|
+
when 'text/uri-list'
|
167
|
+
DND_SubstFileList
|
168
|
+
else
|
169
|
+
DND_Subst
|
170
|
+
end
|
116
171
|
if TkComm._callback_entry?(args[0]) || !block_given?
|
117
172
|
cmd = args.shift
|
118
173
|
else
|
@@ -125,11 +180,11 @@ module Tk
|
|
125
180
|
event = tk_event_sequence(event)
|
126
181
|
if prior.kind_of?(Numeric)
|
127
182
|
tk_call('dnd', 'bindtarget', @path, type, event,
|
128
|
-
install_bind_for_event_class(
|
183
|
+
install_bind_for_event_class(klass, cmd, *args),
|
129
184
|
prior)
|
130
185
|
else
|
131
186
|
tk_call('dnd', 'bindtarget', @path, type, event,
|
132
|
-
install_bind_for_event_class(
|
187
|
+
install_bind_for_event_class(klass, cmd, prior, *args))
|
133
188
|
end
|
134
189
|
self
|
135
190
|
end
|
data/tk.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SHIBATA Hiroshi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-03-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -1141,7 +1141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1141
1141
|
version: '0'
|
1142
1142
|
requirements: []
|
1143
1143
|
rubyforge_project:
|
1144
|
-
rubygems_version: 2.6.
|
1144
|
+
rubygems_version: 2.6.10
|
1145
1145
|
signing_key:
|
1146
1146
|
specification_version: 4
|
1147
1147
|
summary: Tk interface module using tcltklib.
|