diff options
author | Federico Mena Quintero <federico@novell.com> | 2010-03-18 05:24:16 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@novell.com> | 2010-03-18 06:08:16 +0800 |
commit | 0b9ba23872e0f0e683c59608215c9137b6bca2ef (patch) | |
tree | 228b1d0b4eb9d520d6417ec75848b6d6122b9095 /capplet | |
parent | 76ca6aed8e982ec4b13e1afec47290d974e8d046 (diff) | |
download | gsoc2013-evolution-0b9ba23872e0f0e683c59608215c9137b6bca2ef.tar gsoc2013-evolution-0b9ba23872e0f0e683c59608215c9137b6bca2ef.tar.gz gsoc2013-evolution-0b9ba23872e0f0e683c59608215c9137b6bca2ef.tar.bz2 gsoc2013-evolution-0b9ba23872e0f0e683c59608215c9137b6bca2ef.tar.lz gsoc2013-evolution-0b9ba23872e0f0e683c59608215c9137b6bca2ef.tar.xz gsoc2013-evolution-0b9ba23872e0f0e683c59608215c9137b6bca2ef.tar.zst gsoc2013-evolution-0b9ba23872e0f0e683c59608215c9137b6bca2ef.zip |
Get the online status from the EShell
Signed-off-by: Federico Mena Quintero <federico@novell.com>
Diffstat (limited to 'capplet')
-rw-r--r-- | 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 f3d47f156e..4e2ec27287 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 |