Jean-Marc Lasgouttes wrote:

>>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
> 
> Angus> Branches can define arbitrary new colours as their background
> Angus> colour. I believe that the same mechanism can also be used to
> Angus> add arbitrary character colours also.
> 
> Where is the code that adds the new colors?

ControlDocument::apply():

    // branches
    BranchList & branchlist = params().branchlist();
    BranchList::const_iterator it = branchlist.begin();
    BranchList::const_iterator const end = branchlist.end();
    for (; it != end; ++it) {
        string const & current_branch = it->getBranch();
        Branch const * branch = branchlist.find(current_branch);
        string x11hexname = branch->getColor();
        // check that we have a valid color!
        if (x11hexname.empty() || x11hexname[0] != '#')
            x11hexname = lcolor.getX11Name(LColor::background);
        // display the new color
        string const str = current_branch  + ' ' + x11hexname;
        lv_.dispatch(FuncRequest(LFUN_SET_COLOR, str));
    }

-- 
Angus

Reply via email to