[evolution/express-offline-mail-guesser] Get the online status from the EShell



commit 75fbc6b766a3826c315b4d260dfde775542bdb1b
Author: Federico Mena Quintero <federico novell com>
Date:   Wed Mar 17 15:24:16 2010 -0600

    Get the online status from the EShell
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 capplet/settings/mail-guess-servers.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c
index f3d47f1..4e2ec27 100644
--- a/capplet/settings/mail-guess-servers.c
+++ b/capplet/settings/mail-guess-servers.c
@@ -42,6 +42,8 @@
 #include <libxml/tree.h>
 #include <libxml/xmlmemory.h>
 
+#include <shell/e-shell.h>
+
 #include "mail-guess-servers.h"
 
 static char *
@@ -219,9 +221,21 @@ parse_soup_message (SoupMessage *msg, EmailProvider *provider)
 }
 
 static gboolean
-is_offline (void)
+is_online (void)
 {
-	return FALSE; /* FIXME */
+	EShell *shell;
+
+	shell = e_shell_get_default ();
+	if (!shell) {
+		 /* FIXME: do we always have a shell?  What do we do if one
+		  * hasn't been created yet?  e_shell_get_default() won't create
+		  * a shell; it will just return one that has been created
+		  * before.
+		  */
+		return FALSE;
+	}
+
+	return e_shell_get_online (shell);
 }
 
 static gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]