From 84c268c427d146b8e8b7297e90ba6e4db152b759 Mon Sep 17 00:00:00 2001 From: "Suraj N. Kurapati" Date: Tue, 2 Mar 2010 15:27:44 -0800 Subject: [PATCH] allow omission of 'label' section in status bar applet definitions This solves the following error reported by Tom Kazimiers: E, [2010-01-03T23:09:33.778367 #4260] ERROR -- : undefined method `label' for #<#::Status:0x7f1aea1e4720> (NoMethodError) --- display/status.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/display/status.yaml b/display/status.yaml index f42cfab..7170ad6 100644 --- a/display/status.yaml +++ b/display/status.yaml @@ -44,10 +44,9 @@ script: CONFIG.origin(code, "display:status:#{name}:script") end - if code = definition['label'] - instance_eval "def label; #{code}; end", - CONFIG.origin(code, "display:status:#{name}:label") - end + code = definition['label'] + instance_eval "def label; #{code}; end", + CONFIG.origin(code, "display:status:#{name}:label") # buttons appear in ASCII order of their IXP file name # so prepend a number to get ordered status bar applets