mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Fixing Streamer and NetworkSource dialog
This commit is contained in:
30
Settings.cpp
30
Settings.cpp
@@ -111,14 +111,14 @@ void Settings::Save()
|
||||
{
|
||||
XMLElement *connectionsNode = xmlDoc.NewElement( "Connections" );
|
||||
|
||||
map<int, std::string>::iterator iter;
|
||||
for (iter=application.instance_names.begin(); iter != application.instance_names.end(); iter++)
|
||||
{
|
||||
XMLElement *connection = xmlDoc.NewElement( "Instance" );
|
||||
connection->SetAttribute("name", iter->second.c_str());
|
||||
connection->SetAttribute("id", iter->first);
|
||||
connectionsNode->InsertEndChild(connection);
|
||||
}
|
||||
// map<int, std::string>::iterator iter;
|
||||
// for (iter=application.instance_names.begin(); iter != application.instance_names.end(); iter++)
|
||||
// {
|
||||
// XMLElement *connection = xmlDoc.NewElement( "Instance" );
|
||||
// connection->SetAttribute("name", iter->second.c_str());
|
||||
// connection->SetAttribute("id", iter->first);
|
||||
// connectionsNode->InsertEndChild(connection);
|
||||
// }
|
||||
pRoot->InsertEndChild(connectionsNode);
|
||||
}
|
||||
|
||||
@@ -346,13 +346,13 @@ void Settings::Load()
|
||||
XMLElement * pElement = pRoot->FirstChildElement("Connections");
|
||||
if (pElement)
|
||||
{
|
||||
XMLElement* connectionNode = pElement->FirstChildElement("Instance");
|
||||
for( ; connectionNode ; connectionNode=connectionNode->NextSiblingElement())
|
||||
{
|
||||
int id = 0;
|
||||
connectionNode->QueryIntAttribute("id", &id);
|
||||
application.instance_names[id] = connectionNode->Attribute("name");
|
||||
}
|
||||
// XMLElement* connectionNode = pElement->FirstChildElement("Instance");
|
||||
// for( ; connectionNode ; connectionNode=connectionNode->NextSiblingElement())
|
||||
// {
|
||||
// int id = 0;
|
||||
// connectionNode->QueryIntAttribute("id", &id);
|
||||
// application.instance_names[id] = connectionNode->Attribute("name");
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user