]> git.0d.be Git - empathy.git/blobdiff - src/empathy.c
Merge branch 'undo-close-tab'
[empathy.git] / src / empathy.c
index d18e165b347803889105abe62a263a48410a6609..637778d4714e38a84adfbd966cc0828f191ce732 100644 (file)
@@ -241,24 +241,12 @@ migrate_config_to_xdg_dir (void)
   g_free (old_dir);
 }
 
-static void
-accounts_application_exited_cb (GPid pid,
-    gint status,
-    gpointer data)
-{
-  if (status)
-    {
-      g_warning ("accounts application exited with status %d: '%s'",
-          status, g_strerror (status));
-    }
-}
-
 static void
 show_accounts_ui (GdkScreen *screen,
     gboolean if_needed)
 {
   empathy_accounts_dialog_show_application (screen,
-      accounts_application_exited_cb, NULL, NULL, if_needed, start_hidden);
+      NULL, if_needed, start_hidden);
 }
 
 static UniqueResponse
@@ -562,6 +550,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[])
 {
@@ -586,10 +586,10 @@ 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 */
+#endif
 
   GOptionContext *optcontext;
   GOptionEntry options[] = {
@@ -655,7 +655,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 ();