examples/rfe_renderer.rb in rbcurse-0.1.1 vs examples/rfe_renderer.rb in rbcurse-0.1.2
- old
+ new
@@ -17,22 +17,28 @@
def repaint graphic, r=@row,c=@col, row_index=-1, value=@text, focussed=false, selected=false
@bgcolor = @orig_bgcolor
@color = @orig_color
@row_attr = @orig_attr
+ # XXX ouch, when we delete from list, must delete from here too.
value = @parent.entries[row_index]
if value[0,1]=="/"
path = value.dup
else
path = @parent.cur_dir()+"/"+value
end
+ begin
stat = File.stat(path)
if File.directory? path
@row_attr = Ncurses::A_BOLD
#@color = 'yellow'
end
value = format_string(value, path, stat)
super
+
+ rescue => err
+ $log.debug " rfe_renderer: #{err}"
+ end
end
GIGA_SIZE = 1073741824.0
MEGA_SIZE = 1048576.0
KILO_SIZE = 1024.0