diff options
author | Reid <reidyaro@gmail.com> | 2012-01-25 22:05:36 +0100 |
---|---|---|
committer | Reid <reidyaro@gmail.com> | 2012-01-25 22:05:36 +0100 |
commit | 8b612abb42853a22c1a9545e2c9280d154646543 (patch) | |
tree | f466167087c2b2de4b8aa9e6d1d1986f72f84147 /src/gui/theme.cpp | |
parent | a913dd41df61760de6ece552f941e002251ff54c (diff) | |
parent | d340b5a27a8f3b05d1764da9c114f5f59bd0cd46 (diff) | |
download | manaverse-8b612abb42853a22c1a9545e2c9280d154646543.tar.gz manaverse-8b612abb42853a22c1a9545e2c9280d154646543.tar.bz2 manaverse-8b612abb42853a22c1a9545e2c9280d154646543.tar.xz manaverse-8b612abb42853a22c1a9545e2c9280d154646543.zip |
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r-- | src/gui/theme.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index b3b28bffa..85fd215ac 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2009 Aethyra Development Team * Copyright (C) 2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011 The ManaPlus Developers + * Copyright (C) 2011-2012 The ManaPlus Developers * * This file is part of The ManaPlus Client. * @@ -315,9 +315,9 @@ Skin *Theme::readSkin(const std::string &filename) // filename = resman->mapPathToSkin(filename0); XML::Document doc(resolveThemePath(filename)); - xmlNodePtr rootNode = doc.rootNode(); + XmlNodePtr rootNode = doc.rootNode(); - if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "skinset")) + if (!rootNode || !xmlNameEqual(rootNode, "skinset")) return nullptr; const std::string skinSetImage = XML::getProperty(rootNode, "image", ""); @@ -339,7 +339,7 @@ Skin *Theme::readSkin(const std::string &filename) // iterate <widget>'s for_each_xml_child_node(widgetNode, rootNode) { - if (!xmlStrEqual(widgetNode->name, BAD_CAST "widget")) + if (!xmlNameEqual(widgetNode, "widget")) continue; const std::string widgetType = @@ -348,7 +348,7 @@ Skin *Theme::readSkin(const std::string &filename) { for_each_xml_child_node(partNode, widgetNode) { - if (xmlStrEqual(partNode->name, BAD_CAST "part")) + if (xmlNameEqual(partNode, "part")) { const std::string partType = XML::getProperty(partNode, "type", "unknown"); @@ -477,7 +477,7 @@ Skin *Theme::readSkin(const std::string &filename) "'%s'", partType.c_str()); } } - else if (xmlStrEqual(partNode->name, BAD_CAST "option")) + else if (xmlNameEqual(partNode, "option")) { const std::string name = XML::getProperty( partNode, "name", ""); @@ -818,9 +818,9 @@ void Theme::loadColors(std::string file) file += "/colors.xml"; XML::Document doc(resolveThemePath(file)); - xmlNodePtr root = doc.rootNode(); + XmlNodePtr root = doc.rootNode(); - if (!root || !xmlStrEqual(root->name, BAD_CAST "colors")) + if (!root || !xmlNameEqual(root, "colors")) { logger->log("Error loading colors file: %s", file.c_str()); return; @@ -835,7 +835,7 @@ void Theme::loadColors(std::string file) for_each_xml_child_node(node, root) { - if (xmlStrEqual(node->name, BAD_CAST "color")) + if (xmlNameEqual(node, "color")) { type = readColorType(XML::getProperty(node, "id", "")); if (type < 0) // invalid or no type given @@ -850,7 +850,7 @@ void Theme::loadColors(std::string file) mColors[type].set(type, color, grad, 10); } - else if (xmlStrEqual(node->name, BAD_CAST "progressbar")) + else if (xmlNameEqual(node, "progressbar")) { type = readProgressType(XML::getProperty(node, "id", "")); if (type < 0) // invalid or no type given |