From 75d932a03f092628d34b35577c0002c70854ba8b Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 28 May 2013 08:07:17 +0200 Subject: [PATCH] Set the global configuration value for offline mode --- src/plugins/profiles.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/plugins/profiles.c b/src/plugins/profiles.c index d745562..067f577 100644 --- a/src/plugins/profiles.c +++ b/src/plugins/profiles.c @@ -1,5 +1,5 @@ /* $Id$ */ -/* Copyright (c) 2011-2012 Pierre Pronchery */ +/* Copyright (c) 2011-2013 Pierre Pronchery */ /* This file is part of DeforaOS Desktop Phone */ /* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -447,6 +447,15 @@ static void _profiles_apply(Profiles * profiles, ProfileType type) profiles->profiles_cur = type; helper->config_set(helper->phone, "profiles", "default", profiles->profiles[profiles->profiles_cur].name); + switch(type) + { + case PROFILE_TYPE_OFFLINE: + helper->config_set(helper->phone, NULL, "online", "0"); + break; + default: + helper->config_set(helper->phone, NULL, "online", NULL); + break; + } }