From 0b9ba23872e0f0e683c59608215c9137b6bca2ef Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 17 Mar 2010 15:24:16 -0600 Subject: Get the online status from the EShell Signed-off-by: Federico Mena Quintero --- capplet/settings/mail-guess-servers.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'capplet') diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c index f3d47f156e..4e2ec27287 100644 --- a/capplet/settings/mail-guess-servers.c +++ b/capplet/settings/mail-guess-servers.c @@ -42,6 +42,8 @@ #include #include +#include + #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 -- cgit v1.2.3