diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-22 09:26:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-22 09:26:02 +0000 |
commit | 0d6d23b25db0e7d14969504eeba6ac31581a79a2 (patch) | |
tree | c5cb2eb1a1bbc6d00de4d6826e180b24f53330d2 /ext/tk/sample/demos-en/ixset2 | |
parent | 87dbea7bbf97746de91388bd63180faddf0ed6f5 (diff) | |
download | ruby-0d6d23b25db0e7d14969504eeba6ac31581a79a2.tar.gz |
* ext: remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/demos-en/ixset2')
-rw-r--r-- | ext/tk/sample/demos-en/ixset2 | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/ext/tk/sample/demos-en/ixset2 b/ext/tk/sample/demos-en/ixset2 index ce8472abe0..cb99c60793 100644 --- a/ext/tk/sample/demos-en/ixset2 +++ b/ext/tk/sample/demos-en/ixset2 @@ -134,8 +134,8 @@ class Xsettings def initialize(parent, text, length, range=[]) @frame = TkFrame.new(parent) TkLabel.new(@frame, 'text'=>text).pack('side'=>'left') - if range.size > 0 - @entry = TkSpinbox.new(@frame, 'width'=>length, 'relief'=>'sunken', + if range.size > 0 + @entry = TkSpinbox.new(@frame, 'width'=>length, 'relief'=>'sunken', 'from'=>range[0], 'to'=>range[1]) else @entry = TkEntry.new(@frame, 'width'=>length, 'relief'=>'sunken') @@ -164,16 +164,16 @@ class Xsettings # Buttons # btn_frame = TkFrame.new(@root) - buttons = [ - @btn_OK = TkButton.new(btn_frame, 'command'=>proc{win.ok}, + buttons = [ + @btn_OK = TkButton.new(btn_frame, 'command'=>proc{win.ok}, 'default'=>'active', 'text'=>'Ok'), - @btn_APPLY = TkButton.new(btn_frame, 'command'=>proc{win.writesettings}, - 'default'=>'normal', 'text'=>'Apply', + @btn_APPLY = TkButton.new(btn_frame, 'command'=>proc{win.writesettings}, + 'default'=>'normal', 'text'=>'Apply', 'state'=>'disabled'), - @btn_CANCEL = TkButton.new(btn_frame, 'command'=>proc{win.cancel}, - 'default'=>'normal', 'text'=>'Cancel', + @btn_CANCEL = TkButton.new(btn_frame, 'command'=>proc{win.cancel}, + 'default'=>'normal', 'text'=>'Cancel', 'state'=>'disabled'), - @btn_QUIT = TkButton.new(btn_frame, 'command'=>proc{win.quit}, + @btn_QUIT = TkButton.new(btn_frame, 'command'=>proc{win.quit}, 'default'=>'normal', 'text'=>'Quit') ] buttons.each{|b| b.pack('side'=>'left', 'expand'=>'yes', 'pady'=>5) } @@ -201,10 +201,10 @@ class Xsettings # # Bell settings # - bell = TkLabelframe.new(@root, 'text'=>'Bell Settings', + bell = TkLabelframe.new(@root, 'text'=>'Bell Settings', 'padx'=>'1.5m', 'pady'=>'1.5m') - @w_bellvol = TkScale.new(bell, 'from'=>0, 'to'=>100, 'length'=>200, - 'tickinterval'=>20, 'orient'=>'horizontal', + @w_bellvol = TkScale.new(bell, 'from'=>0, 'to'=>100, 'length'=>200, + 'tickinterval'=>20, 'orient'=>'horizontal', 'label'=>"Volume (%)") f = TkFrame.new(bell) @@ -218,13 +218,13 @@ class Xsettings # # Keyboard settings - # + # kbdonoff = nil kbdcli = nil - kbd = TkLabelframe.new(@root, 'text'=>'Keyboard Repeat Settings', + kbd = TkLabelframe.new(@root, 'text'=>'Keyboard Repeat Settings', 'padx'=>'1.5m', 'pady'=>'1.5m') f = TkFrame.new(kbd) - @w_kbdonoff = TkCheckButton.new(f, 'text'=>'On', 'relief'=>'flat', + @w_kbdonoff = TkCheckButton.new(f, 'text'=>'On', 'relief'=>'flat', 'onvalue'=>'on', 'offvalue'=>'off', 'variable'=>@w_kbdrep ) { def self.set(value) @@ -236,17 +236,17 @@ class Xsettings end pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x', 'padx'=>[0, '1m']) } - @w_kbdcli = TkScale.new(f, 'from'=>0, 'to'=>100, 'length'=>200, - 'tickinterval'=>20, 'orient'=>'horizontal', + @w_kbdcli = TkScale.new(f, 'from'=>0, 'to'=>100, 'length'=>200, + 'tickinterval'=>20, 'orient'=>'horizontal', 'label'=>'Click Volume (%)') - @w_kbdcli.pack('side'=>'left', 'expand'=>'yes', + @w_kbdcli.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x', 'padx'=>['1m', 0]) f.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'fill'=>'x') # # Mouse settings # - mouse = TkLabelframe.new(@root, 'text'=>'Mouse Settings', + mouse = TkLabelframe.new(@root, 'text'=>'Mouse Settings', 'padx'=>'1.5m', 'pady'=>'1.5m') f = TkFrame.new(mouse) @w_mouseacc = LabelEntry.new(f, 'Acceleration', 5) @@ -258,11 +258,11 @@ class Xsettings # # Screen Saver settings # - screen = TkLabelframe.new(@root, 'text'=>'Screen-saver Settings', + screen = TkLabelframe.new(@root, 'text'=>'Screen-saver Settings', 'padx'=>'1.5m', 'pady'=>'1.5m') - @w_screenblank = TkRadioButton.new(screen, 'text'=>'Blank', - 'relief'=>'flat', 'anchor'=>'w', - 'variable'=>@w_screenbla, + @w_screenblank = TkRadioButton.new(screen, 'text'=>'Blank', + 'relief'=>'flat', 'anchor'=>'w', + 'variable'=>@w_screenbla, 'value'=>'blank') { def self.set(value) if value == 'blank' @@ -273,9 +273,9 @@ class Xsettings end } - @w_screenpat = TkRadioButton.new(screen, 'text'=>'Pattern', - 'relief'=>'flat', 'anchor'=>'w', - 'variable'=>@w_screenbla, + @w_screenpat = TkRadioButton.new(screen, 'text'=>'Pattern', + 'relief'=>'flat', 'anchor'=>'w', + 'variable'=>@w_screenbla, 'value'=>'noblank') { def self.set(value) if value != 'blank' @@ -297,7 +297,7 @@ class Xsettings # Main window # param = { - 'side'=>'top', 'fill'=>'both', 'expand'=>'yes', + 'side'=>'top', 'fill'=>'both', 'expand'=>'yes', 'padx'=>'1m', 'pady'=>'1m' } btn_frame.pack('side'=>'top', 'fill'=>'both') |