diff src/idle.c @ 11677:8004885fabbe

[gaim-migrate @ 13963] Remove some things from the public namespace by making them static committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 17 Oct 2005 05:50:30 +0000
parents bf6ba37db13b
children 186d2d293ef4
line wrap: on
line diff
--- a/src/idle.c	Mon Oct 17 05:32:33 2005 +0000
+++ b/src/idle.c	Mon Oct 17 05:50:30 2005 +0000
@@ -35,11 +35,13 @@
 
 #include "connection.h"
 #include "debug.h"
+#include "gtkstatusbox.h"
 #include "log.h"
 #include "prefs.h"
+#include "savedstatuses.h"
 #include "signals.h"
 
-#define IDLEMARK 600   	/* 10 minutes! */
+#define IDLEMARK 600	/* 10 minutes! */
 
 typedef enum
 {
@@ -110,6 +112,7 @@
  * 2. Set or unset your auto-away message.
  * 3. Report your current idle time to the IM server.
  */
+/* TODO: This needs to be namespaced or moved elsewhere. */
 gint
 check_idle(gpointer data)
 {
@@ -148,6 +151,7 @@
 		if (gaim_presence_is_available(presence))
 		{
 			const char *idleaway_name;
+			GaimSavedStatus *saved_status;
 
 			gaim_debug_info("idle", "Making %s auto-away\n",
 							gaim_account_get_username(account));
@@ -155,6 +159,8 @@
 			/* TODO XXX STATUS AWAY CORE/UI */
 			/* Mark our accounts "away" using the idleaway status */
 			idleaway_name = gaim_prefs_get_string("/core/status/idleaway");
+			saved_status = gaim_savedstatus_find(idleaway_name);
+			gtk_gaim_status_box_activate_saved_status(saved_status);
 
 			gc->is_auto_away = GAIM_IDLE_AUTO_AWAY;
 		} else {