~ubuntu-branches/ubuntu/saucy/manaplus/saucy-proposed

« back to all changes in this revision

Viewing changes to src/gui/userpalette.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi, Andrei Karas, Patrick Matthäi
  • Date: 2013-06-10 10:53:26 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130610105326-c3xqk5ebcgy3jxmb
Tags: 1.3.6.9-1
[ Andrei Karas ]
* Add new files to copyright file.

[ Patrick Matthäi ]
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
std::string UserPalette::getConfigName(const std::string &typeName)
82
82
{
83
83
    std::string res = "Color" + typeName;
84
 
 
85
84
    size_t pos = 5;
86
85
    for (size_t i = 0; i < typeName.length(); i++)
87
86
    {
99
98
        pos ++;
100
99
    }
101
100
    res.erase(pos, res.length() - pos);
102
 
 
103
101
    return res;
104
102
}
105
103
 
252
250
 
253
251
    if (elem->grad != STATIC && grad == STATIC)
254
252
    {
255
 
        for (size_t i = 0; i < mGradVector.size(); i++)
 
253
        const size_t sz = mGradVector.size();
 
254
        for (size_t i = 0; i < sz; i++)
256
255
        {
257
256
            if (mGradVector[i] == elem)
258
257
            {
337
336
    snprintf(buffer, sizeof(buffer), "0x%06x", rgb);
338
337
    buffer[19] = 0;
339
338
 
340
 
    const std::string rgbString = config.getValue(configName,
341
 
                                                  std::string(buffer));
 
339
    const std::string rgbString = config.getValue(
 
340
        configName, std::string(buffer));
342
341
    unsigned int rgbValue = 0;
343
342
    if (rgbString.length() == 8 && rgbString[0] == '0' && rgbString[1] == 'x')
344
343
        rgbValue = atox(rgbString);