Roxen.git / server / base_server / mainconfig.pike

version» Context lines:

Roxen.git/server/base_server/mainconfig.pike:1:   inherit "config/builders"; - string cvs_version = "$Id: mainconfig.pike,v 1.82 1997/10/18 20:53:20 grubba Exp $"; + string cvs_version = "$Id: mainconfig.pike,v 1.83 1997/11/07 06:04:33 mirar Exp $";   //inherit "roxenlib"; -  + import Image; +    inherit "config/draw_things";      import Array;   import Stdio; -  +    string status_row(object node);   string display_tabular_header(object node);   object get_template(string t);      /* Work-around for Simulate.perror */   #define perror roxen_perror      #include <confignode.h>   #include <module.h>   
Roxen.git/server/base_server/mainconfig.pike:1040:   {    int i;    if(o = o->down)    do { i+=!o->folded; } while(o=o->next);    return i;   }         object module_font = get_font("base_server/config/font",0,0,0,"left",1.0,1.0);   object button_font = get_font("base_server/config/button_font",0,0,0,"left",1.0,1.0); + mapping(string:object) my_colortable = ([]);      mapping auto_image(string in, object id)   {    string key, value;    array trans = ({ (int)("0x"+dR),(int)("0x"+dG),(int)("0x"+dB) });    mapping r;    mixed e;    object i;       string img_key = "auto/"+replace(in,"/","_")+".gif"-" ";
Roxen.git/server/base_server/mainconfig.pike:1094:    break;       case "selected":    i=draw_selected_button(value,button_font);    break;       case "unselected":    i=draw_unselected_button(value,button_font);    break;    } -  if(i) -  { +  +  if (!i) return 0; +  +  object ct; +  +  if (!(ct=my_colortable[key])) +  ct=my_colortable[key]=colortable(i,256,4,4,4); + // colortable(4,4,8, + // ({0,0,0}),({255,255,0}),16, + // ({0,0,0}),({170,170,255}),48, + // )    object o = open("roxen-images/"+img_key,"wct"); -  e=i->togif(); +  e=GIF.encode(i,ct);    i=0;    if(o) { o->write(e); o=0; }   #ifdef DEBUG    else {perror("Cannot open file for "+in+"\n");}   #endif    return http_string_answer(e,"image/gif");   } -  return 0; - } +          string remove_font(string t, mapping m, string c)   {    return "<b>"+c+"</b>";   }         int nfolded(object o)   {