wmiirc-rumai

git clone git://oldgit.suckless.org/wmiirc-rumai/
Log | Files | Refs | README | LICENSE

commit 71862b7011075fcc37fa3cfffbc1046be95f7136
parent 24b8bb04d4677f5a6ee02cbb97644576a1100ab7
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date:   Wed, 13 May 2009 23:40:23 -0700

only allocate a click handler if specified

Diffstat:
config.rb | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/config.rb b/config.rb @@ -314,10 +314,12 @@ def load_config config_file @status_button_by_file[file] = button # mouse click handler - @on_click_by_status_button[button] = eval( - "lambda {|mouse_button| #{defn['click']} }", - TOPLEVEL_BINDING, "#{config_file}:display:status:#{name}:click" - ) + if code = defn['click'] + @on_click_by_status_button[button] = eval( + "lambda {|mouse_button| #{code} }", TOPLEVEL_BINDING, + "#{config_file}:display:status:#{name}:click" + ) + end end end