aboutsummaryrefslogtreecommitdiffstats
path: root/capplet
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-03-18 05:24:16 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-04-07 19:07:21 +0800
commit6cf5297b72585ac32d40743216fbf561caba7cf3 (patch)
tree7dd8b96f3759a1341275499ac1815ea52df2f19a /capplet
parent5074cca8b11e320f4316d2f177f6220551e34e4f (diff)
downloadgsoc2013-evolution-6cf5297b72585ac32d40743216fbf561caba7cf3.tar.gz
gsoc2013-evolution-6cf5297b72585ac32d40743216fbf561caba7cf3.tar.zst
gsoc2013-evolution-6cf5297b72585ac32d40743216fbf561caba7cf3.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.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 d186c422e8..c6a5604533 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 gchar *
@@ -218,9 +220,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