commit 63335a97c46cb12cf700632ba78133535bd85296 parent 453b356a7427f23f381b9763108f171d6b42f785 Author: cfillion <cfillion@users.noreply.github.com> Date: Mon, 4 Jan 2016 12:07:52 -0500 apply and save configuration changes Diffstat:
M | src/manager.cpp | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/manager.cpp b/src/manager.cpp @@ -145,6 +145,18 @@ bool Manager::isRemoteEnabled(const Remote &remote) const void Manager::apply() { + RemoteList *list = m_reapack->config()->remotes(); + + for(auto it = m_enableOverrides.begin(); it != m_enableOverrides.end(); it++) { + const string &name = it->first; + const bool enable = it->second; + + Remote remote = list->get(name); + remote.setEnabled(enable); + list->add(remote); + } + + m_reapack->config()->write(); } void Manager::reset()