- Timestamp:
- Dec 13, 2009, 9:41:15 PM (13 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Configuration.cc
r978 r986 122 122 return str=="true" || str=="True" || str=="TRUE" || 123 123 str=="yes" || str=="Yes" || str=="YES"; 124 } 125 126 127 const std::string& Configuration::image_format(void) const 128 { 129 return image_format_; 124 130 } 125 131 … … 282 288 } 283 289 } 290 else if (section == "image") { 291 if (lhs == "format") { 292 if (rhs!="none" && rhs!="png" && rhs!="svg") { 293 throw Config_error(line, "unknown format: " + rhs); 294 } 295 image_format_ = rhs; 296 } 297 } 284 298 } 285 299 validate_dictionary(); … … 422 436 423 437 dictionary_ = VectorPair(1, std::make_pair("*.in", "$1")); 438 image_format_ = "png"; 424 439 } 425 440 … … 480 495 os << i->first << " = " << i->second.name() << "\n"; 481 496 } 497 498 os << "\n" 499 << "### Section for images\n" 500 << "[image]\n" 501 << "format = " << conf.image_format() << "\n"; 502 482 503 483 504 os << "\n" -
trunk/lib/Configuration.h
r978 r986 70 70 /// 71 71 const std::map<std::string, Alias>& copyright_alias(void) const; 72 73 /** 74 \return png, none, svg, or svgz 75 */ 76 const std::string& image_format(void) const; 72 77 73 78 /// … … 143 148 144 149 VectorPair dictionary_; 145 150 std::string image_format_; 146 151 std::string trac_root_; 147 152 };
Note: See TracChangeset
for help on using the changeset viewer.