From f381a83786d233ca183f3d45f892c4f064a77a58 Mon Sep 17 00:00:00 2001 From: Alex Borisov Date: Sun, 22 Jan 2012 00:51:29 +0200 Subject: FIX xml Rule changing, change window style to Popup --- client/Proxifier.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'client/Proxifier.cpp') diff --git a/client/Proxifier.cpp b/client/Proxifier.cpp index 46e4339..a4c2d08 100644 --- a/client/Proxifier.cpp +++ b/client/Proxifier.cpp @@ -300,6 +300,9 @@ bool Proxifier::TurnProxyOn(Proxy& proxy) // the "Default" rule can't be disabled from Proxifier's UI // so we can skip this check here string action = "Chain"; + + Logger::Debug("Changing default rule action\n"); + if (!SetRuleAction(defaultRule, action, chainId)) { return false; @@ -1140,7 +1143,8 @@ bool Proxifier::AddRule(Rule& rule) { QString actionId; actionId.setNum(rule.actId); - QDomText portsTxt = configDom.createTextNode(actionId); + QDomText actId = configDom.createTextNode(actionId); + actionElem.appendChild(actId); } ruleElem.appendChild(actionElem); // update state to reflect all the changes @@ -1185,7 +1189,7 @@ bool Proxifier::SetRuleAction(string& name, string& action, int actId) Logger::Error("Invalid Proxifier configuration file!\n"); return false; } - QDomElement ruleListElem = root.firstChildElement("ChainList"); + QDomElement ruleListElem = root.firstChildElement("RuleList"); if (ruleListElem.isNull()) { return false; @@ -1209,7 +1213,8 @@ bool Proxifier::SetRuleAction(string& name, string& action, int actId) { QString actionId; actionId.setNum(actId); - QDomText portsTxt = configDom.createTextNode(actionId); + QDomText actId = configDom.createTextNode(actionId); + newActionElem.appendChild(actId); } ruleElem.appendChild(newActionElem); break; -- cgit v1.2.3