summaryrefslogtreecommitdiff
path: root/ext/tk
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk')
-rw-r--r--ext/tk/extconf.rb82
-rw-r--r--ext/tk/lib/multi-tk.rb8
-rw-r--r--ext/tk/lib/tk.rb4
-rw-r--r--ext/tk/lib/tk/autoload.rb10
-rw-r--r--ext/tk/lib/tk/fontchooser.rb12
-rw-r--r--ext/tk/lib/tk/menuspec.rb2
-rw-r--r--ext/tk/lib/tk/ttk_selector.rb2
-rw-r--r--ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb2
-rw-r--r--ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb2
-rw-r--r--ext/tk/lib/tkextlib/tcllib/chatwidget.rb4
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ip_entry.rb2
-rw-r--r--ext/tk/lib/tkextlib/tcllib/khim.rb4
-rw-r--r--ext/tk/lib/tkextlib/tcllib/plotchart.rb14
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tablelist.rb2
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tablelist_core.rb12
-rw-r--r--ext/tk/lib/tkextlib/tile/sizegrip.rb2
-rw-r--r--ext/tk/lib/tkextlib/tile/style.rb2
-rw-r--r--ext/tk/sample/editable_listbox.rb2
-rw-r--r--ext/tk/sample/menubar3.rb2
-rw-r--r--ext/tk/sample/safe-tk.rb2
-rw-r--r--ext/tk/sample/scrollframe.rb6
-rw-r--r--ext/tk/sample/tkalignbox.rb6
-rw-r--r--ext/tk/sample/tkballoonhelp.rb6
-rw-r--r--ext/tk/sample/tkcombobox.rb10
-rw-r--r--ext/tk/stubs.c2
-rw-r--r--ext/tk/tcltklib.c10
26 files changed, 106 insertions, 106 deletions
diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb
index 388d6fc1aa..c7bc45f150 100644
--- a/ext/tk/extconf.rb
+++ b/ext/tk/extconf.rb
@@ -5,7 +5,7 @@
require 'mkmf'
TkLib_Config = {}
-TkLib_Config['search_versions'] =
+TkLib_Config['search_versions'] =
# %w[8.9 8.8 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6 4.2]
# %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0]
%w[8.7 8.6 8.5 8.4 8.0] # to shorten search steps
@@ -26,7 +26,7 @@ end
$cleanfiles << 'config_list'
config_list_file = 'config_list'
config_list_file_source = File.join(File.dirname(__FILE__),'config_list.in')
-if !File.exist?(config_list_file) ||
+if !File.exist?(config_list_file) ||
File.ctime(config_list_file_source) > File.ctime(config_list_file)
old_config_list_file = config_list_file_source
else
@@ -92,7 +92,7 @@ if update_flag
else
makefile = 'Makefile'
- if File.exist?(makefile) &&
+ if File.exist?(makefile) &&
File.ctime(config_list_file) > File.ctime(makefile)
# no need to update Makefile
exit
@@ -197,7 +197,7 @@ def get_shlib_path_head
else
[
- '/opt', '/pkg', '/share',
+ '/opt', '/pkg', '/share',
'/usr/local/opt', '/usr/local/pkg', '/usr/local/share', '/usr/local',
'/usr/opt', '/usr/pkg', '/usr/share', '/usr/contrib', '/usr'
].each{|dir|
@@ -268,7 +268,7 @@ def find_macosx_framework
end
# framework is disabled?
- if with_config("tcltk-framework") == false ||
+ if with_config("tcltk-framework") == false ||
enable_config("tcltk-framework") == false
return false
end
@@ -276,7 +276,7 @@ def find_macosx_framework
use_framework ||= (framework_dir = with_config("tcltk-framework"))
if framework_dir.kind_of? String
TkLib_Config["tcltk-framework"] = framework_dir.strip.chomp('/')
- return [File.join(TkLib_Config["tcltk-framework"], 'Tcl.framework'),
+ return [File.join(TkLib_Config["tcltk-framework"], 'Tcl.framework'),
File.join(TkLib_Config["tcltk-framework"], 'Tk.framework')]
end
@@ -287,7 +287,7 @@ def find_macosx_framework
end
paths = [
- #"~/Library/Frameworks",
+ #"~/Library/Frameworks",
"/Library/Frameworks",
"/Network/Library/Frameworks", "/System/Library/Frameworks"
]
@@ -305,7 +305,7 @@ end
def collect_tcltk_defs(tcl_defs_str, tk_defs_str)
conflicts = [
- 'PACKAGE_NAME', 'PACKAGE_TARNAME', 'PACKAGE_VERSION',
+ 'PACKAGE_NAME', 'PACKAGE_TARNAME', 'PACKAGE_VERSION',
'PACKAGE_STRING', 'PACKAGE_BUGREPORT'
]
@@ -347,7 +347,7 @@ def collect_tcltk_defs(tcl_defs_str, tk_defs_str)
defs.delete_if{|name,value|
conflicts.include?(name) ||
- ( (vtcl = tcl_defs.assoc(name)) && (vtk = tk_defs.assoc(name)) &&
+ ( (vtcl = tcl_defs.assoc(name)) && (vtk = tk_defs.assoc(name)) &&
vtcl != vtk )
}
@@ -433,7 +433,7 @@ def get_tclConfig_dirs
File.join(base, 'Tk.framework', 'Versions', 'Current')
]
- Dir.glob(File.join(base, 'Tcl.framework',
+ Dir.glob(File.join(base, 'Tcl.framework',
'Versions', '*')).sort.reverse.each{|dir|
next if dir =~ /Current/
config_dir << [dir, dir.gsub(/Tcl/, 'Tk')]
@@ -446,14 +446,14 @@ def get_tclConfig_dirs
config_dir.concat [
RbConfig::CONFIG['libdir'],
File.join(RbConfig::CONFIG['exec_prefix'], 'lib'),
- File.join(RbConfig::CONFIG['prefix'], 'lib'),
- "/usr/local/opt/lib", "/usr/local/pkg/lib", "/usr/local/share/lib",
- "/usr/local/lib", "/usr/opt/lib", "/usr/pkg/lib",
+ File.join(RbConfig::CONFIG['prefix'], 'lib'),
+ "/usr/local/opt/lib", "/usr/local/pkg/lib", "/usr/local/share/lib",
+ "/usr/local/lib", "/usr/opt/lib", "/usr/pkg/lib",
"/usr/share/lib", "/usr/contrib/lib", "/usr/lib"
]
config_dir.concat [
- '/opt', '/pkg', '/share',
+ '/opt', '/pkg', '/share',
'/usr/local/opt', '/usr/local/pkg', '/usr/local/share', '/usr/local',
'/usr/opt', '/usr/pkg', '/usr/share', '/usr/contrib', '/usr'
].map{|dir|
@@ -483,7 +483,7 @@ def get_tclConfig_dirs
}
paths = [
- #"~/Library/Frameworks",
+ #"~/Library/Frameworks",
"/Library/Frameworks",
"/Network/Library/Frameworks", "/System/Library/Frameworks"
]
@@ -500,7 +500,7 @@ def get_tclConfig_dirs
File.join(base, 'Tk.framework', 'Versions', 'Current')
]
- Dir.glob(File.join(base, 'Tcl.framework',
+ Dir.glob(File.join(base, 'Tcl.framework',
'Versions', '*')).sort.reverse.each{|dir|
next if dir =~ /Current/
config_dir << [dir, dir.gsub(/Tcl/, 'Tk')]
@@ -702,7 +702,7 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file]
end
def get_tclConfig(tclConfig_file, tkConfig_file, tclConfig_dir, tkConfig_dir)
- use_tclConfig = (tclConfig_file != false) && (tkConfig_file != false) &&
+ use_tclConfig = (tclConfig_file != false) && (tkConfig_file != false) &&
(tclConfig_dir != false) && (tkConfig_dir != false)
unless use_tclConfig
@@ -736,11 +736,11 @@ def get_tclConfig(tclConfig_file, tkConfig_file, tclConfig_dir, tkConfig_dir)
TkLib_Config["tclConfig-dir"] = tclConfig_dir
TkLib_Config["tkConfig-dir"] = tkConfig_dir
- print("Search tclConfig.sh", (tclConfig_dir)? " (in #{tclConfig_dir})": "",
+ print("Search tclConfig.sh", (tclConfig_dir)? " (in #{tclConfig_dir})": "",
" and tkConfig.sh", (tkConfig_dir)? " (in #{tkConfig_dir})": "", ".")
if tclConfig_dir
- tclConfig, tkConfig =
- search_tclConfig([ ((tclConfig_file)? tclConfig_file: tclConfig_dir),
+ tclConfig, tkConfig =
+ search_tclConfig([ ((tclConfig_file)? tclConfig_file: tclConfig_dir),
((tkConfig_file)? tkConfig_file: tkConfig_dir) ])
else
tclConfig, tkConfig = search_tclConfig()
@@ -1057,7 +1057,7 @@ def find_tk(tklib, stubs, version, *opt_paths)
ret
end
-def find_tcltk_library(tcllib, tklib, stubs, tclversion, tkversion,
+def find_tcltk_library(tcllib, tklib, stubs, tclversion, tkversion,
tcl_opt_paths, tk_opt_paths)
ret = find_tcl(tcllib, stubs, tclversion, *tcl_opt_paths)
unless ret && ret.find{|path, val| val}
@@ -1094,7 +1094,7 @@ def find_tcltk_header(tclver, tkver)
base_dir.delete_if{|path| path =~ / /}
end
- if TclConfig_Info['TCL_INCLUDE_SPEC'] &&
+ if TclConfig_Info['TCL_INCLUDE_SPEC'] &&
have_tcl_h = try_cpp('#include <tcl.h>', TclConfig_Info['TCL_INCLUDE_SPEC'])
$INCFLAGS << " " << TclConfig_Info['TCL_INCLUDE_SPEC']
elsif have_tcl_h = have_header('tcl.h')
@@ -1106,7 +1106,7 @@ def find_tcltk_header(tclver, tkver)
versions = TkLib_Config['search_versions']
end
paths = base_dir.dup
- versions.each{|ver|
+ versions.each{|ver|
paths.concat(base_dir.map{|dir|
[dir + '/tcl' + ver, dir + '/tcl' + ver.delete('.')]
}.flatten)
@@ -1114,7 +1114,7 @@ def find_tcltk_header(tclver, tkver)
have_tcl_h = find_header('tcl.h', *paths)
end
- if TkConfig_Info['TK_INCLUDE_SPEC'] &&
+ if TkConfig_Info['TK_INCLUDE_SPEC'] &&
have_tk_h = try_cpp('#include <tk.h>', TkConfig_Info['TK_INCLUDE_SPEC'])
$INCFLAGS << " " << TkConfig_Info['TK_INCLUDE_SPEC']
elsif have_tk_h = have_header('tk.h')
@@ -1126,7 +1126,7 @@ def find_tcltk_header(tclver, tkver)
versions = TkLib_Config['search_versions']
end
paths = base_dir.dup
- versions.each{|ver|
+ versions.each{|ver|
paths.concat(base_dir.map{|dir|
[dir + '/tk' + ver, dir + '/tk' + ver.delete('.')]
}.flatten)
@@ -1158,14 +1158,14 @@ def setup_for_macosx_framework(tclver, tkver)
TclConfig_Info['TCL_INCLUDE_SPEC'] << File.join(tcl_base, 'Headers')
unless tclver
- dir = Dir.glob(File.join(tcl_base, 'Versions', '*', 'Headers'),
+ dir = Dir.glob(File.join(tcl_base, 'Versions', '*', 'Headers'),
File::FNM_CASEFOLD).sort.reverse[0]
TclConfig_Info['TCL_INCLUDE_SPEC'] << "-I#{dir.quote} " if dir
end
end
if TkLib_Config["tk-framework-header"]
- TkConfig_Info['TK_INCLUDE_SPEC'] =
+ TkConfig_Info['TK_INCLUDE_SPEC'] =
"-I#{TkLib_Config["tk-framework-header"].quote} "
else
TkConfig_Info['TK_INCLUDE_SPEC'] = ""
@@ -1179,7 +1179,7 @@ def setup_for_macosx_framework(tclver, tkver)
TkConfig_Info['TK_INCLUDE_SPEC'] << File.join(tk_base, 'Headers')
unless tkver
- dir = Dir.glob(File.join(tk_base, 'Versions', '*', 'Headers'),
+ dir = Dir.glob(File.join(tk_base, 'Versions', '*', 'Headers'),
File::FNM_CASEFOLD).sort.reverse[0]
TkConfig_Info['TK_INCLUDE_SPEC'] << "-I#{dir.quote} " if dir
end
@@ -1288,9 +1288,9 @@ def pthread_check()
**
** NATIVETHREAD SUPPORT CHECK WARNING:
**
-** We cannot check the consistency of nativethread support between
+** We cannot check the consistency of nativethread support between
** Ruby and the Tcl/Tk library in your environment (are you perhaps
-** cross-compiling?). If nativethread support for these 2 packages
+** cross-compiling?). If nativethread support for these 2 packages
** is inconsistent you may find you get errors when running Ruby/Tk
** (e.g. hangs or segmentation faults). We strongly recommend
** you to check the consistency manually.
@@ -1333,17 +1333,17 @@ EOF
**
** NATIVETHREAD SUPPORT MODE WARNING:
**
-** Ruby is compiled with --enable-pthread, but your Tcl/Tk library
-** seems to be compiled without nativethread support. Although you can
-** create the tcltklib library, this combination may cause errors (e.g.
-** hangs or segmentation faults). If you have no reason to keep the
-** current nativethread support status, we recommend you reconfigure and
+** Ruby is compiled with --enable-pthread, but your Tcl/Tk library
+** seems to be compiled without nativethread support. Although you can
+** create the tcltklib library, this combination may cause errors (e.g.
+** hangs or segmentation faults). If you have no reason to keep the
+** current nativethread support status, we recommend you reconfigure and
** recompile the libraries so that both or neither support nativethreads.
**
** If you want change the status of nativethread support, please recompile
** Ruby without "--enable-pthread" configure option (If you use Ruby 1.9.x
** or later, you cannot remove this option, because it requires native-
-** thread support.) or recompile Tcl/Tk with "--enable-threads" configure
+** thread support.) or recompile Tcl/Tk with "--enable-threads" configure
** option (if your Tcl/Tk is later than or equal to Tcl/Tk 8.1).
**
*****************************************************************************
@@ -1434,14 +1434,14 @@ end
$CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM
# Does ruby have nativethread ?
-TkLib_Config["ruby_with_thread"] =
+TkLib_Config["ruby_with_thread"] =
macro_defined?('HAVE_NATIVETHREAD', '#include "ruby.h"')
#---------------------------------------------------
# check requirement of Tcl/tk version
tcltk_version = with_config("tcltkversion")
-tclver, tkver =
+tclver, tkver =
TkLib_Config["tcltkversion"] = check_tcltk_version(tcltk_version)
puts("Specified Tcl/Tk version is #{[tclver, tkver].inspect}") if tclver&&tkver
@@ -1464,12 +1464,12 @@ end
TkLib_Config["ActiveTcl"] = activeTcl
# allow space chars on a libpath
-TkLib_Config["space-on-tk-libpath"] =
+TkLib_Config["space-on-tk-libpath"] =
enable_config("space-on-tk-libpath", ! is_win32?)
# enable Tcl/Tk stubs?
=begin
-if TclConfig_Info['TCL_STUB_LIB_SPEC'] && TkConfig_Info['TK_STUB_LIB_SPEC'] &&
+if TclConfig_Info['TCL_STUB_LIB_SPEC'] && TkConfig_Info['TK_STUB_LIB_SPEC'] &&
!TclConfig_Info['TCL_STUB_LIB_SPEC'].strip.empty? &&
!TkConfig_Info['TK_STUB_LIB_SPEC'].strip.empty?
stubs = true
@@ -1562,7 +1562,7 @@ use_X = search_X_libraries
if (TkLib_Config["tcltk-framework"] ||
( find_tcltk_header(tclver, tkver) &&
- find_tcltk_library(tcllib, tklib, stubs, tclver, tkver,
+ find_tcltk_library(tcllib, tklib, stubs, tclver, tkver,
tcl_ldir_list, tk_ldir_list) ) ) &&
(stubs || pthread_check())
# create Makefile
diff --git a/ext/tk/lib/multi-tk.rb b/ext/tk/lib/multi-tk.rb
index efeaf9830a..b125c6e18e 100644
--- a/ext/tk/lib/multi-tk.rb
+++ b/ext/tk/lib/multi-tk.rb
@@ -774,7 +774,7 @@ class MultiTkIp
ensure
# interp must be deleted before the thread for interp is dead.
- # If not, raise Tcl_Panic on Tcl_AsyncDelete because async handler
+ # If not, raise Tcl_Panic on Tcl_AsyncDelete because async handler
# deleted by the wrong thread.
interp.delete
end
@@ -1933,7 +1933,7 @@ class MultiTkIp
end
=end
def cb_eval(cmd, *args)
- self.eval_callback(*args,
+ self.eval_callback(*args,
&_proc_on_safelevel{|*params|
TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *params))
})
@@ -2121,7 +2121,7 @@ class MultiTkIp
end
err
}
- $SAFE=safe if $SAFE < safe;
+ $SAFE=safe if $SAFE < safe;
begin
yield(*args)
rescue Exception => e
@@ -2300,7 +2300,7 @@ end
current[:callback_ip] = backup_ip
end
else
- eval_proc_core(true,
+ eval_proc_core(true,
proc{|safe, *params|
Thread.new{cmd.call(safe, *params)}.value
},
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index f00afe9ea0..0fd8cfdb20 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -1306,7 +1306,7 @@ EOS
ensure
# interp must be deleted before the thread for interp is dead.
- # If not, raise Tcl_Panic on Tcl_AsyncDelete because async handler
+ # If not, raise Tcl_Panic on Tcl_AsyncDelete because async handler
# deleted by the wrong thread.
interp.delete
end
@@ -1339,7 +1339,7 @@ EOS
INTERP.instance_eval{
# @tk_cmd_tbl = TkUtil.untrust({})
- @tk_cmd_tbl =
+ @tk_cmd_tbl =
TkUtil.untrust(Hash.new{|hash, key|
fail IndexError, "unknown command ID '#{key}'"
})
diff --git a/ext/tk/lib/tk/autoload.rb b/ext/tk/lib/tk/autoload.rb
index 2ebee9ea24..f6ca261da9 100644
--- a/ext/tk/lib/tk/autoload.rb
+++ b/ext/tk/lib/tk/autoload.rb
@@ -538,8 +538,8 @@ class << Tk
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj
else # NOT topalias_defined?(sym)
- # Nobody controls ALIAS[sym].
- # At leaset, current widget set doesn't control ALIAS[sym].
+ # Nobody controls ALIAS[sym].
+ # At leaset, current widget set doesn't control ALIAS[sym].
# Keep Object::sym (even if it is not defined)
# Keep OWNER[sym].
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj
@@ -552,7 +552,7 @@ class << Tk
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj
replace_topalias(sym, obj)
replace_topobj(sym, obj)
-
+
when nil
# New definition for sym
@TOPLEVEL_ALIAS_OWNER[sym] = target
@@ -566,7 +566,7 @@ class << Tk
# Keep ALIAS[sym].
# Keep OWNER[sym].
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj
-
+
end
end
@@ -583,7 +583,7 @@ class << Tk
def __set_loaded_toplevel_aliases__(autopath, target, obj, *symbols)
# autopath is an autoload file
- # Currently, this method doesn't support that autoload loads
+ # Currently, this method doesn't support that autoload loads
# different toplevels between <basename>.rb and <basename>.so extension.
shortpath = (autopath =~ /^(.*)(.rb|.so)$/)? $1: autopath
target = target.to_sym
diff --git a/ext/tk/lib/tk/fontchooser.rb b/ext/tk/lib/tk/fontchooser.rb
index 092ffc04bf..694c58a607 100644
--- a/ext/tk/lib/tk/fontchooser.rb
+++ b/ext/tk/lib/tk/fontchooser.rb
@@ -86,7 +86,7 @@ class << TkFont::Chooser
def configure(option, value=None)
if option.kind_of? Hash
- tk_call('tk', 'fontchooser', 'configure',
+ tk_call('tk', 'fontchooser', 'configure',
*hash_kv(_symbolkey2str(option)))
else
opt = option.to_s
@@ -141,8 +141,8 @@ class << TkFont::Chooser
def set_for(target, title="Font")
if target.kind_of? TkFont
configs = {
- :font=>target.actual_hash,
- :command=>proc{|fnt, *args|
+ :font=>target.actual_hash,
+ :command=>proc{|fnt, *args|
target.configure(TkFont.actual_hash(fnt))
}
}
@@ -152,14 +152,14 @@ class << TkFont::Chooser
fnt = fnt.actual_hash if fnt.kind_of?(TkFont)
configs = {
:font => fnt,
- :command=>proc{|fnt, *args|
+ :command=>proc{|fnt, *args|
target[:font] = TkFont.actual_hash(fnt)
}
}
else
configs = {
- :font=>target.cget_tkstring(:font),
- :command=>proc{|fnt, *args|
+ :font=>target.cget_tkstring(:font),
+ :command=>proc{|fnt, *args|
target.font = TkFont.actual_hash_displayof(fnt, target)
}
}
diff --git a/ext/tk/lib/tk/menuspec.rb b/ext/tk/lib/tk/menuspec.rb
index 9521a157d9..cb3597eec9 100644
--- a/ext/tk/lib/tk/menuspec.rb
+++ b/ext/tk/lib/tk/menuspec.rb
@@ -27,7 +27,7 @@
#
# A menu_info is an array of menu entries:
# [ entry_info, entry_info, ... ]
-#
+#
#
# underline, accelerator, and configs are optional pearameters.
# Hashes are OK instead of Arrays. Then the entry type ('command',
diff --git a/ext/tk/lib/tk/ttk_selector.rb b/ext/tk/lib/tk/ttk_selector.rb
index 522249e6a9..cc9e9928cb 100644
--- a/ext/tk/lib/tk/ttk_selector.rb
+++ b/ext/tk/lib/tk/ttk_selector.rb
@@ -62,7 +62,7 @@ module Tk
major, minor, type, patchlevel = TclTkLib.get_version
# ttk::spinbox is supported on Tcl/Tk8.6b1 or later
- if ([major,minor,type,patchlevel] <=>
+ if ([major,minor,type,patchlevel] <=>
[8,6,TclTkLib::RELEASE_TYPE::BETA,1]) >= 0
@TOPLEVEL_ALIAS_TABLE[:Ttk].update(
:TkSpinbox => 'tkextlib/tile/tspinbox'
diff --git a/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb b/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb
index 0bd59511c1..ba87cd3aae 100644
--- a/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb
+++ b/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb
@@ -3,7 +3,7 @@
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
#
# * Part of tcllib extension
-# *
+# *
#
require 'tk'
diff --git a/ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb b/ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb
index e2a5061112..f4ffb48ece 100644
--- a/ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb
+++ b/ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb
@@ -3,7 +3,7 @@
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
#
# * Part of tcllib extension
-# *
+# *
#
require 'tk'
diff --git a/ext/tk/lib/tkextlib/tcllib/chatwidget.rb b/ext/tk/lib/tkextlib/tcllib/chatwidget.rb
index 860b9e899b..ddb0340c31 100644
--- a/ext/tk/lib/tkextlib/tcllib/chatwidget.rb
+++ b/ext/tk/lib/tkextlib/tcllib/chatwidget.rb
@@ -3,7 +3,7 @@
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
#
# * Part of tcllib extension
-# * chatwidget - Provides a multi-paned view suitable for display of
+# * chatwidget - Provides a multi-paned view suitable for display of
# chat room or irc channel information
#
@@ -92,7 +92,7 @@ class Tk::Tcllib::ChatWidget
def hook_add(type, *args, &blk) # args -> [prior, cmd], [prior], [cmd]
#type -> 'message', 'post', 'names_group', 'names_nick', 'chatstate', 'url'
-
+
if prior = args.shift
if !prior.kind_of?(Numeric)
cmd = prior
diff --git a/ext/tk/lib/tkextlib/tcllib/ip_entry.rb b/ext/tk/lib/tkextlib/tcllib/ip_entry.rb
index e5e0f8d42d..4878cc3c23 100644
--- a/ext/tk/lib/tkextlib/tcllib/ip_entry.rb
+++ b/ext/tk/lib/tkextlib/tcllib/ip_entry.rb
@@ -70,6 +70,6 @@ class Tk::Tcllib::IP_Entry
end
end
-class Tk::Tcllib::IP_Entry6 < Tk::Tcllib::IP_Entry
+class Tk::Tcllib::IP_Entry6 < Tk::Tcllib::IP_Entry
TkCommandNames = ['::ipentry::ipentry6'.freeze].freeze
end
diff --git a/ext/tk/lib/tkextlib/tcllib/khim.rb b/ext/tk/lib/tkextlib/tcllib/khim.rb
index 00acff91d9..5dc2130b35 100644
--- a/ext/tk/lib/tkextlib/tcllib/khim.rb
+++ b/ext/tk/lib/tkextlib/tcllib/khim.rb
@@ -43,11 +43,11 @@ class Tk::Tcllib::KHIM
def self.set_config(*args)
if args.length == 1
- # cmd_string generated by
+ # cmd_string generated by
#Tk.ip_eval_without_enc(cmd_string)
Tk.ip_eval(cmd_string)
else
- # args for setConfig command
+ # args for setConfig command
#Tk.tk_call_without_enc('::khim::setConfig', *args)
Tk.tk_call('::khim::setConfig', *args)
end
diff --git a/ext/tk/lib/tkextlib/tcllib/plotchart.rb b/ext/tk/lib/tkextlib/tcllib/plotchart.rb
index 3c944bb266..2f3d79d427 100644
--- a/ext/tk/lib/tkextlib/tcllib/plotchart.rb
+++ b/ext/tk/lib/tkextlib/tcllib/plotchart.rb
@@ -221,7 +221,7 @@ module Tk::Tcllib::Plotchart
end
def legend(series, text)
- tk_call_without_enc(@chart, 'legend',
+ tk_call_without_enc(@chart, 'legend',
_get_eval_enc_str(series), _get_eval_enc_str(text))
self
end
@@ -238,7 +238,7 @@ module Tk::Tcllib::Plotchart
text, dir = args
- tk_call_without_enc(@chart, 'balloon', x, y,
+ tk_call_without_enc(@chart, 'balloon', x, y,
_get_eval_enc_str(text), dir)
self
end
@@ -263,7 +263,7 @@ module Tk::Tcllib::Plotchart
text, dir = args
- tk_call_without_enc(@chart, 'plaintext', x, y,
+ tk_call_without_enc(@chart, 'plaintext', x, y,
_get_eval_enc_str(text), dir)
self
end
@@ -485,7 +485,7 @@ module Tk::Tcllib::Plotchart
end
def dot(series, xcrd, ycrd, value)
- tk_call_without_enc(@chart, 'dot', _get_eval_enc_str(series),
+ tk_call_without_enc(@chart, 'dot', _get_eval_enc_str(series),
xcrd, ycrd, value)
self
end
@@ -804,7 +804,7 @@ module Tk::Tcllib::Plotchart
private :_create_chart
def plot(label, yvalue, color)
- tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(label),
+ tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(label),
_get_eval_enc_str(yvalue), color)
self
end
@@ -1262,8 +1262,8 @@ module Tk::Tcllib::Plotchart
# time_begin := String of time format (e.g. "1 january 2004")
# time_end := String of time format (e.g. "1 january 2004")
# args := Expected/maximum number of items
- # ( This determines the vertical spacing. ),
- # Expected/maximum width of items,
+ # ( This determines the vertical spacing. ),
+ # Expected/maximum width of items,
# Option Hash ( { key=>value, ... } )
if args[0].kind_of?(String)
@time_begin = args.shift
diff --git a/ext/tk/lib/tkextlib/tcllib/tablelist.rb b/ext/tk/lib/tkextlib/tcllib/tablelist.rb
index b40f7a5b8b..bf5ab6620a 100644
--- a/ext/tk/lib/tkextlib/tcllib/tablelist.rb
+++ b/ext/tk/lib/tkextlib/tcllib/tablelist.rb
@@ -10,7 +10,7 @@ require 'tkextlib/tcllib.rb'
# check Tile extension :: If already loaded, use tablelist_tile.
unless defined? Tk::Tcllib::Tablelist_usingTile
- Tk::Tcllib::Tablelist_usingTile =
+ Tk::Tcllib::Tablelist_usingTile =
TkPackage.provide('tile') || TkPackage.provide('Ttk')
end
diff --git a/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb b/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb
index 850e75d845..2a5c415cc7 100644
--- a/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb
+++ b/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb
@@ -419,7 +419,7 @@ class Tk::Tcllib::Tablelist
columnwidth(idx, 'total')
end
- def configcelllist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
+ def configcelllist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
ary = []
lst.slice(3){|idx, opt, val|
ary << _to_idx(idx) << "-#{opt}" << val
@@ -439,7 +439,7 @@ class Tk::Tcllib::Tablelist
end
alias config_cells configcells
- def configcolumnlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
+ def configcolumnlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
ary = []
lst.slice(3){|idx, opt, val|
ary << _to_idx(idx) << "-#{opt}" << val
@@ -459,7 +459,7 @@ class Tk::Tcllib::Tablelist
end
alias config_columns configcolumns
- def configrowlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
+ def configrowlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
ary = []
lst.slice(3){|idx, opt, val|
ary << _to_idx(idx) << "-#{opt}" << val
@@ -841,11 +841,11 @@ class Tk::Tcllib::Tablelist
# default of 'labelcommand' option
- DEFAULT_labelcommand_value =
+ DEFAULT_labelcommand_value =
DEFAULT_sortByColumn_cmd = '::tablelist::sortByColumn'
# default of 'labelcommand2' option
- DEFAULT_labelcommand2_value =
+ DEFAULT_labelcommand2_value =
DEFAULT_addToSortColumns_cmd = '::tablelist::addToSortColumns'
def sortByColumn_with_event_generate(idx)
@@ -1053,7 +1053,7 @@ class << Tk::Tcllib::Tablelist
else
gmt = None
end
- Tk.tk_call('::tablelist::addDateTimeMentry',
+ Tk.tk_call('::tablelist::addDateTimeMentry',
format, date_sep, time_sep, gmt, name)
end
diff --git a/ext/tk/lib/tkextlib/tile/sizegrip.rb b/ext/tk/lib/tkextlib/tile/sizegrip.rb
index d7da0a4075..9947e0d870 100644
--- a/ext/tk/lib/tkextlib/tile/sizegrip.rb
+++ b/ext/tk/lib/tkextlib/tile/sizegrip.rb
@@ -28,5 +28,5 @@ end
#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Sizegrip,
# :TkSizegrip, :TkSizeGrip)
Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/sizegrip.rb',
- :Ttk, Tk::Tile::Sizegrip,
+ :Ttk, Tk::Tile::Sizegrip,
:TkSizegrip, :TkSizeGrip)
diff --git a/ext/tk/lib/tkextlib/tile/style.rb b/ext/tk/lib/tkextlib/tile/style.rb
index f38deda503..108d81f88b 100644
--- a/ext/tk/lib/tkextlib/tile/style.rb
+++ b/ext/tk/lib/tkextlib/tile/style.rb
@@ -295,7 +295,7 @@ class << Tk::Tile::Style
fail ArgumentError, "too many arguments" unless args.empty?
# define a Microsoft Visual Styles element
- tk_call(TkCommandNames[0], 'element', 'create', name, 'vsapi',
+ tk_call(TkCommandNames[0], 'element', 'create', name, 'vsapi',
class_name, part_id, state_map, opts)
end
diff --git a/ext/tk/sample/editable_listbox.rb b/ext/tk/sample/editable_listbox.rb
index 7a9ad4450b..890aec032e 100644
--- a/ext/tk/sample/editable_listbox.rb
+++ b/ext/tk/sample/editable_listbox.rb
@@ -27,7 +27,7 @@ class Tk::RbWidget::Editable_Listbox < TkListbox
if idx = @ebox.pos
see(idx) if bbox(idx).empty?
@ebox.focus(true)
- end
+ end
}
}
diff --git a/ext/tk/sample/menubar3.rb b/ext/tk/sample/menubar3.rb
index 129cfd779b..4f42f81c88 100644
--- a/ext/tk/sample/menubar3.rb
+++ b/ext/tk/sample/menubar3.rb
@@ -58,7 +58,7 @@ layout_proc = proc{|parent, mbtn|
=end
menubar = TkMenubar.new(nil, menu_spec,
- 'layout_proc'=>layout_proc,
+ 'layout_proc'=>layout_proc,
'tearoff'=>false,
'foreground'=>'grey40',
'activeforeground'=>'red',
diff --git a/ext/tk/sample/safe-tk.rb b/ext/tk/sample/safe-tk.rb
index 2aeae235df..38131c0155 100644
--- a/ext/tk/sample/safe-tk.rb
+++ b/ext/tk/sample/safe-tk.rb
@@ -87,7 +87,7 @@ if false && Object.const_defined?(:RubyVM) && ::RubyVM.class == Class
Thread.new(l, &y).value
}).pack(:fill=>:x, :padx=>5)
else
- # KNOWN BUG::
+ # KNOWN BUG::
# Current multi-tk.rb cannot support long term threads on callbacks.
# Such a thread freezes the Ruby/Tk process.
end
diff --git a/ext/tk/sample/scrollframe.rb b/ext/tk/sample/scrollframe.rb
index 6a9381d465..e340e1da3c 100644
--- a/ext/tk/sample/scrollframe.rb
+++ b/ext/tk/sample/scrollframe.rb
@@ -209,7 +209,7 @@ end
# test
if __FILE__ == $0
- f = Tk::RbWidget::ScrollFrame.new(:scrollbarwidth=>10,
+ f = Tk::RbWidget::ScrollFrame.new(:scrollbarwidth=>10,
:width=>300, :height=>200)
f.pack(:expand=>true, :fill=>:both)
@@ -234,13 +234,13 @@ if __FILE__ == $0
# remove a vertical scrollbar, and then the scrollframe is not scrollable.
Tk.after(6000){ f.vscroll(false) }
- # add a vertical scrollbar, and make the scrollframe scrollable.
+ # add a vertical scrollbar, and make the scrollframe scrollable.
Tk.after(9000){ f.vscroll(true) }
# remove a horizontal scrollbar, and then the scrollframe is not scrollable.
Tk.after(12000){ f.hscroll(false) }
- # add a horizontal scrollbar, and make the scrollframe scrollable.
+ # add a horizontal scrollbar, and make the scrollframe scrollable.
Tk.after(15000){ f.hscroll(true) }
Tk.mainloop
diff --git a/ext/tk/sample/tkalignbox.rb b/ext/tk/sample/tkalignbox.rb
index fb1b58f458..f3d083c33d 100644
--- a/ext/tk/sample/tkalignbox.rb
+++ b/ext/tk/sample/tkalignbox.rb
@@ -201,20 +201,20 @@ if __FILE__ == $0
TkButton.new(f, :text=>'aaa'),
TkButton.new(f, :text=>'aaaa'))
- f = Tk::RbWidget::VBox.new(:borderwidth=>5,
+ f = Tk::RbWidget::VBox.new(:borderwidth=>5,
:relief=>'groove').pack(:fill=>:y, :expand=>true)
f.add(TkButton.new(f, :text=>'a'),
TkButton.new(f, :text=>'aa', :font=>'Helvetica 30'),
TkButton.new(f, :text=>'aaa'),
TkButton.new(f, :text=>'aaaa'))
- f = Tk::RbWidget::HRBox.new(:borderwidth=>3,
+ f = Tk::RbWidget::HRBox.new(:borderwidth=>3,
:relief=>'raised').pack(:fill=>:x)
f.add(TkButton.new(f, :text=>'a'),
TkButton.new(f, :text=>'aa'),
TkButton.new(f, :text=>'aaa'))
- f = Tk::RbWidget::VBBox.new(:borderwidth=>3,
+ f = Tk::RbWidget::VBBox.new(:borderwidth=>3,
:relief=>'ridge').pack(:fill=>:x)
f.propagate = false
f.height 100
diff --git a/ext/tk/sample/tkballoonhelp.rb b/ext/tk/sample/tkballoonhelp.rb
index a9c00d230d..2daa522601 100644
--- a/ext/tk/sample/tkballoonhelp.rb
+++ b/ext/tk/sample/tkballoonhelp.rb
@@ -64,8 +64,8 @@ class Tk::RbWidget::BalloonHelp<TkLabel
_balloon_binding(@interval)
# @label = TkLabel.new(@frame, 'background'=>'bisque').pack
- @label = TkLabel.new(@frame,
- 'foreground'=>DEFAULT_FOREGROUND,
+ @label = TkLabel.new(@frame,
+ 'foreground'=>DEFAULT_FOREGROUND,
'background'=>DEFAULT_BACKGROUND).pack
@label.configure(_symbolkey2str(keys)) unless keys.empty?
@path = @label
@@ -147,7 +147,7 @@ if __FILE__ == $0
}
TkButton.new('text'=>'This button has another balloon help') {|b|
pack('fill'=>'x')
- Tk::RbWidget::BalloonHelp.new(b,
+ Tk::RbWidget::BalloonHelp.new(b,
'text'=>"CONFIGURED MESSAGE\nchange colors, and so on",
'interval'=>200, 'font'=>'courier',
'background'=>'gray', 'foreground'=>'red')
diff --git a/ext/tk/sample/tkcombobox.rb b/ext/tk/sample/tkcombobox.rb
index 59db565f06..c38bde10d4 100644
--- a/ext/tk/sample/tkcombobox.rb
+++ b/ext/tk/sample/tkcombobox.rb
@@ -370,7 +370,7 @@ EOD
startwait = keys.delete('startwait'){300}
interval = keys.delete('interval'){150}
- @lst = Tk::RbWidget::AutoScrollListbox.new(@top, :scrollbar=>true,
+ @lst = Tk::RbWidget::AutoScrollListbox.new(@top, :scrollbar=>true,
:startwait=>startwait,
:interval=>interval)
@lst.pack(:fill=>:both, :expand=>true)
@@ -464,7 +464,7 @@ if __FILE__ == $0
# e0.values(%w(aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss tt uu))
v = TkVariable.new
- e = Tk::RbWidget::Combobox.new(:height=>7, :scrollbar=>true,
+ e = Tk::RbWidget::Combobox.new(:height=>7, :scrollbar=>true,
:textvariable=>v,
:arrowrelief=>:flat, :arrowborderwidth=>0,
:startwait=>400, :interval=>200).pack
@@ -480,9 +480,9 @@ if __FILE__ == $0
TkFrame.new(:relief=>:raised, :borderwidth=>2,
:height=>3).pack(:fill=>:x, :expand=>true, :padx=>5, :pady=>3)
- l = Tk::RbWidget::AutoScrollListbox.new(nil, :relief=>:groove,
- :borderwidth=>4,:height=>7,
- :width=>20).pack(:fill=>:both,
+ l = Tk::RbWidget::AutoScrollListbox.new(nil, :relief=>:groove,
+ :borderwidth=>4,:height=>7,
+ :width=>20).pack(:fill=>:both,
:expand=>true)
(0..20).each{|i| l.insert('end', "line #{i}")}
diff --git a/ext/tk/stubs.c b/ext/tk/stubs.c
index 4b02fdd728..dd475c3455 100644
--- a/ext/tk/stubs.c
+++ b/ext/tk/stubs.c
@@ -334,7 +334,7 @@ ruby_tk_stubs_init(tcl_ip)
FIX ME : dirty hack for Mac OS X frameworks.
With stubs, fails to find Resource/Script directory of Tk.framework.
So, teach it to a Tcl interpreter by an environment variable.
- e.g. when $tcl_library ==
+ e.g. when $tcl_library ==
/Library/Frameworks/Tcl.framwwork/8.5/Resources/Scripts
==> /Library/Frameworks/Tk.framwwork/8.5/Resources/Scripts
*/
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index 5135dfa8db..aecd90302c 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -950,7 +950,7 @@ Tcl_AppInitProc Dde_Init, Dde_SafeInit, Registry_Init;
static char *rubytk_kitpath = NULL;
-static char rubytkkit_preInitCmd[] =
+static char rubytkkit_preInitCmd[] =
"proc tclKitPreInit {} {\n"
"rename tclKitPreInit {}\n"
"load {} rubytk_kitpath\n"
@@ -1009,7 +1009,7 @@ static char rubytkkit_preInitCmd[] =
;
#if 0
-/* Not use this script.
+/* Not use this script.
It's a memo to support an initScript for Tcl interpreters in the future. */
static const char initScript[] =
"if {[file isfile [file join $::tcl::kitpath main.tcl]]} {\n"
@@ -1179,8 +1179,8 @@ static int
call_tclkit_init_script(Tcl_Interp *interp)
{
#if 0
- /* Currently, do nothing in this function.
- It's a memo (quoted from kitInit.c of Tclkit)
+ /* Currently, do nothing in this function.
+ It's a memo (quoted from kitInit.c of Tclkit)
to support an initScript for Tcl interpreters in the future. */
if (Tcl_EvalEx(interp, initScript, -1, TCL_EVAL_GLOBAL) == TCL_OK) {
const char *encoding = NULL;
@@ -1247,7 +1247,7 @@ setup_rubytkkit()
/* rbtk_win32_SetHINSTANCE("tcltklib.so"); */
{
volatile VALUE basename;
- basename = rb_funcall(rb_cFile, rb_intern("basename"), 1,
+ basename = rb_funcall(rb_cFile, rb_intern("basename"), 1,
rb_str_new2(rb_sourcefile()));
rbtk_win32_SetHINSTANCE(RSTRING_PTR(basename));
}