summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkextlib/tile.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/tile.rb')
-rw-r--r--ext/tk/lib/tkextlib/tile.rb40
1 files changed, 20 insertions, 20 deletions
diff --git a/ext/tk/lib/tkextlib/tile.rb b/ext/tk/lib/tkextlib/tile.rb
index 60ea012cc0..09cf49faa6 100644
--- a/ext/tk/lib/tkextlib/tile.rb
+++ b/ext/tk/lib/tkextlib/tile.rb
@@ -16,7 +16,7 @@ require 'tkextlib/tile/setup.rb'
# TkPackage.require('tile', '0.4')
# TkPackage.require('tile', '0.6')
# TkPackage.require('tile', '0.7')
-if Tk::TK_MAJOR_VERSION > 8 ||
+if Tk::TK_MAJOR_VERSION > 8 ||
(Tk::TK_MAJOR_VERSION == 8 && Tk::TK_MINOR_VERSION >= 5)
TkPackage.require('tile') # for compatibility (version check of 'tile')
verstr = TkPackage.require('Ttk')
@@ -105,17 +105,17 @@ module Tk
def self.__define_LoadImages_proc_for_compatibility__!
# Ttk 8.5 (Tile 0.8) lost 'LoadImages' utility procedure.
- # So, some old scripts doen't work, because those scripts use the
- # procedure to define local styles.
- # Of course, rewriting such Tcl/Tk scripts isn't difficult for
- # Tcl/Tk users. However, it may be troublesome for Ruby/Tk users
+ # So, some old scripts doen't work, because those scripts use the
+ # procedure to define local styles.
+ # Of course, rewriting such Tcl/Tk scripts isn't difficult for
+ # Tcl/Tk users. However, it may be troublesome for Ruby/Tk users
# who use such Tcl/Tk scripts as it is.
- # This method may help Ruby/Tk users who don't want to modify old
+ # This method may help Ruby/Tk users who don't want to modify old
# Tcl/Tk scripts for the latest version of Ttk (Tile) extension.
- # This method defines a comaptible 'LoadImages' procedure on the
- # Tcl/Tk interpreter working under Ruby/Tk.
- # Please give attention to use this method. It may conflict with
- # some definitions on Tcl/Tk scripts.
+ # This method defines a comaptible 'LoadImages' procedure on the
+ # Tcl/Tk interpreter working under Ruby/Tk.
+ # Please give attention to use this method. It may conflict with
+ # some definitions on Tcl/Tk scripts.
klass_name = self.name
proc_name = 'LoadImages'
if Tk::Tile::USE_TTK_NAMESPACE
@@ -140,7 +140,7 @@ module Tk
next
end
TkNamespace.eval(ns){
- TkCore::INTERP.add_tk_procs(proc_name, 'imgdir {patterns {*.gif}}',
+ TkCore::INTERP.add_tk_procs(proc_name, 'imgdir {patterns {*.gif}}',
<<-'EOS')
foreach pattern $patterns {
foreach file [glob -directory $imgdir $pattern] {
@@ -166,7 +166,7 @@ module Tk
pat ||= TkComm::None
images = Hash[*TkComm.simplelist(Tk.tk_call(cmd, imgdir, pat))]
images.keys.each{|k|
- images[k] = TkPhotoImage.new(:imagename=>images[k],
+ images[k] = TkPhotoImage.new(:imagename=>images[k],
:without_creating=>true)
}
else ## TILE_SPEC_VERSION_ID >= 8
@@ -181,7 +181,7 @@ module Tk
Dir.glob(pat).each{|f|
img = File.basename(f, '.*')
unless TkComm.bool(Tk.info('exists', "images(#{img})"))
- Tk.tk_call('set', "images(#{img})",
+ Tk.tk_call('set', "images(#{img})",
Tk.tk_call('image', 'create', 'photo', '-file', f))
end
}
@@ -189,7 +189,7 @@ module Tk
}
images = Hash[*TkComm.simplelist(Tk.tk_call('array', 'get', 'images'))]
images.keys.each{|k|
- images[k] = TkPhotoImage.new(:imagename=>images[k],
+ images[k] = TkPhotoImage.new(:imagename=>images[k],
:without_creating=>true)
}
end
@@ -213,8 +213,8 @@ module Tk
begin
TkComm.simplelist(Tk.tk_call_without_enc(*cmd))
rescue
- TkComm.simplelist(Tk.tk_call('lsearch', '-all', '-inline',
- Tk::Tile::Style.theme_names,
+ TkComm.simplelist(Tk.tk_call('lsearch', '-all', '-inline',
+ Tk::Tile::Style.theme_names,
glob_ptn))
end
end
@@ -264,8 +264,8 @@ module Tk
Icon = 'TkIconFont'
TkFont::SYSTEM_FONT_NAMES.add [
- 'TkDefaultFont', 'TkTextFont', 'TkHeadingFont',
- 'TkCaptionFont', 'TkTooltipFont', 'TkFixedFont',
+ 'TkDefaultFont', 'TkTextFont', 'TkHeadingFont',
+ 'TkCaptionFont', 'TkTooltipFont', 'TkFixedFont',
'TkMenuFont', 'TkSmallCaptionFont', 'TkIconFont'
]
end
@@ -280,7 +280,7 @@ module Tk
until lst.empty?
if lst[0][0] == ?-
k = lst.shift[1..-1]
- children = lst.shift
+ children = lst.shift
children = _style_layout(children) if children.kind_of?(Array)
keys[k] = children
else
@@ -332,7 +332,7 @@ module Tk
end
alias tile_identify ttk_identify
- # remove instate/state/identify method
+ # remove instate/state/identify method
# to avoid the conflict with widget options
if Tk.const_defined?(:USE_OBSOLETE_TILE_STATE_METHOD) && Tk::USE_OBSOLETE_TILE_STATE_METHOD
alias instate ttk_instate