Roxen.git / server / modules / graphics / gbutton.pike

version» Context lines:

Roxen.git/server/modules/graphics/gbutton.pike:18:   // icon-data -- inline icon data   // align -- left|center|right text alignment   // align-icon -- left|center-before|center-after|right icon alignment   // valign-icon -- above|middle|below icon vertical alignment   // >Button text</gbutton>   //   // Alignment restriction: when text alignment is either left or right, icons   // must also be aligned left or right.       - constant cvs_version = "$Id: gbutton.pike,v 1.63 2000/10/17 21:01:40 per Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.64 2000/10/17 22:15:55 mast Exp $";   constant thread_safe = 1;      #include <module.h>   inherit "module";      roxen.ImageCache button_cache;      constant module_type = MODULE_TAG;   constant module_name = "GButton";   constant module_doc =
Roxen.git/server/modules/graphics/gbutton.pike:298:    }    }    };       if( args->border_image )    set_image( roxen.load_layers(args->border_image, id) );       // otherwise load default images    if ( !frame )    { -  catch { -  set_image(Image.XCF.decode_layers(Stdio.read_file("roxen-images/gbutton.xcf"))); +  string data = Stdio.read_file("roxen-images/gbutton.xcf"); +  if (!data) +  error ("Failed to load default frame image " +  "(roxen-images/gbutton.xcf): " + strerror (errno())); +  mixed err = catch { +  set_image(Image.XCF.decode_layers(data));    };    if( !frame ) -  error("Failed to load default frame image (roxen-images/gbutton.xcf)." -  " Aborting\n"); +  if (err) { +  catch (err[0] = "Failed to decode default frame image " +  "(roxen-images/gbutton.xcf): " + err[0]); +  throw (err);    } -  +  else +  error("Failed to decode default frame image " +  "(roxen-images/gbutton.xcf).\n"); +  }          // Translate frame image to 0,0 (left layers are most likely to the    // left of the frame image)          int x0 = frame->xoffset();    int y0 = frame->yoffset();    if( x0 || y0 )    foreach( values( ll ), object l )