aboutsummaryrefslogtreecommitdiffstats
path: root/capplet/settings/mail-guess-servers.c
diff options
context:
space:
mode:
Diffstat (limited to 'capplet/settings/mail-guess-servers.c')
-rw-r--r--capplet/settings/mail-guess-servers.c18
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