[nemiver] Keep default conf values when gconf is down
- From: Dodji Seketeli <dodji src gnome org>
- To: svn-commits-list gnome org
- Subject: [nemiver] Keep default conf values when gconf is down
- Date: Thu, 16 Jul 2009 15:40:48 +0000 (UTC)
commit 395cce119686c077e7c3f3750ecccd9c3a82fae0
Author: Dodji Seketeli <dodji redhat com>
Date: Thu Jul 16 17:36:10 2009 +0200
Keep default conf values when gconf is down
* src/confmgr/nmv-gconf-mgr.cc (GConfMgr::get_key_value<overloads>):
Do not set the out parameter when gconf is down.
src/confmgr/nmv-gconf-mgr.cc | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/src/confmgr/nmv-gconf-mgr.cc b/src/confmgr/nmv-gconf-mgr.cc
index 8186dc6..eee2aa0 100644
--- a/src/confmgr/nmv-gconf-mgr.cc
+++ b/src/confmgr/nmv-gconf-mgr.cc
@@ -229,14 +229,15 @@ GConfMgr::get_key_value (const UString &a_key, bool &a_value)
THROW_IF_FAIL (m_gconf_client);
GError *err=NULL;
- a_value = gconf_client_get_bool (m_gconf_client,
- a_key.c_str (),
- &err);
+ bool value = gconf_client_get_bool (m_gconf_client,
+ a_key.c_str (),
+ &err);
GErrorSafePtr error (err);
if (error) {
LOG_ERROR (error->message);
return false;
}
+ a_value = value;
return true;
}
@@ -262,14 +263,15 @@ GConfMgr::get_key_value (const UString &a_key, int &a_value)
THROW_IF_FAIL (m_gconf_client);
GError *err=NULL;
- a_value = gconf_client_get_int (m_gconf_client,
- a_key.c_str (),
- &err);
+ int value = gconf_client_get_int (m_gconf_client,
+ a_key.c_str (),
+ &err);
GErrorSafePtr error (err);
if (error) {
LOG_ERROR (error->message);
return false;
}
+ a_value = value;
return true;
}
@@ -295,14 +297,15 @@ GConfMgr::get_key_value (const UString &a_key, double &a_value)
THROW_IF_FAIL (m_gconf_client);
GError *err=NULL;
- a_value = gconf_client_get_float (m_gconf_client,
- a_key.c_str (),
- &err);
+ double value = gconf_client_get_float (m_gconf_client,
+ a_key.c_str (),
+ &err);
GErrorSafePtr error (err);
if (error) {
LOG_ERROR (error->message);
return false;
}
+ a_value = value;
return true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]