mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Minor improvements in connection and IPC (multiple instances not fully
supported yet)
This commit is contained in:
31
Settings.cpp
31
Settings.cpp
@@ -107,6 +107,21 @@ void Settings::Save()
|
||||
SourceConfNode->SetAttribute("res", application.source.res);
|
||||
pRoot->InsertEndChild(SourceConfNode);
|
||||
|
||||
// bloc connections
|
||||
{
|
||||
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);
|
||||
}
|
||||
pRoot->InsertEndChild(connectionsNode);
|
||||
}
|
||||
|
||||
// bloc views
|
||||
{
|
||||
XMLElement *viewsNode = xmlDoc.NewElement( "Views" );
|
||||
@@ -326,6 +341,22 @@ void Settings::Load()
|
||||
|
||||
}
|
||||
|
||||
// bloc Connections
|
||||
{
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// bloc history of recent
|
||||
{
|
||||
XMLElement * pElement = pRoot->FirstChildElement("Recent");
|
||||
|
||||
Reference in New Issue
Block a user