=== modified file 'data/empathy.schemas.in'
--- data/empathy.schemas.in	2010-03-12 16:47:09 +0000
+++ data/empathy.schemas.in	2010-03-22 15:17:15 +0000
@@ -522,6 +522,20 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/empathy/autoaway</key>
+      <applyto>/apps/empathy/autoaway</applyto>
+      <owner>empathy</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+        <short>Empathy should auto-away when idle</short>
+        <long>
+        Whether Empathy should go into away mode automatically if user is idle.
+        </long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/empathy/import_asked</key>
       <applyto>/apps/empathy/import_asked</applyto>
       <owner>empathy</owner>

=== modified file 'libempathy-gtk/empathy-conf.h'
--- libempathy-gtk/empathy-conf.h	2010-03-12 16:47:09 +0000
+++ libempathy-gtk/empathy-conf.h	2010-03-22 15:17:15 +0000
@@ -81,6 +81,7 @@
 #define EMPATHY_PREFS_HINTS_CLOSE_MAIN_WINDOW      EMPATHY_PREFS_PATH "/hints/close_main_window"
 #define EMPATHY_PREFS_USE_CONN                     EMPATHY_PREFS_PATH "/use_conn"
 #define EMPATHY_PREFS_AUTOCONNECT                  EMPATHY_PREFS_PATH "/autoconnect"
+#define EMPATHY_PREFS_AUTOAWAY                     EMPATHY_PREFS_PATH "/autoaway"
 #define EMPATHY_PREFS_IMPORT_ASKED                 EMPATHY_PREFS_PATH "/import_asked"
 #define EMPATHY_PREFS_BUTTERFLY_LOGS_MIGRATED      EMPATHY_PREFS_PATH "/butterfly_logs_migrated"
 #define EMPATHY_PREFS_FILE_TRANSFER_DEFAULT_FOLDER EMPATHY_PREFS_PATH "/file_transfer/default_folder"

=== modified file 'libempathy/empathy-idle.c'
--- libempathy/empathy-idle.c	2010-03-15 12:49:17 +0000
+++ libempathy/empathy-idle.c	2010-03-29 17:41:53 +0000
@@ -658,6 +658,18 @@
 	empathy_idle_do_set_presence (idle, state, status);
 }
 
+void
+empathy_idle_set_auto_away_cb (EmpathyConf *conf, 
+				const gchar *key, 
+				gpointer user_data)
+{
+	gboolean autoaway;
+	empathy_conf_get_bool (conf, key, &autoaway);
+
+	empathy_idle_set_auto_away(empathy_idle_dup_singleton (),
+				   autoaway);
+}
+
 gboolean
 empathy_idle_get_auto_away (EmpathyIdle *idle)
 {

=== modified file 'libempathy/empathy-idle.h'
--- libempathy/empathy-idle.h	2009-11-18 23:12:11 +0000
+++ libempathy/empathy-idle.h	2010-03-29 15:57:30 +0000
@@ -26,6 +26,8 @@
 
 #include <telepathy-glib/enums.h>
 
+#include <libempathy-gtk/empathy-conf.h>
+
 G_BEGIN_DECLS
 
 #define EMPATHY_TYPE_IDLE         (empathy_idle_get_type ())
@@ -60,6 +62,9 @@
 gboolean     empathy_idle_get_auto_away       (EmpathyIdle *idle);
 void         empathy_idle_set_auto_away       (EmpathyIdle *idle,
 					       gboolean     auto_away);
+void  empathy_idle_set_auto_away_cb	      (EmpathyConf *conf,
+						const gchar *key,
+						gpointer user_data);
 
 TpConnectionPresenceType empathy_idle_get_requested_presence (EmpathyIdle *idle,
 							      gchar **status,

=== modified file 'src/empathy-preferences.c'
--- src/empathy-preferences.c	2009-10-20 15:01:11 +0000
+++ src/empathy-preferences.c	2010-03-29 15:10:03 +0000
@@ -56,6 +56,7 @@
 	GtkWidget *combobox_chat_theme;
 	GtkWidget *checkbutton_separate_chat_windows;
 	GtkWidget *checkbutton_autoconnect;
+	GtkWidget *checkbutton_autoaway;
 
 	GtkWidget *checkbutton_sounds_enabled;
 	GtkWidget *checkbutton_sounds_disabled_away;
@@ -224,6 +225,10 @@
 					  preferences->checkbutton_autoconnect);
 
 	preferences_hookup_toggle_button (preferences,
+					  EMPATHY_PREFS_AUTOAWAY,
+					  preferences->checkbutton_autoaway);
+
+	preferences_hookup_toggle_button (preferences,
 					  EMPATHY_PREFS_LOCATION_PUBLISH,
 					  preferences->checkbutton_location_publish);
 
@@ -1140,6 +1145,7 @@
 		"combobox_chat_theme", &preferences->combobox_chat_theme,
 		"checkbutton_separate_chat_windows", &preferences->checkbutton_separate_chat_windows,
 		"checkbutton_autoconnect", &preferences->checkbutton_autoconnect,
+		"checkbutton_autoaway", &preferences->checkbutton_autoaway,
 		"checkbutton_notifications_enabled", &preferences->checkbutton_notifications_enabled,
 		"checkbutton_notifications_disabled_away", &preferences->checkbutton_notifications_disabled_away,
 		"checkbutton_notifications_focus", &preferences->checkbutton_notifications_focus,

=== modified file 'src/empathy-preferences.ui'
--- src/empathy-preferences.ui	2010-01-01 15:06:58 +0000
+++ src/empathy-preferences.ui	2010-03-22 15:17:15 +0000
@@ -131,6 +131,20 @@
                                 <property name="position">1</property>
                               </packing>
                             </child>
+                            <child>
+                              <object class="GtkCheckButton" id="checkbutton_autoaway">
+                                <property name="label" translatable="yes">Change status when idle</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
                           </object>
                         </child>
                       </object>

=== modified file 'src/empathy.c'
--- src/empathy.c	2010-03-24 11:24:29 +0000
+++ src/empathy.c	2010-03-30 05:52:07 +0000
@@ -572,7 +572,7 @@
   GError *error = NULL;
   UniqueApp *unique_app;
   gboolean chatroom_manager_ready;
-
+  gboolean autoaway = TRUE;
 #ifdef ENABLE_DEBUG
   TpDebugSender *debug_sender;
 #endif /* ENABLE_TPL */
@@ -641,7 +641,16 @@
 
   /* 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,
+			   NULL);
+
+  empathy_idle_set_auto_away (idle, autoaway);
 
   /* Setting up Connectivity */
   connectivity = empathy_connectivity_dup_singleton ();

