summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkextlib/blt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/blt')
-rw-r--r--ext/tk/lib/tkextlib/blt/barchart.rb4
-rw-r--r--ext/tk/lib/tkextlib/blt/bitmap.rb2
-rw-r--r--ext/tk/lib/tkextlib/blt/busy.rb1
-rw-r--r--ext/tk/lib/tkextlib/blt/component.rb81
-rw-r--r--ext/tk/lib/tkextlib/blt/container.rb2
-rw-r--r--ext/tk/lib/tkextlib/blt/dragdrop.rb3
-rw-r--r--ext/tk/lib/tkextlib/blt/graph.rb4
-rw-r--r--ext/tk/lib/tkextlib/blt/htext.rb3
-rw-r--r--ext/tk/lib/tkextlib/blt/stripchart.rb4
-rw-r--r--ext/tk/lib/tkextlib/blt/table.rb15
-rw-r--r--ext/tk/lib/tkextlib/blt/tabnotebook.rb2
-rw-r--r--ext/tk/lib/tkextlib/blt/tabset.rb8
-rw-r--r--ext/tk/lib/tkextlib/blt/ted.rb5
-rw-r--r--ext/tk/lib/tkextlib/blt/tile.rb4
-rw-r--r--ext/tk/lib/tkextlib/blt/tree.rb4
-rw-r--r--ext/tk/lib/tkextlib/blt/treeview.rb25
-rw-r--r--ext/tk/lib/tkextlib/blt/unix_dnd.rb8
-rw-r--r--ext/tk/lib/tkextlib/blt/watch.rb2
18 files changed, 148 insertions, 29 deletions
diff --git a/ext/tk/lib/tkextlib/blt/barchart.rb b/ext/tk/lib/tkextlib/blt/barchart.rb
index 8e71c3f5e0..a86b91c959 100644
--- a/ext/tk/lib/tkextlib/blt/barchart.rb
+++ b/ext/tk/lib/tkextlib/blt/barchart.rb
@@ -11,7 +11,7 @@ module Tk::BLT
class Barchart < TkWindow
TkCommandNames = ['::blt::barchart'.freeze].freeze
WidgetClassName = 'Barchart'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
include PlotComponent
include GraphCommand
@@ -33,7 +33,7 @@ module Tk::BLT
private :__tkvariable_optkeys
=begin
- BarElement_ID = ['blt_barchart_bar'.freeze, '00000'.taint].freeze
+ BarElement_ID = ['blt_barchart_bar'.freeze, TkUtil.untrust('00000')].freeze
def bar(elem=nil, keys={})
if elem.kind_of?(Hash)
diff --git a/ext/tk/lib/tkextlib/blt/bitmap.rb b/ext/tk/lib/tkextlib/blt/bitmap.rb
index 23c6d2d064..3254b63116 100644
--- a/ext/tk/lib/tkextlib/blt/bitmap.rb
+++ b/ext/tk/lib/tkextlib/blt/bitmap.rb
@@ -14,7 +14,7 @@ module Tk::BLT
BITMAP_ID_TBL = TkCore::INTERP.create_table
- (BITMAP_ID = ['blt_bitmap_id'.freeze, '00000'.taint]).instance_eval{
+ (BITMAP_ID = ['blt_bitmap_id'.freeze, TkUtil.untrust('00000')]).instance_eval{
@mutex = Mutex.new
def mutex; @mutex; end
freeze
diff --git a/ext/tk/lib/tkextlib/blt/busy.rb b/ext/tk/lib/tkextlib/blt/busy.rb
index 2f807fcd9c..b5287fb5b7 100644
--- a/ext/tk/lib/tkextlib/blt/busy.rb
+++ b/ext/tk/lib/tkextlib/blt/busy.rb
@@ -44,6 +44,7 @@ class << Tk::BLT::Busy
private :__item_config_cmd
undef itemcget
+ undef itemcget_tkstring
alias configure itemconfigure
alias configinfo itemconfiginfo
alias current_configinfo current_itemconfiginfo
diff --git a/ext/tk/lib/tkextlib/blt/component.rb b/ext/tk/lib/tkextlib/blt/component.rb
index 74cbcb56ae..20db035fdd 100644
--- a/ext/tk/lib/tkextlib/blt/component.rb
+++ b/ext/tk/lib/tkextlib/blt/component.rb
@@ -82,6 +82,9 @@ module Tk::BLT
end
private :__item_pathname
+ def axis_cget_tkstring(id, option)
+ ret = itemcget_tkstring(['axis', tagid(id)], option)
+ end
def axis_cget(id, option)
ret = itemcget(['axis', tagid(id)], option)
end
@@ -118,6 +121,9 @@ module Tk::BLT
current_itemconfiginfo(['axis', tagid(id)], slot)
end
+ def crosshairs_cget_tkstring(option)
+ itemcget_tkstring('crosshairs', option)
+ end
def crosshairs_cget(option)
itemcget('crosshairs', option)
end
@@ -134,6 +140,9 @@ module Tk::BLT
current_itemconfiginfo('crosshairs', slot)
end
+ def element_cget_tkstring(id, option)
+ itemcget_tkstring(['element', tagid(id)], option)
+ end
def element_cget(id, option)
itemcget(['element', tagid(id)], option)
end
@@ -158,6 +167,9 @@ module Tk::BLT
current_itemconfiginfo(['element', tagid(id)], slot)
end
+ def bar_cget_tkstring(id, option)
+ itemcget_tkstring(['bar', tagid(id)], option)
+ end
def bar_cget(id, option)
itemcget(['bar', tagid(id)], option)
end
@@ -182,6 +194,9 @@ module Tk::BLT
current_itemconfiginfo(['bar', tagid(id)], slot)
end
+ def line_cget_tkstring(id, option)
+ itemcget_tkstring(['line', tagid(id)], option)
+ end
def line_cget(id, option)
itemcget(['line', tagid(id)], option)
end
@@ -206,6 +221,9 @@ module Tk::BLT
current_itemconfiginfo(['line', tagid(id)], slot)
end
+ def gridline_cget_tkstring(option)
+ itemcget_tkstring('grid', option)
+ end
def gridline_cget(option)
itemcget('grid', option)
end
@@ -222,6 +240,9 @@ module Tk::BLT
current_itemconfiginfo('grid', slot)
end
+ def legend_cget_tkstring(option)
+ itemcget_tkstring('legend', option)
+ end
def legend_cget(option)
itemcget('legend', option)
end
@@ -238,6 +259,9 @@ module Tk::BLT
current_itemconfiginfo('legend', slot)
end
+ def pen_cget_tkstring(id, option)
+ itemcget_tkstring(['pen', tagid(id)], option)
+ end
def pen_cget(id, option)
itemcget(['pen', tagid(id)], option)
end
@@ -262,6 +286,9 @@ module Tk::BLT
current_itemconfiginfo(['pen', tagid(id)], slot)
end
+ def postscript_cget_tkstring(option)
+ itemcget_tkstring('postscript', option)
+ end
def postscript_cget(option)
itemcget('postscript', option)
end
@@ -278,6 +305,9 @@ module Tk::BLT
current_itemconfiginfo('postscript', slot)
end
+ def marker_cget_tkstring(id, option)
+ itemcget_tkstring(['marker', tagid(id)], option)
+ end
def marker_cget(id, option)
itemcget(['marker', tagid(id)], option)
end
@@ -302,12 +332,16 @@ module Tk::BLT
current_itemconfiginfo(['marker', tagid(id)], slot)
end
+ alias __itemcget_tkstring itemcget_tkstring
alias __itemcget itemcget
alias __itemcget_strict itemcget_strict
alias __itemconfiginfo itemconfiginfo
alias __current_itemconfiginfo current_itemconfiginfo
- private :__itemcget, :__itemconfiginfo, :__current_itemconfiginfo
+ private :__itemcget_tkstring, :__itemcget, :__itemconfiginfo, :__current_itemconfiginfo
+ def itemcget_tkstring(tagOrId, option)
+ __itemcget_tkstring(tagid(tagOrId), option)
+ end
def itemcget_strict(tagOrId, option)
ret = __itemcget(tagid(tagOrId), option)
if option == 'bindtags' || option == :bindtags
@@ -373,13 +407,13 @@ module Tk::BLT
ret
end
- private :itemcget, :itemcget_strict
+ private :itemcget_tkstring, :itemcget, :itemcget_strict
private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
#################
class Axis < TkObject
- (OBJ_ID = ['blt_chart_axis'.freeze, '00000'.taint]).instance_eval{
+ (OBJ_ID = ['blt_chart_axis'.freeze, TkUtil.untrust('00000')]).instance_eval{
@mutex = Mutex.new
def mutex; @mutex; end
freeze
@@ -477,6 +511,9 @@ module Tk::BLT
@id
end
+ def cget_tkstring(option)
+ @chart.axis_cget_tkstring(@id, option)
+ end
def cget(option)
@chart.axis_cget(@id, option)
end
@@ -582,6 +619,9 @@ module Tk::BLT
@id
end
+ def cget_tkstring(option)
+ @chart.crosshair_cget_tkstring(option)
+ end
def cget(option)
@chart.crosshair_cget(option)
end
@@ -631,7 +671,7 @@ module Tk::BLT
ElementID_TBL.mutex.synchronize{ ElementID_TBL.clear }
}
- (OBJ_ID = ['blt_chart_element'.freeze, '00000'.taint]).instance_eval{
+ (OBJ_ID = ['blt_chart_element'.freeze, TkUtil.untrust('00000')]).instance_eval{
@mutex = Mutex.new
def mutex; @mutex; end
freeze
@@ -729,6 +769,10 @@ module Tk::BLT
@id
end
+ def cget_tkstring(option)
+ # @chart.element_cget(@id, option)
+ @chart.__send__(@typename + '_cget_tkstring', @id, option)
+ end
def cget(option)
# @chart.element_cget(@id, option)
@chart.__send__(@typename + '_cget', @id, option)
@@ -833,6 +877,9 @@ module Tk::BLT
@id
end
+ def cget_tkstring(option)
+ @chart.gridline_cget_tkstring(option)
+ end
def cget(option)
@chart.gridline_cget(option)
end
@@ -907,6 +954,9 @@ module Tk::BLT
@id
end
+ def cget_tkstring(option)
+ @chart.legend_cget_tkstring(option)
+ end
def cget(option)
@chart.legend_cget(option)
end
@@ -940,7 +990,7 @@ module Tk::BLT
#################
class Pen < TkObject
- (OBJ_ID = ['blt_chart_pen'.freeze, '00000'.taint]).instance_eval{
+ (OBJ_ID = ['blt_chart_pen'.freeze, TkUtil.untrust('00000')]).instance_eval{
@mutex = Mutex.new
def mutex; @mutex; end
freeze
@@ -1036,6 +1086,9 @@ module Tk::BLT
@id
end
+ def cget_tkstring(option)
+ @chart.pen_cget_tkstring(@id, option)
+ end
def cget(option)
@chart.pen_cget(@id, option)
end
@@ -1106,6 +1159,9 @@ module Tk::BLT
@id
end
+ def cget_tkstring(option)
+ @chart.postscript_cget_tkstring(option)
+ end
def cget(option)
@chart.postscript_cget(option)
end
@@ -1269,6 +1325,9 @@ module Tk::BLT
@id
end
+ def cget_tkstring(option)
+ @chart.marker_cget_tkstring(@id, option)
+ end
def cget(option)
@chart.marker_cget(@id, option)
end
@@ -1854,6 +1913,9 @@ module Tk::BLT
###################
+ def xaxis_cget_tkstring(option)
+ itemcget_tkstring('xaxis', option)
+ end
def xaxis_cget(option)
itemcget('xaxis', option)
end
@@ -1926,6 +1988,9 @@ module Tk::BLT
end
end
+ def x2axis_cget_tkstring(option)
+ itemcget_tkstring('x2axis', option)
+ end
def x2axis_cget(option)
itemcget('x2axis', option)
end
@@ -1998,6 +2063,9 @@ module Tk::BLT
end
end
+ def yaxis_cget_tkstring(option)
+ itemcget_tkstring('yaxis', option)
+ end
def yaxis_cget(option)
itemcget('yaxis', option)
end
@@ -2070,6 +2138,9 @@ module Tk::BLT
end
end
+ def y2axis_cget_tkstring(option)
+ itemcget_tkstring('y2axis', option)
+ end
def y2axis_cget(option)
itemcget('y2axis', option)
end
diff --git a/ext/tk/lib/tkextlib/blt/container.rb b/ext/tk/lib/tkextlib/blt/container.rb
index cdbec21f25..be05828d95 100644
--- a/ext/tk/lib/tkextlib/blt/container.rb
+++ b/ext/tk/lib/tkextlib/blt/container.rb
@@ -10,7 +10,7 @@ module Tk::BLT
class Container < TkWindow
TkCommandNames = ['::blt::container'.freeze].freeze
WidgetClassName = 'Container'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
def __strval_optkeys
super() << 'name'
diff --git a/ext/tk/lib/tkextlib/blt/dragdrop.rb b/ext/tk/lib/tkextlib/blt/dragdrop.rb
index d11d8bc41a..aa5c5654c2 100644
--- a/ext/tk/lib/tkextlib/blt/dragdrop.rb
+++ b/ext/tk/lib/tkextlib/blt/dragdrop.rb
@@ -15,7 +15,7 @@ module Tk::BLT
class Token < TkWindow
WidgetClassName = 'DragDropToken'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
def initialize(arg)
if arg.kind_of?(Hash) # arg is a hash includes the widgetpath of token
@@ -55,6 +55,7 @@ module Tk::BLT
private :__item_strval_optkeys
undef itemcget
+ undef itemcget_tkstring
private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
def source_configure(win, slot, value=None)
diff --git a/ext/tk/lib/tkextlib/blt/graph.rb b/ext/tk/lib/tkextlib/blt/graph.rb
index 9ae99bff5c..6bd4424065 100644
--- a/ext/tk/lib/tkextlib/blt/graph.rb
+++ b/ext/tk/lib/tkextlib/blt/graph.rb
@@ -11,7 +11,7 @@ module Tk::BLT
class Graph < TkWindow
TkCommandNames = ['::blt::graph'.freeze].freeze
WidgetClassName = 'Graph'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
include PlotComponent
include GraphCommand
@@ -27,7 +27,7 @@ module Tk::BLT
private :__strval_optkeys
=begin
- BarElement_ID = ['blt_graph_bar'.freeze, '00000'.taint].freeze
+ BarElement_ID = ['blt_graph_bar'.freeze, TkUtil.untrust('00000')].freeze
def bar(elem=nil, keys={})
if elem.kind_of?(Hash)
diff --git a/ext/tk/lib/tkextlib/blt/htext.rb b/ext/tk/lib/tkextlib/blt/htext.rb
index 0d9cb30185..878bd9982d 100644
--- a/ext/tk/lib/tkextlib/blt/htext.rb
+++ b/ext/tk/lib/tkextlib/blt/htext.rb
@@ -19,8 +19,9 @@ module Tk::BLT
TkCommandNames = ['::blt::htext'.freeze].freeze
WidgetClassName = 'Htext'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
+ alias window_cget_tkstring itemcget_tkstring
alias window_cget itemcget
alias window_cget_strict itemcget_strict
alias window_configure itemconfigure
diff --git a/ext/tk/lib/tkextlib/blt/stripchart.rb b/ext/tk/lib/tkextlib/blt/stripchart.rb
index a6b0f354e2..74093f1868 100644
--- a/ext/tk/lib/tkextlib/blt/stripchart.rb
+++ b/ext/tk/lib/tkextlib/blt/stripchart.rb
@@ -11,7 +11,7 @@ module Tk::BLT
class Stripchart < TkWindow
TkCommandNames = ['::blt::stripchart'.freeze].freeze
WidgetClassName = 'Stripchart'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
include PlotComponent
include GraphCommand
@@ -28,7 +28,7 @@ module Tk::BLT
private :__strval_optkeys
=begin
- BarElement_ID = ['blt_stripchart_bar'.freeze, '00000'.taint].freeze
+ BarElement_ID = ['blt_stripchart_bar'.freeze, TkUtil.untrust('00000')].freeze
def bar(elem=nil, keys={})
if elem.kind_of?(Hash)
diff --git a/ext/tk/lib/tkextlib/blt/table.rb b/ext/tk/lib/tkextlib/blt/table.rb
index dfa10269ed..205e29e6c5 100644
--- a/ext/tk/lib/tkextlib/blt/table.rb
+++ b/ext/tk/lib/tkextlib/blt/table.rb
@@ -26,6 +26,9 @@ module Tk::BLT
self
end
+ def blt_table_cget_tkstring(*args)
+ Tk::BLT::Table.cget_tkstring(self, *args)
+ end
def blt_table_cget(*args)
Tk::BLT::Table.cget(self, *args)
end
@@ -92,6 +95,9 @@ module Tk::BLT
self
end
+ def blt_table_itemcget_tkstring(*args)
+ Tk::BLT::Table.itemcget_tkstring(self, *args)
+ end
def blt_table_itemcget(*args)
Tk::BLT::Table.itemcget(self, *args)
end
@@ -141,13 +147,14 @@ class << Tk::BLT::Table
end
private :__item_pathname
+ alias __itemcget_tkstring itemcget_tkstring
alias __itemcget itemcget
alias __itemcget_strict itemcget_strict
alias __itemconfigure itemconfigure
alias __itemconfiginfo itemconfiginfo
alias __current_itemconfiginfo current_itemconfiginfo
- private :__itemcget, :__itemcget_strict
+ private :__itemcget_tkstring, :__itemcget, :__itemcget_strict
private :__itemconfigure, :__itemconfiginfo, :__current_itemconfiginfo
def __boolval_optkeys
@@ -180,6 +187,9 @@ class << Tk::BLT::Table
############################################
+ def cget_tkstring(container, option)
+ __itemcget_tkstring([container], option)
+ end
def cget(container, option)
__itemcget([container], option)
end
@@ -199,6 +209,9 @@ class << Tk::BLT::Table
__current_itemconfiginfo([container], *args)
end
+ def itemcget_tkstring(container, item, option)
+ __itemcget_tkstring([container, tagid(item)], option)
+ end
def itemcget(container, item, option)
__itemcget([container, tagid(item)], option)
end
diff --git a/ext/tk/lib/tkextlib/blt/tabnotebook.rb b/ext/tk/lib/tkextlib/blt/tabnotebook.rb
index 738ba7c601..82936c67d3 100644
--- a/ext/tk/lib/tkextlib/blt/tabnotebook.rb
+++ b/ext/tk/lib/tkextlib/blt/tabnotebook.rb
@@ -11,7 +11,7 @@ module Tk::BLT
class Tabnotebook < Tabset
TkCommandNames = ['::blt::tabnotebook'.freeze].freeze
WidgetClassName = 'Tabnotebook'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
class Tab < Tk::BLT::Tabset::Tab
def self.new(parent, pos=nil, name=nil, keys={})
diff --git a/ext/tk/lib/tkextlib/blt/tabset.rb b/ext/tk/lib/tkextlib/blt/tabset.rb
index b5e076db3a..c4716c7304 100644
--- a/ext/tk/lib/tkextlib/blt/tabset.rb
+++ b/ext/tk/lib/tkextlib/blt/tabset.rb
@@ -13,7 +13,7 @@ module Tk::BLT
TabID_TBL = TkCore::INTERP.create_table
- (TabsetTab_ID = ['blt_tabset_tab'.freeze, '00000'.taint]).instance_eval{
+ (TabsetTab_ID = ['blt_tabset_tab'.freeze, TkUtil.untrust('00000')]).instance_eval{
@mutex = Mutex.new
def mutex; @mutex; end
freeze
@@ -132,6 +132,9 @@ module Tk::BLT
@t.tab_bindinfo(@id, context)
end
+ def cget_tkstring(*args)
+ @t.tab_cget_tkstring(@id, *args)
+ end
def cget(*args)
@t.tab_cget(@id, *args)
end
@@ -210,7 +213,7 @@ module Tk::BLT
TkCommandNames = ['::blt::tabset'.freeze].freeze
WidgetClassName = 'Tabset'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
def __destroy_hook__
Tk::BLT::Tabset::Tab::TabID_TBL.mutex.synchronize{
@@ -249,6 +252,7 @@ module Tk::BLT
end
private :__item_pathname
+ alias tab_cget_tkstring itemcget_tkstring
alias tab_cget itemcget
alias tab_cget_strict itemcget_strict
alias tab_configure itemconfigure
diff --git a/ext/tk/lib/tkextlib/blt/ted.rb b/ext/tk/lib/tkextlib/blt/ted.rb
index 670265fc78..53ab9acdaa 100644
--- a/ext/tk/lib/tkextlib/blt/ted.rb
+++ b/ext/tk/lib/tkextlib/blt/ted.rb
@@ -30,9 +30,12 @@ module Tk::BLT
end
private :__item_config_cmd
- private :itemcget, :itemcget_strict
+ private :itemcget_tkstring, :itemcget, :itemcget_strict
private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
+ def cget_tkstring(master, option)
+ itemcget_tkstring(master, option)
+ end
def cget(master, option)
itemcget(master, option)
end
diff --git a/ext/tk/lib/tkextlib/blt/tile.rb b/ext/tk/lib/tkextlib/blt/tile.rb
index 5f5242f299..c67cafd8d6 100644
--- a/ext/tk/lib/tkextlib/blt/tile.rb
+++ b/ext/tk/lib/tkextlib/blt/tile.rb
@@ -8,6 +8,10 @@ require 'tkextlib/blt.rb'
module Tk::BLT
module Tile
+ TkComm::TkExtlibAutoloadModule.unshift(self)
+ # Require autoload-symbols which is a same name as widget classname.
+ # Those are used at TkComm._genobj_for_tkwidget method.
+
autoload :Button, 'tkextlib/blt/tile/button.rb'
autoload :CheckButton, 'tkextlib/blt/tile/checkbutton.rb'
autoload :Checkbutton, 'tkextlib/blt/tile/checkbutton.rb'
diff --git a/ext/tk/lib/tkextlib/blt/tree.rb b/ext/tk/lib/tkextlib/blt/tree.rb
index 605a64daa6..da53a6ed04 100644
--- a/ext/tk/lib/tkextlib/blt/tree.rb
+++ b/ext/tk/lib/tkextlib/blt/tree.rb
@@ -272,7 +272,7 @@ module Tk::BLT
TreeTagID_TBL.mutex.synchronize{ TreeTagID_TBL.clear }
}
- (TreeTag_ID = ['blt_tree_tag'.freeze, '00000'.taint]).instance_eval{
+ (TreeTag_ID = ['blt_tree_tag'.freeze, TkUtil.untrust('00000')]).instance_eval{
@mutex = Mutex.new
def mutex; @mutex; end
freeze
@@ -578,7 +578,7 @@ module Tk::BLT
TreeID_TBL = TkCore::INTERP.create_table
- (Tree_ID = ['blt_tree'.freeze, '00000'.taint]).instance_eval{
+ (Tree_ID = ['blt_tree'.freeze, TkUtil.untrust('00000')]).instance_eval{
@mutex = Mutex.new
def mutex; @mutex; end
freeze
diff --git a/ext/tk/lib/tkextlib/blt/treeview.rb b/ext/tk/lib/tkextlib/blt/treeview.rb
index 550422ee2e..046cf7f837 100644
--- a/ext/tk/lib/tkextlib/blt/treeview.rb
+++ b/ext/tk/lib/tkextlib/blt/treeview.rb
@@ -95,6 +95,9 @@ module Tk::BLT::Treeview::ConfigMethod
end
private :__item_pathname
+ def column_cget_tkstring(name, option)
+ itemcget_tkstring(['column', name], option)
+ end
def column_cget(name, option)
itemcget(['column', name], option)
end
@@ -111,6 +114,9 @@ module Tk::BLT::Treeview::ConfigMethod
current_itemconfiginfo(['column', name], slot)
end
+ def button_cget_tkstring(option)
+ itemcget_tkstring('button', option)
+ end
def button_cget(option)
itemcget('button', option)
end
@@ -127,6 +133,9 @@ module Tk::BLT::Treeview::ConfigMethod
current_itemconfiginfo('button', slot)
end
+ def entry_cget_tkstring(option)
+ itemcget_tkstring('entry', option)
+ end
def entry_cget(option)
ret = itemcget('entry', option)
if option == 'bindtags' || option == :bindtags
@@ -181,6 +190,9 @@ module Tk::BLT::Treeview::ConfigMethod
ret
end
+ def sort_cget_tkstring(option)
+ itemcget_tkstring('sort', option)
+ end
def sort_cget(option)
itemcget('sort', option)
end
@@ -197,6 +209,9 @@ module Tk::BLT::Treeview::ConfigMethod
current_itemconfiginfo('sort', slot)
end
+ def text_cget_tkstring(option)
+ itemcget_tkstring('text', option)
+ end
def text_cget(option)
itemcget('text', option)
end
@@ -213,14 +228,14 @@ module Tk::BLT::Treeview::ConfigMethod
current_itemconfiginfo('text', slot)
end
- private :itemcget, :itemcget_strict
+ private :itemcget_tkstring, :itemcget, :itemcget_strict
private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
end
class Tk::BLT::Treeview
TkCommandNames = ['::blt::treeview'.freeze].freeze
WidgetClassName = 'TreeView'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
include Scrollable
include ValidateConfigure
@@ -1029,7 +1044,7 @@ class Tk::BLT::Treeview::Node < TkObject
TreeNodeID_TBL = TkCore::INTERP.create_table
- (TreeNode_ID = ['blt_treeview_node'.freeze, '00000'.taint]).instance_eval{
+ (TreeNode_ID = ['blt_treeview_node'.freeze, TkUtil.untrust('00000')]).instance_eval{
@mutex = Mutex.new
def mutex; @mutex; end
freeze
@@ -1150,7 +1165,7 @@ class Tk::BLT::Treeview::Tag < TkObject
TreeTagID_TBL = TkCore::INTERP.create_table
- (TreeTag_ID = ['blt_treeview_tag'.freeze, '00000'.taint]).instance_eval{
+ (TreeTag_ID = ['blt_treeview_tag'.freeze, TkUtil.untrust('00000')]).instance_eval{
@mutex = Mutex.new
def mutex; @mutex; end
freeze
@@ -1268,5 +1283,5 @@ end
class Tk::BLT::Hiertable
TkCommandNames = ['::blt::hiertable'.freeze].freeze
WidgetClassName = 'Hiertable'.freeze
- WidgetClassNames[WidgetClassName] = self
+ WidgetClassNames[WidgetClassName] ||= self
end
diff --git a/ext/tk/lib/tkextlib/blt/unix_dnd.rb b/ext/tk/lib/tkextlib/blt/unix_dnd.rb
index 445002d7a5..8996f7c891 100644
--- a/ext/tk/lib/tkextlib/blt/unix_dnd.rb
+++ b/ext/tk/lib/tkextlib/blt/unix_dnd.rb
@@ -30,9 +30,12 @@ module Tk::BLT
end
private :__item_config_cmd
- private :itemcget, :itemcget_strict
+ private :itemcget_tkstring, :itemcget, :itemcget_strict
private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
+ def cget_tkstring(win, option)
+ itemcget_tkstring(['cget', win], option)
+ end
def cget(win, option)
itemcget(['cget', win], option)
end
@@ -49,6 +52,9 @@ module Tk::BLT
current_itemconfiginfo(['configure', win], slot)
end
+ def token_cget_tkstring(win, option)
+ itemcget_tkstring(['token', 'cget', win], option)
+ end
def token_cget(win, option)
itemcget(['token', 'cget', win], option)
end
diff --git a/ext/tk/lib/tkextlib/blt/watch.rb b/ext/tk/lib/tkextlib/blt/watch.rb
index 219ff78e97..292623ff58 100644
--- a/ext/tk/lib/tkextlib/blt/watch.rb
+++ b/ext/tk/lib/tkextlib/blt/watch.rb
@@ -14,7 +14,7 @@ module Tk::BLT
WATCH_ID_TBL = TkCore::INTERP.create_table
- (BLT_WATCH_ID = ['blt_watch_id'.freeze, '00000'.taint]).instance_eval{
+ (BLT_WATCH_ID = ['blt_watch_id'.freeze, TkUtil.untrust('00000')]).instance_eval{
@mutex = Mutex.new
def mutex; @mutex; end
freeze