aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Kampka <chris@emerge-life.de>2010-03-30 20:23:49 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-30 20:23:49 +0800
commit597aeabb364bc04027209e0a37fae53a7d4208b8 (patch)
treeae1f57474e525f017bbc83e548cc3d0a9361f59c /src
parent28e12b663411f992d373bc3a96167b0146760889 (diff)
downloadgsoc2013-empathy-597aeabb364bc04027209e0a37fae53a7d4208b8.tar
gsoc2013-empathy-597aeabb364bc04027209e0a37fae53a7d4208b8.tar.gz
gsoc2013-empathy-597aeabb364bc04027209e0a37fae53a7d4208b8.tar.bz2
gsoc2013-empathy-597aeabb364bc04027209e0a37fae53a7d4208b8.tar.lz
gsoc2013-empathy-597aeabb364bc04027209e0a37fae53a7d4208b8.tar.xz
gsoc2013-empathy-597aeabb364bc04027209e0a37fae53a7d4208b8.tar.zst
gsoc2013-empathy-597aeabb364bc04027209e0a37fae53a7d4208b8.zip
add gconf key to disable auto-away (#613603)
Diffstat (limited to 'src')
-rw-r--r--src/empathy.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/empathy.c b/src/empathy.c
index 377feea30..8b2869add 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -549,6 +549,18 @@ chatroom_manager_ready_cb (EmpathyChatroomManager *chatroom_manager,
account_manager_chatroom_ready_cb, chatroom_manager);
}
+static void
+empathy_idle_set_auto_away_cb (EmpathyConf *conf,
+ const gchar *key,
+ gpointer user_data)
+{
+ gboolean autoaway;
+ EmpathyIdle *idle = user_data;
+
+ empathy_conf_get_bool (conf, key, &autoaway);
+ empathy_idle_set_auto_away (idle, autoaway);
+}
+
int
main (int argc, char *argv[])
{
@@ -572,7 +584,7 @@ main (int argc, char *argv[])
GError *error = NULL;
UniqueApp *unique_app;
gboolean chatroom_manager_ready;
-
+ gboolean autoaway = TRUE;
#ifdef ENABLE_DEBUG
TpDebugSender *debug_sender;
#endif /* ENABLE_TPL */
@@ -641,7 +653,16 @@ main (int argc, char *argv[])
/* Setting up Idle */
idle = empathy_idle_dup_singleton ();
- empathy_idle_set_auto_away (idle, TRUE);
+
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_AUTOAWAY, &autoaway);
+
+ empathy_conf_notify_add (empathy_conf_get (),
+ EMPATHY_PREFS_AUTOAWAY,
+ empathy_idle_set_auto_away_cb,
+ idle);
+
+ empathy_idle_set_auto_away (idle, autoaway);
/* Setting up Connectivity */
connectivity = empathy_connectivity_dup_singleton ();