Changeset 398


Ignore:
Timestamp:
Jun 27, 2007, 6:24:29 PM (13 years ago)
Author:
Peter Johansson
Message:

refs #200 using same grey-scale in blame output

Location:
trunk/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/File.cc

    r395 r398  
    2626#include "Alias.h"
    2727#include "Date.h"
     28#include "GnuplotFE.h"
    2829#include "html_utility.h"
    2930#include "HtmlStream.h"
     
    8182
    8283
    83   void File::print_blame(std::ofstream& os, const SVNlog& log) const
     84  void File::print_blame(std::ofstream& os) const
    8485  {
    8586    os << "<br><h3>Blame Information</h3>";
     
    9697    HtmlStream hs(os);
    9798    SVNblame blame(path_);
    98     assert(log.date().size());
    99     time_t last = Date(log.date().back()).seconds();
     99    assert(GnuplotFE::instance()->dates().size());
     100    time_t last = Date(GnuplotFE::instance()->dates().back()).seconds();
    100101    // color is calculated linearly on time, c = kt + m
    101102    // brightest color (for oldest rev in log) is set to 192.
    102     double k = 192.0/(Date(log.date()[0]).seconds()-last);
     103    double k = 192.0/(Date(GnuplotFE::instance()->dates()[0]).seconds()-last);
    103104    double m = -last*k;
    104105    while (blame.valid()) {
     
    261262    os << "</p>\n";
    262263
    263     print_blame(os, log);
     264    print_blame(os);
    264265
    265266    print_footer(os);
  • trunk/lib/File.h

    r395 r398  
    8585       @brief Print blame output
    8686    */
    87     void print_blame(std::ofstream& os, const SVNlog& log) const;
     87    void print_blame(std::ofstream& os) const;
    8888
    8989    void print_core(bool verbose=false) const;
  • trunk/lib/GnuplotFE.h

    r165 r398  
    5454
    5555    ///
    56     /// @return input format for date.
     56    /// @return dates.
    5757    ///
    58     // Peter, obsolete ?
    59     const std::string& date_input_format(void) { return date_input_format_; }
     58    const std::vector<std::string>& dates(void) const { return date_; }
    6059
    6160    ///
Note: See TracChangeset for help on using the changeset viewer.