Branch: Tag:

2000-07-24

2000-07-24 00:58:37 by Martin Nilsson <mani@lysator.liu.se>

Added a clear cache button.

Rev: server/modules/graphics/gbutton.pike:1.53

24:   // must also be aligned left or right.       - constant cvs_version = "$Id: gbutton.pike,v 1.52 2000/07/21 12:42:28 kuntri Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.53 2000/07/24 00:58:37 nilsson Exp $";   constant thread_safe = 1;      #include <module.h>
214:    button_cache = roxen.ImageCache("gbutton", TIMER(draw_button));   }    + string status() { +  array s=button_cache->status(); +  return sprintf("<b>Images in cache:</b> %d images<br />\n<b>Cache size:</b> %s", +  s[0]/2, Roxen.sizetostring(s[1])); + } +  + mapping(string:function) query_action_buttons() { +  return ([ "Clear cache":flush_cache ]); + } +  + void flush_cache() { +  button_cache->flush(); + } +    Image.Layer layer_slice( Image.Layer l, int from, int to )   {    return Image.Layer( ([