summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-10 21:06:33 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-10 21:06:33 +0300
commit5edddb1313ed0dc275e6ae70b8a1780ded3a590d (patch)
treefffa478013e8f3622c4e7f85eeb71609cb352322 /src/gui
parenta057817a0983b3a3190f6773101f788f2c6278ba (diff)
downloadmv-5edddb1313ed0dc275e6ae70b8a1780ded3a590d.tar.gz
mv-5edddb1313ed0dc275e6ae70b8a1780ded3a590d.tar.bz2
mv-5edddb1313ed0dc275e6ae70b8a1780ded3a590d.tar.xz
mv-5edddb1313ed0dc275e6ae70b8a1780ded3a590d.zip
Replace xmlStrEqual to xmlNameEqual.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/equipmentwindow.cpp6
-rw-r--r--src/gui/serverdialog.cpp8
-rw-r--r--src/gui/skilldialog.cpp6
-rw-r--r--src/gui/theme.cpp14
-rw-r--r--src/gui/updaterwindow.cpp4
5 files changed, 19 insertions, 19 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index 4bfc477a0..0dadca2dc 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -371,11 +371,11 @@ void EquipmentWindow::fillBoxes()
for_each_xml_child_node(node, root)
{
- if (xmlStrEqual(node->name, BAD_CAST "window"))
+ if (xmlNameEqual(node, "window"))
loadWindow(node);
- else if (xmlStrEqual(node->name, BAD_CAST "playerbox"))
+ else if (xmlNameEqual(node, "playerbox"))
loadPlayerBox(node);
- else if (xmlStrEqual(node->name, BAD_CAST "slot"))
+ else if (xmlNameEqual(node, "slot"))
loadSlot(node, mImageSet);
}
delete doc;
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index a4a477527..85b3bbf4e 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -630,7 +630,7 @@ void ServerDialog::loadServers(bool addNew)
XML::Document doc(mDir + "/serverlist.xml", false);
XmlNodePtr rootNode = doc.rootNode();
- if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "serverlist"))
+ if (!rootNode || !xmlNameEqual(rootNode, "serverlist"))
{
logger->log1("Error loading server list!");
return;
@@ -646,7 +646,7 @@ void ServerDialog::loadServers(bool addNew)
for_each_xml_child_node(serverNode, rootNode)
{
- if (!xmlStrEqual(serverNode->name, BAD_CAST "server"))
+ if (!xmlNameEqual(serverNode, "server"))
continue;
ServerInfo server;
@@ -681,7 +681,7 @@ void ServerDialog::loadServers(bool addNew)
for_each_xml_child_node(subNode, serverNode)
{
- if (xmlStrEqual(subNode->name, BAD_CAST "connection"))
+ if (xmlNameEqual(subNode, "connection"))
{
server.hostname = XML::getProperty(subNode, "hostname", "");
server.port = static_cast<short unsigned>(
@@ -693,7 +693,7 @@ void ServerDialog::loadServers(bool addNew)
server.port = defaultPortForServerType(server.type);
}
}
- else if (xmlStrEqual(subNode->name, BAD_CAST "description"))
+ else if (xmlNameEqual(subNode, "description"))
{
server.description = reinterpret_cast<const char*>(
subNode->xmlChildrenNode->content);
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 72f5a8ca1..4ee674325 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -370,7 +370,7 @@ void SkillDialog::loadSkills(const std::string &file)
SkillListBox *listbox;
SkillTab *tab;
- if (!root || !xmlStrEqual(root->name, BAD_CAST "skills"))
+ if (!root || !xmlNameEqual(root, "skills"))
{
logger->log("Error loading skills file: %s", file.c_str());
@@ -413,7 +413,7 @@ void SkillDialog::loadSkills(const std::string &file)
for_each_xml_child_node(set, root)
{
- if (xmlStrEqual(set->name, BAD_CAST "set"))
+ if (xmlNameEqual(set, "set"))
{
setCount++;
setName = XML::getProperty(set, "name",
@@ -425,7 +425,7 @@ void SkillDialog::loadSkills(const std::string &file)
for_each_xml_child_node(node, set)
{
- if (xmlStrEqual(node->name, BAD_CAST "skill"))
+ if (xmlNameEqual(node, "skill"))
{
int id = atoi(XML::getProperty(node, "id", "-1").c_str());
std::string name = XML::getProperty(node, "name",
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 2d3b0beea..85fd215ac 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -317,7 +317,7 @@ Skin *Theme::readSkin(const std::string &filename)
XML::Document doc(resolveThemePath(filename));
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", "");
@@ -820,7 +820,7 @@ void Theme::loadColors(std::string file)
XML::Document doc(resolveThemePath(file));
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
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp
index 5e8e51464..39dde65c3 100644
--- a/src/gui/updaterwindow.cpp
+++ b/src/gui/updaterwindow.cpp
@@ -69,7 +69,7 @@ std::vector<updateFile> loadXMLFile(const std::string &fileName)
XML::Document doc(fileName, false);
XmlNodePtr rootNode = doc.rootNode();
- if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "updates"))
+ if (!rootNode || !xmlNameEqual(rootNode, "updates"))
{
logger->log("Error loading update file: %s", fileName.c_str());
return files;
@@ -78,7 +78,7 @@ std::vector<updateFile> loadXMLFile(const std::string &fileName)
for_each_xml_child_node(fileNode, rootNode)
{
// Ignore all tags except for the "update" tags
- if (!xmlStrEqual(fileNode->name, BAD_CAST "update"))
+ if (!xmlNameEqual(fileNode, "update"))
continue;
updateFile file;